I have a HP Pavilion TS 14 Notebook PC, which has an integrated webcam Chicony HP Truevision HD camera. I'm using Ubuntu 18.04.6 LTS. I purchased a USB webcam (it was a cheap one with no specific brand, but if it helps in the site it says it is a USB WEBCAM W3 -1080P, lsusb returns Bus 002 Device 038: ID 058f:3861 Alcor Micro Corp. when the webcam is plugged in) which does not require installation. It was working fine until two days ago.
Now, for some reason, the USB camera is still recognized by the computer, as it is available in guvcview and works there, but it doesn't work on any browser (firefox and chrome). For some reason too, in guvcview there are four camera entries, two for each camera (built-in and usb), but only one of each works.
ls /dev/video* returns:
/dev/video0 /dev/video1 /dev/video3 /dev/video4
so four video devices instead of two as I expected.
Moreover, when I go to https://webcamtests.com/ in any browser, both cameras are recognized, but only the built-in camera works. When I try to use the USB one, one time the video appears for a couple seconds and then the image turns black. The test returns the following messages:
"It seems your webcam shows a one-color filling. This may be due to a malfunction or third-party application that “mutes” the video stream."
"It seems your web camera streams video as a static image. Either the webcam hangs, or as a video source, it uses regular image."
The other time the video does not appear at all and I get the error message: "Cannot detect any active stream of media content."
What could be going on and how can I fix it?
I'm by no means an expert, so if there is any other info I must provide, please let me know.