how to forward webcam to a VM?

139 views
Skip to first unread message

evo

unread,
Nov 25, 2017, 11:46:23 AM11/25/17
to qubes...@googlegroups.com
Hey!

I have connected a webcam and i see it via lsusb on sys-usb. I also can
use it with "cheese" programm on the sys-usb-VM. But how can i forward
it to webcam-VM and use it there??

greets
evo

awokd

unread,
Nov 25, 2017, 6:57:42 PM11/25/17
to evo, qubes...@googlegroups.com
Many webcams can be used over USB proxy. From dom0, enter "qvm-usb" with
the webcam connected. You should see a list of available USB devices,
including the webcam. From there, you'd enter "qvm-usb -a webcam-VM
sys-usb:12.3". Use the correct name for your VM and sys-usb:device
identifier for your webcam.

See https://www.qubes-os.org/doc/usb/ for more instructions.


evo

unread,
Nov 26, 2017, 7:04:44 AM11/26/17
to awokd, qubes...@googlegroups.com
Hey! Thanks!
i installed qubes-usb-proxy on the webcam-VM and tried to attach it
there, but i get this error: "device attach failed: Invalid speed received"

find nothing about such error in the docs.

Unman

unread,
Nov 26, 2017, 10:10:22 AM11/26/17
to evo, awokd, qubes...@googlegroups.com
Which Qubes version are you using?

What's the device you are trying to use?
Can you provde more information?

This is an error that has been reported before and there's an open
ticket on qubes issues.
It seems to be device and circumstance dependent. (e.g an android in
debug mode throws this error but the same device NOT in debug mode
attaches properly.)

evo

unread,
Nov 26, 2017, 10:14:00 AM11/26/17
to Unman, awokd, qubes...@googlegroups.com
i use qubes 3.2
and i try to use logitech hd C920 webcam

i found some postings to such kind of error, yes... and it seems to be a
bug, isn't it?

So there is no chance to solve it?

awokd

unread,
Nov 26, 2017, 10:47:39 AM11/26/17
to evo, Unman, qubes...@googlegroups.com
Might be fixed in 4.0 or a future version, but as a temporary workaround
for problem USB devices like that you can assign an entire USB controller
to your webcam-VM. It's not as nice because you lose isolation for that
controller but it should work. If you want to try it, unplug all
unnecessary USB devices. Shutdown both webcam-VM and sys-usb. Look in
sys-usb device list for a USB controller, note the number, remove from
selected list. Add it to webcam-VM Devices, and uncheck Include in memory
balancing in Advanced. You might also need to up the initial memory while
you are in here, try 1024 MB.

Start webcam-VM. Each USB controller only handles some of the USB ports,
so it might be trial and error to find one that handles the empty port you
are plugging the webcam into. Once you figure out which USB port or ports
are now assigned to the webcam-VM, try to avoid plugging anything else
into them besides the webcam.


evo

unread,
Dec 15, 2017, 6:13:50 AM12/15/17
to awokd, Unman, qubes...@googlegroups.com
thank you!


sorry that i answer so late... had no time till now :-/

so i've tried it, but i get this error by starting webcam-vm after
adding the usb-device to it: "libxenlight could not create a new domain
"webcam-vm"

if i try it one more time, i get: UnicodeDecodeError: ascii codec can't
decode byte 0xc3 in position 34: ordinal not in range(128).

i've tried all three usb devices that are shown on sys-usb

awokd

unread,
Dec 15, 2017, 2:11:53 PM12/15/17
to evo, Unman, qubes...@googlegroups.com
On Fri, December 15, 2017 11:13 am, evo wrote:

> so i've tried it, but i get this error by starting webcam-vm after adding
> the usb-device to it: "libxenlight could not create a new domain
> "webcam-vm"
>
>
> if i try it one more time, i get: UnicodeDecodeError: ascii codec can't
> decode byte 0xc3 in position 34: ordinal not in range(128).
>
> i've tried all three usb devices that are shown on sys-usb

You are running Qubes 3.2? Not sure what's going on then, that usually
fixes it for me...


evo

unread,
Dec 15, 2017, 2:19:40 PM12/15/17
to aw...@danwin1210.me, Unman, qubes...@googlegroups.com
yes, the last version of qubes (3.2) :-/

cooloutac

unread,
Dec 26, 2017, 10:23:39 AM12/26/17
to qubes-users

shot in the dark. what if you use a usb 2.0 port instead of 3.0? or vice versa?

Aliaksandr Kavaliou

unread,
Aug 17, 2018, 8:54:27 AM8/17/18
to Unman, awokd, qubes...@googlegroups.com
Hey Guys!
after some time i installed Qubes 4.0 and here the usb-proxy goes over
the grafic icon. But i still can not run my webcam Logitech C920. I
attach it to the webcam-VM, run the software (tox, but also cheese), but
there is no device found.

hmm... can somebody help?

awokd

unread,
Aug 17, 2018, 5:08:20 PM8/17/18
to Aliaksandr Kavaliou, Unman, awokd, qubes...@googlegroups.com
On Fri, August 17, 2018 12:54 pm, Aliaksandr Kavaliou wrote:

>
>
> Hey Guys!
> after some time i installed Qubes 4.0 and here the usb-proxy goes over the
> grafic icon. But i still can not run my webcam Logitech C920. I attach it
> to the webcam-VM, run the software (tox, but also cheese), but there is no
> device found.

With some USB devices, I have to assign a spare USB controller (not the
one you're using for the keyboard/mouse!) directly to the VM before they
will work. This is not the best solution because you lose the benefits of
Qubes isolation, but might be the only way.


John S.Recdep

unread,
Aug 17, 2018, 9:02:33 PM8/17/18
to qubes...@googlegroups.com
so you tried it in both Fedora-28 and Debian-9 appvms?

Aliaksandr Kavaliou

unread,
Aug 18, 2018, 4:42:30 AM8/18/18
to aw...@danwin1210.me, Unman, awokd, qubes...@googlegroups.com
hmm... are there any (good) webcams, which works well with qubes 4?

i will try it with a usb controller.

Tai...@gmx.com

unread,
Aug 23, 2018, 4:07:51 PM8/23/18
to qubes...@googlegroups.com
This actually is the best way to go about it as it is both faster and
more secure than a usb proxy that passes via dom0.

USB controllers short of a very poorly designed one that I don't know
about lack any onboard firmware so as long as it is truly separate from
your other "Trusted" controllers[1] and has FLR you are good to go.

[1] Intel laptops have shared resources for their usb controllers so
they aren't really separate.

0xDF372A17.asc
Reply all
Reply to author
Forward
0 new messages