Webcam attached to Qube but only showing black

Hey guys,

I am running Qubes OS on a thinkpad p53s and I am trying to use the integraded webcam inside a conference-tool but it is just showing a black screen just like having the cam covert by something.

I have the cam attached via sys-usb to my desired qube (a standalone qube based of a fedora template) and I am able to select it after attaching.

am I missing something?

edit: I tried it in different conference-tools. Its always showing a blackscreen

This may not help much (immediately) but as a test, if you have Cheese (normally installed in Fedora so any Fedora-based VMs will already usually have it) installed you can start a fresh run with the VM up & the camera attached physically but not yet Qubesly (to coin a phrase) & then quickly & accurately attach the camera Qubesly & run Cheese. The camera (if there is no firmware or other kernel issue) may then produce output (Cheese is a simple webcam program so it may be better for testing the issue than any video conference app that you can be using as they are usually assuming that you are directly communicating with a normal USB device - none are written with Qubes & VMs in mind).

If you still don’t manage output or Cheese produces error about device not found you could try to come back here with a few details for others to help?

First of all thanks for your replie but I still didn’t get a proper output.

Here is a screenshot from the cheese result:

Still, no error message from Cheese though suggests a different sort of problem (/dev/video0 existing vs. not existing). Now the thing may be that the camera is not properly supported by kernel/firmware under that template (the template used by the VM), have you tried testing with the other common template (normally people default install both Fedora & Debian templates but not always)? Have you tried this same camera under a non-Qubes Fedora (boot from a liveDVD of Fedora)?

You could also provide people here with camera make/model for anyone to comment that they know of issues or not. I know of one issue affecting all web cams for a while now but I scarcely know where to begin describing it at the moment - something about feature changes to the underpinnings (v4l2) & effectively splitting /dev/video up into two streams (/dev/video0 instead is /dev/video0 & /dev/video1 for different purposes/capabilities) that are not equal (I’m forgetting the best way to describe it at the moment but suffice it to say that I learned the hard way when attaching a Linux program to a webcam that picking the wrong /dev/video can lead to zero use).

Anyone else have any ideas?

No I have not tried the camera under a non-Qubes Fedora.

And the camera is just the integrated webcam in the lenovo thinkpad p53s.

FWIW, with any webcam (meaning general purpose digital camera meant to be attached to a computer via USB) the likelihood that it would work entirely reliably with Linux is quite low unless you stick with a few select items that developers could get their hands on to experiment with since few manufacturers were willing to actively support the movement (you might try to google video for linux - often represented as v4l or the newer standard v4l2 - plus camera or webcam). One example: Logitech-branded (primarily non-integrated web cams) have often been slightly likelier to be operational under Linux but not due to much effort on the part of the manufacturer (more that the masses could cheaply buy one to work some magic or not). For a lesser brand, often much much less chance. You don’t happen to have an external webcam to test with?

I cannot assure you of success with that camera (nothing to do with Qubes), still can you gather intel for others to know more about this one? Like after attachment to one VM, opening a terminal for accessing the command line inside of that VM & trying to transcribe the results of a few commands like lsusb for instance (sometimes we may ask for the short & long forms of the output - “lsusb” vs. “lsusb -v”). Your report on things like the VendorID or ProductID may help others.

In sys-usb > settings > Advanced > Initial memory: increase to 1024 MB. Then reboot system. This may solve the problem.

1 Like

I saw that as a possible solution aswell but my memory was at 1024 MB by default.

You could try a live Linux iso to see if the camera works outside Qubes.

Thats true but I would personally prefer not installing an entire ISO for that manner.

Also I did not have a chance to try another USB-Camera yet. But I am planning to do so if I get an opportunity.

Did you try to run Cheese in (ideally disposable) sys-usb, without attaching the camera with the Qubes Devices?

Yes I tried and I got the same result as above

I tried cheese with a USB-Camera and couldn’t get it to work either.

But right after plugging it in it worked for about 2 seconds and then it broke again. Afterwards I could not replicate that. I tried it in pretty much every Qube

Another error with the USB-Camera

Did you try the usb qube with both Fedora and Debian templates?

No only with the fedora template

Just try to keep track of the fact that you witnessed it “work” for a slight period here (I would suggest refraining though from terming the cessation of operation as “it broke again” since that could be very misleading in this particular case - I feel that I have experienced peculiar behavior with USB attached external webcams that bordered upon “suspicious” that later on stopped happening but while troubleshooting could sometimes lead to a situation where if you utilized precise, skilled timing & excellent observation to suggest courses of testing it eventually could be held for much longer than 2 seconds) & anything like that would tend to prove at the least that the firmware & kernel are not entirely incompatible with this webcam. I also have installed guvcview (another common webcam application) which can sometimes assist about as much or maybe more than cheese in testing & trying to determine what does & does not work.

You may want to tell us about the specific Qubes stats of your installation (you have an installation that is vanilla Qubes 4.1 release candidate 1 with Fedora 34 still set up as the default template & the VM in question is using Fedora 34 as the template upon which it is based & the kernel that is being used is…, y’know exacting precise details which may or may not help much) so that perhaps someone here will have an idea.

Caveat, I am no developer but…I do know that there is a regular issue with webcams but you may simply be out of luck for a while longer. The solution that helps Qubes provide compartmentalization with VMs & works quite well for storage & some lesser USB devices (involving USBIP, it can seem at times almost as if the connection is auto-shutting down after missing key elements of the conversation during setting up - timeout due to lost packets of the header of a protocol conversation or something) doesn’t seem to work quite so well for web cams at the moment. Maybe that will change.

I personally managed to use an external USB webcam throughout the first year of this Covid thing with minor issues but there were times…for the exact same hardware & to some degree the exact same software would not reliably work but for the bulk of a year or two it has performed. I used Zoom via Qubes to chat with my aging mother in a kind of nursing home for 30 minutes at a time or talked with siblings for 40 or so with not much trouble.