← Back to team overview

debcrafters-packages team mailing list archive

[Bug 2122049] Re: wireplumber starts before camera is user accessible

 

A temporary fix as described for ubuntu-x1e-settings is included in
https://code.launchpad.net/~tobhe/ubuntu/+source/ubuntu-x1e-settings/+git/ubuntu-x1e-settings/+merge/491984

I got some help from enr0n for the systemd parts

-- 
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to wireplumber in Ubuntu.
https://bugs.launchpad.net/bugs/2122049

Title:
  wireplumber starts before camera is user accessible

Status in ubuntu-x13s-settings package in Ubuntu:
  New
Status in ubuntu-x1e-settings package in Ubuntu:
  New
Status in wireplumber package in Ubuntu:
  New
Status in ubuntu-x13s-settings source package in Questing:
  New
Status in ubuntu-x1e-settings source package in Questing:
  New

Bug description:
  On Qualcomm Snapdragon laptops we are depending on libcamera for the
  built-in webcam. This is supported in pipewire via
  libspa-0.2-libcamera and works in theory.

  On user login there is an ordering problem where wireplumber.service
  starts before udev changes ownership of /dev/media* and /dev/udmabuf
  to make them user accessible, causing the camera to not be detected:

  Sep 02 15:54:46 t14s wireplumber[4218]: [0:00:18.540654888] [4314] ERROR MediaDevice media_device.cpp:483 /dev/media0[]: Failed to open media device at /dev/media0: Permission denied
  Sep 02 15:54:46 t14s wireplumber[4218]: [0:00:18.540686086] [4314]  INFO DeviceEnumerator device_enumerator.cpp:224 Unable to populate media device /dev/media0 (Permission denied), skipping
  Sep 02 15:54:46 t14s wireplumber[4218]: [0:00:18.540693013] [4314]  WARN DeviceEnumerator device_enumerator_udev.cpp:174 Failed to add device for '/sys/devices/platform/soc@0/acb6000.isp/media0', skipping
  Sep 02 15:54:46 t14s wireplumber[4218]: [0:00:18.542468169] [4314] ERROR DmaBufAllocator dma_buf_allocator.cpp:119 Could not open any dma-buf provider

  This can be fixed with a manual restart of the user service.

  A temporary solution could be something similar to network-wait-
  online.service that wireplumber depends on to make sure the devices
  are available before it starts.

  Ultimately it might make more sense for wireplumber/pipewire to
  monitor /dev ownership changes and update if necessary.

  From https://www.freedesktop.org/wiki/Software/systemd/multiseat/:

  If you are writing user-level software interfacing directly with
  kernel drivers (like PulseAudio), consider ignoring seat information
  completely, and make available to the user all devices he/she can
  access. A device that a user cannot access is a device that is not
  assigned to any of the seats he is currently active on. In order to
  track changes when sessions come and go (and are
  activated/deactivated) consider watching the devices nodes with
  inotify so that you are notified when the access mode changes. This
  scheme works only if your software runs under the user ID of the user
  himself!

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-x13s-settings/+bug/2122049/+subscriptions



References