USB webcam forwarding

98 views
Skip to first unread message

tfm...@googlemail.com

unread,
Oct 30, 2018, 4:30:51 PM10/30/18
to qubes-users
I'm trying to use a C920 USB camera on a Thinkpad X1 Carbon 6gen, latest Qubes4. The VM is running debian-9, but i also tried fedora-26. I tried both connecting the camera directly to a USB port of the Thinkpad and via a powered USB hub.

I attach it to my VM:

user@browser $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 012: ID 046d:082d Logitech, Inc. HD Pro Webcam C920
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

user@browser $ ll /dev/video0
crw-rw----+ 1 root video 81, 0 Oct 30 13:30 /dev/video0

user@browser $ cheese

(cheese:3812): Gtk-WARNING **: Theme parsing error: cheese.css:7:35: The style property GtkScrollbar:min-slider-length is deprecated and shouldn't be used anymore. It will be removed in a future version

(cheese:3812): GStreamer-CRITICAL **: gst_element_message_full_with_details: assertion 'GST_IS_ELEMENT (element)' failed
** Message: cheese-application.vala:211: Error during camera setup: No device found

(cheese:3812): cheese-CRITICAL **: cheese_camera_device_get_name: assertion 'CHEESE_IS_CAMERA_DEVICE (device)' failed

(cheese:3812): GLib-CRITICAL **: g_variant_new_string: assertion 'string != NULL' failed

(cheese:3812): GLib-GIO-CRITICAL **: g_settings_schema_key_type_check: assertion 'value != NULL' failed

(cheese:3812): GLib-CRITICAL **: g_variant_get_type_string: assertion 'value != NULL' failed

(cheese:3812): GLib-GIO-CRITICAL **: g_settings_set_value: key 'camera' in 'org.gnome.Cheese' expects type 's', but a GVariant of type '(null)' was given

** (cheese:3812): CRITICAL **: cheese_preferences_dialog_setup_resolutions_for_device: assertion 'device != NULL' failed
^C

user@browser $ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

user@browser $ ll /dev/video0
ls: cannot access '/dev/video0': No such file or directory

user@browser $ sudo dmesg
[...]
[ 1067.111409] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 1067.999310] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 1068.887291] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 1069.775325] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 1069.776403] usb 1-1: USB disconnect, device number 12
[ 1070.671126] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 1071.559252] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 1071.559340] usb usb1-port1: attempt power cycle
[ 1072.759348] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 1073.647189] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 1073.647296] usb usb1-port1: unable to enumerate USB device

Qubes shows the device as still being attached to the VM. I can detach and reattach without problems.

Forwarding the Thinkpad's internal camera works fine.

Are failures with particular USB devices to be expected? Does anyone know a good external webcam that works?

awokd

unread,
Oct 31, 2018, 7:35:27 AM10/31/18
to qubes...@googlegroups.com
tfm853 via qubes-users wrote on 10/30/18 8:30 PM:
> I'm trying to use a C920 USB camera on a Thinkpad X1 Carbon 6gen, latest Qubes4. The VM is running debian-9, but i also tried fedora-26. I tried both connecting the camera directly to a USB port of the Thinkpad and via a powered USB hub.

>
> Qubes shows the device as still being attached to the VM. I can detach and reattach without problems.
>
> Forwarding the Thinkpad's internal camera works fine.
>
> Are failures with particular USB devices to be expected? Does anyone know a good external webcam that works?
>

Yes, some devices don't work well through redirect. If you have a spare
USB controller (not in use for your mouse & keyboard) you can assign it
directly to the VM and then connect the webcam, but you lose isolation
between that controller and the VM.

Bertrand Lec

unread,
Oct 31, 2018, 7:55:46 AM10/31/18
to qubes-users
Do you have an idea of _why_ some devices do not work well though redirect? I have the same problem with a network interface from a docking station.

Thanks,
Bertrand

awokd

unread,
Oct 31, 2018, 8:26:25 AM10/31/18
to qubes...@googlegroups.com
Bertrand Lec wrote on 10/31/18 11:55 AM:
My guess is only some USB commands are making it through and devices
that use more obscure ones run into problems. I'm no developer, though.
Webcams in particular have been an issue for a while:

https://github.com/QubesOS/qubes-issues/issues/2594
https://github.com/QubesOS/qubes-issues/issues/4035

Didn't list them all. Does your docking station NIC show up as a USB
device? If not, it's a different issue.

tfm...@googlemail.com

unread,
Oct 31, 2018, 10:08:42 AM10/31/18
to qubes-users

dom0:00_14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller sys-usb (no-strict-reset=True)
dom0:3b_00.0 USB controller: Intel Corporation JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016]

Would it be possible to use the thunderbolt controller for that purpose? It doesn't seem to be used right now.

awokd

unread,
Oct 31, 2018, 3:53:14 PM10/31/18
to qubes...@googlegroups.com
tfm853 via qubes-users wrote on 10/31/18 2:08 PM:
Possibly! Shouldn't hurt to try. You'll need to switch that AppVM to HVM
mode and disable memory balancing to attach a device to it. Can always
switch it back to PVH if it doesn't work.

Bertrand Lec

unread,
Oct 31, 2018, 4:00:03 PM10/31/18
to qubes-users
Yes, it's a USB device, managed by sys-net.

Bertrand

tfm...@googlemail.com

unread,
Nov 3, 2018, 5:52:54 AM11/3/18
to qubes-users

Thanks! I'll try that. But I need to get an adapter to connect to USB-C first.

tfm...@googlemail.com

unread,
Nov 7, 2018, 7:50:37 AM11/7/18
to qubes-users

Unfortunately, this doesn't work. If I plug a USB device with an USB-C adapter to the USB-C port of the laptop, the device still shows up the first controller.

I don't know what the second controller does.

So the original question remains: Does anyone know a good external webcam that will work with USB forwarding?

Reply all
Reply to author
Forward
0 new messages