I'm on Ubuntu 18.04. My webcam won't work for applications like Cheese and Zoom client. But it works in the browser when I use Google Meet via Firefox for example.
My webcam worked fine before I replaced pulseaudio with pipewire by following this answer on askubuntu.
I've outlined the steps on that answer below.
sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream
sudo apt update
sudo apt install pipewire
sudo apt install libspa-0.2-bluetooth
sudo apt install pipewire-audio-client-libraries
systemctl --user daemon-reload
systemctl --user --now disable pulseaudio.service pulseaudio.socket
systemctl --user mask pulseaudio
systemctl --user --now enable pipewire-media-session.service
systemctl --user restart pipewire
After doing this, my webcam stopped working for Cheese and Zoom client.
Surprisingly, Signal desktop app is able to use my webcam properly. I'm not really sure what the issue is here.
$ ls -l /dev/video0
crw-rw----+ 1 root video 81, 0 Mar 22 20:55 /dev/video0
$ ls -l /dev/media0
crw-rw---- 1 root video 239, 0 Mar 22 20:55 /dev/media0
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 048d:c100 Integrated Technology Express, Inc.
Bus 001 Device 003: ID 5986:2113 Acer, Inc
Bus 001 Device 005: ID 8087:0aaa Intel Corp.
Bus 001 Device 002: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ v4l2-ctl --list-devices
Integrated Camera: Integrated C (usb-0000:00:14.0-6):
/dev/video0
/dev/video1
$ ls -ltrh /dev/video*
crw-rw----+ 1 root video 81, 1 Mar 22 20:55 /dev/video1
crw-rw----+ 1 root video 81, 0 Mar 22 20:55 /dev/video0
$ getfacl /dev/video*
getfacl: Removing leading '/' from absolute path names
# file: dev/video0
# owner: root
# group: video
user::rw-
user:akshaj:rw-
group::rw-
mask::rw-
other::---
# file: dev/video1
# owner: root
# group: video
user::rw-
user:akshaj:rw-
group::rw-
mask::rw-
other::---
$ id
uid=1000(akshaj) gid=1000(akshaj) groups=1000(akshaj),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),116(lpadmin),126(sambashare),999(docker)
$ cheese
(cheese:13763): Gtk-WARNING **: 22:24:07.642: 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
[1:28:54.752437056] [13763] INFO Camera camera_manager.cpp:293 libcamera v0.0.0
[1:28:54.754354637] [13774] ERROR MediaDevice media_device.cpp:479 /dev/media0[]: Failed to open media device at /dev/media0: Permission denied
[1:28:54.754414311] [13774] INFO DeviceEnumerator device_enumerator.cpp:218 Unable to populate media device /dev/media0 (Permission denied), skipping
[1:28:54.754438305] [13774] WARN DeviceEnumerator device_enumerator_udev.cpp:173 Failed to add device for '/sys/devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/media0', skipping
** Message: 22:24:07.860: cheese-application.vala:211: Error during camera setup: No device found
(cheese:13763): cheese-CRITICAL **: 22:24:07.889: cheese_camera_device_get_name: assertion 'CHEESE_IS_CAMERA_DEVICE (device)' failed
(cheese:13763): GLib-CRITICAL **: 22:24:07.889: g_variant_new_string: assertion 'string != NULL' failed
(cheese:13763): GLib-CRITICAL **: 22:24:07.889: g_variant_ref_sink: assertion 'value != NULL' failed
(cheese:13763): GLib-GIO-CRITICAL **: 22:24:07.889: g_settings_schema_key_type_check: assertion 'value != NULL' failed
(cheese:13763): GLib-CRITICAL **: 22:24:07.889: g_variant_get_type_string: assertion 'value != NULL' failed
(cheese:13763): GLib-GIO-CRITICAL **: 22:24:07.889: g_settings_set_value: key 'camera' in 'org.gnome.Cheese' expects type 's', but a GVariant of type '(null)' was given
(cheese:13763): GLib-CRITICAL **: 22:24:07.889: g_variant_unref: assertion 'value != NULL' failed
** (cheese:13763): CRITICAL **: 22:24:07.889: cheese_preferences_dialog_setup_resolutions_for_device: assertion 'device != NULL' failed
/dev/media0
. What are its permissions? Please add these to the question./dev/media0
? Using$ ls -l /dev/media0
? I've updated my question with the output of$ ls -l /dev/media0
.video
group? In a terminal, theid
command will show you. BTW, afterls
told you that you had/dev/video0
and/dev/video1
, naturally yourgetfacl /dev/video
failed. Usegetfacl /dev/video*
cheese -d /dev/video0
work? Orcheese -d /dev/video1
?id
andgetfacl /dev/video*
outputs in my question above. Also, both thecheese -d
commands did not work. I still get 'No device found' when I open cheese.