qubes-video-companion icon indicating copy to clipboard operation
qubes-video-companion copied to clipboard

use webcam attached to dom0

Open faerbersteve opened this issue 3 years ago • 10 comments

Hello,

I want to use my internal webcam of my notebook in the Zoom app. Currently it is attached to dom0, as it is connected as an usb device.

I have installed it on dom0 and in the appVM via make install I faced the same issue as described in issue #19 and I fixed it by coping the script from version 1. The ui opens when I run qubes-video-companion webcam in the appVM. I can select dom0 as source but the webcam is not connected.

Is there any step I was missing to make it run? Can you please help me solve it?

faerbersteve avatar Jun 14 '21 14:06 faerbersteve

Can you run qubes-video-companion webcam in a terminal and paste the output? Please redact any sensitive or identifying information, of course.

DemiMarie avatar Jun 14 '21 16:06 DemiMarie

In dom0 I did run the cmd and got the error message about the missing v4l2 component. I tried to install it in dom0 by copy and paste the git folder. But it didn't work. I guess something went wrong during the install. Is it possible to install it via a rpm package? Or is this not possible?

In the appvm the cmd runs fine, opens the dialog.

faerbersteve avatar Jun 14 '21 18:06 faerbersteve

After a restart I receive this error: modprobe: FATAL: videodev is in use Please close any window that has an open video stream so kernel module can be securely unloaded...

faerbersteve avatar Jun 16 '21 20:06 faerbersteve

I found the ui.sh and the main.py When I run the main.py in dom0 I get the tray icon. And in my app vm it the qubes-video-companion returns 640×480, but still the webcam is not recording.

In the documentation I see only that I need to run the comand in the appvm. How do I start the sender "app" in dom0? Is it the app with the tray icon inside the UI folder?

faerbersteve avatar Jun 18 '21 17:06 faerbersteve

@elliotkillick @DemiMarie Is there anything I could try or test to solve the issue? A not working webcam is the only thing which prevents me to use QubesOS as primary system.

faerbersteve avatar Jul 01 '21 15:07 faerbersteve

In the documentation I see only that I need to run the comand in the appvm. How do I start the sender "app" in dom0?

The sender is started automatically by qrexec from the receiver, provided the user allows the operation.

DemiMarie avatar Jul 01 '21 15:07 DemiMarie

Thanks, now I understand how it works.

I found the following errors in the journalctl in dom0. Before I've installed v4l2 in dom0:

Jun 13 13:28:13 dom0 qrexec-policy-daemon[13982]: /etc/qubes-rpc/qvc.Webcam: line 13: v4l2-ctl: command not found
Jun 13 13:28:12 dom0 qrexec-policy-daemon[2406]: qrexec: qvc.Webcam+: personal -> @adminvm: allowed to dom0

This error message I got today, after I've installed v4l2:

Jul 01 13:25:04 dom0 qrexec-policy-daemon[8007]: WARNING: erroneous pipeline: no element "v4l2src"
Jul 01 13:25:03 dom0 qrexec-policy-daemon[8007]: Starting webcam stream at 640x480 30 FPS...
Jul 01 13:25:02 dom0 qrexec-policy-daemon[2553]: qrexec: qvc.Webcam+: personal -> @adminvm: allowed to dom0

Do you have any suggestion what I can try next?

faerbersteve avatar Jul 01 '21 16:07 faerbersteve

Thanks, now I understand how it works.

I found the following errors in the journalctl in dom0. Before I've installed v4l2 in dom0:

Jun 13 13:28:13 dom0 qrexec-policy-daemon[13982]: /etc/qubes-rpc/qvc.Webcam: line 13: v4l2-ctl: command not found
Jun 13 13:28:12 dom0 qrexec-policy-daemon[2406]: qrexec: qvc.Webcam+: personal -> @adminvm: allowed to dom0

This error message I got today, after I've installed v4l2:

Jul 01 13:25:04 dom0 qrexec-policy-daemon[8007]: WARNING: erroneous pipeline: no element "v4l2src"
Jul 01 13:25:03 dom0 qrexec-policy-daemon[8007]: Starting webcam stream at 640x480 30 FPS...
Jul 01 13:25:02 dom0 qrexec-policy-daemon[2553]: qrexec: qvc.Webcam+: personal -> @adminvm: allowed to dom0

Do you have any suggestion what I can try next?

You will need to install one of the GStreamer plugin packages, probably gstreamer-plugins-good.

DemiMarie avatar Jul 01 '21 17:07 DemiMarie

Thank you for your help! Now the webcam is working.

I have run : sudo qubes-dom-update gstreamer1-plugins-good After that I run qubes-video-companion webcam Then the webcam started after selecting dom0

I've noticed on my side that I had to install the v4l2 module again in my template vm. Maybe caused by the qubes update I did before.

Hope this feature gets released soon on qubes-contrib

faerbersteve avatar Jul 01 '21 18:07 faerbersteve

Your webcam can probably also support a higher resolution than 640x480.

You can see all the resolutions for your webcam supports with v4l2-ctl -d 0 --list-formats-ext. Then you can set the desired resolution with v4l2-ctl -d 0 --set-fmt-video=pixelformat=MJPG,width=<PUT_WIDTH_HERE>,height=<PUT_HEIGHT_HERE>

ElliotKillick avatar Jul 09 '21 13:07 ElliotKillick