spa v4l2 fails on login
Early during login, devices tagged with uaccess are not always yet available. There is a work-around for alsa devices using inotify.
For v4l2, there are also calls to inotify_add_watch
. But to the devices directly, that is /dev/video0
, /dev/video1
. Unfortunately, it is not possible to add a watch on a file that is not readable. It returns an error.
When logging in with a webcam connected, wireplumber has this failures in the logs: inotify_add_watch() failed: Permission denied
. This is from the spa v4l2 plugin.
Instead of calling inotify_add_watch
for every device. v4l2 should call it just for /dev
and filter what device in the callback.