pipewire/spa/plugins
Hans de Goede 2a6ba61264 spa: v4l2: Use systemd-logind to listen for access changes
There is a race between logind applying ACLs to allow the active session
of a locally present user access to devices with a udev uaccess tag
(like /dev/video# nodes) getting applied vs wireplumber/pipewire starting.

Wireplumber/pipewire are part of the (user) default.target, which gets
started as soon as a user logs in and systemd --user is started for that
user, where as logind only starts applying the ACLs after the gnome-shell
associated logind session has been created.

This race may cause pipewire to not see v4l2 video sources at login,
this can be reproduced with these steps:

1. sudo setfacl --remove-all /dev/video*
2. systemctl --user restart pipewire
3. Now wp-ctl status will not show any video devices
   (like if pipewire was started before the udev uaccess ACLs got applied)
4. Do a switch to another (test) user without logging out, e.g. in GNOME
   go to the top right system menu press the power on/off icon and select
   "Switch User..."
5. Switch back to your normal user. Run getfacl /dev/video0 this will show
   your user has access now.
6. wp-ctl status should show the camera now, but it does not.

Fix pipewire not seeing v4l2 sources in this case by making v4l2-udev
monitor systemd-logind session changes and redoing the access() checks
on /dev/video# nodes when the session changes.

Closes: #3539
Closes: #3960
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2024-09-11 07:26:41 +00:00
..
aec spa: aec: webrtc: Fix multichannel processing 2024-06-25 15:34:30 -04:00
alsa alsa-pcm: unlink pcm when driver is changed to a different pcm 2024-09-06 08:42:20 +00:00
audioconvert audioadapter: clear the handle as well to avoid leaks 2024-09-09 13:42:44 +02:00
audiomixer spa: revert peer_enum_params node event again 2024-06-20 10:22:45 +02:00
audiotestsrc fix compilation some more 2024-06-18 15:41:12 +02:00
avb spa: small cleanups 2024-01-10 15:51:01 +01:00
bluez5 bluez5: backend-native: Handle AT+CCWA command 2024-08-13 09:10:44 +00:00
control control: add support for mixing to UMP 2024-07-29 18:15:58 +02:00
ffmpeg spa: use log topics everywhere 2024-03-11 18:45:21 +02:00
jack spa: use log topics everywhere 2024-03-11 18:45:21 +02:00
libcamera libcamera: reset ringbuffer when clearing buffers 2024-08-30 06:49:17 +02:00
support Revert "spa: support: loop: do not call control hooks on blocking invoke" 2024-08-21 14:48:54 +02:00
test spa: use log topics everywhere 2024-03-11 18:45:21 +02:00
v4l2 spa: v4l2: Use systemd-logind to listen for access changes 2024-09-11 07:26:41 +00:00
videoconvert videoadapter: sync with audioadapter 2024-09-06 17:35:34 +02:00
videotestsrc Port videotestsrc to LoopUtils 2024-07-01 15:28:14 +00:00
volume spa: fix volume plugin compilation 2024-06-18 15:44:26 +02:00
vulkan treewide: fix more -Wformat issues 2024-06-30 19:22:17 +00:00
meson.build meson: fix build with missing libudev-devel 2024-02-06 11:49:40 +01:00