Control: retitle -1 pipewire-system-services: system-wide WirePlumber loses 
volumes and mute states at each boot

My initial report had two shortcomings: it did not make the consequence
for users clear, and it only considered one particular fix, whereas
the problem can also be addressed in another way (see below).

The consequence for users: volumes, mute states and default devices
are lost whenever the service restarts, in particular at each boot.

The reason: when PipeWire and WirePlumber run as system services,
WirePlumber logs

  wp-state: failed to create directory
  /nonexistent/.local/state/wireplumber: Permission denied

and cannot save its state.

This is still the case with pipewire 1.6.9-2 and wireplumber 0.5.19-1.

Two ways to fix it come to mind:

- as my initial report proposed, give the pipewire user a home
  directory, e.g. /var/lib/pipewire, in
  /usr/lib/sysusers.d/pipewire.conf. systemd-sysusers does not create
  home directories, so the directory would also have to be created,
  e.g. with a tmpfiles.d entry. WirePlumber would then store its state
  in the .local/state/wireplumber subdirectory of /var/lib/pipewire;

- or leave the user as it is and have the system wireplumber.service
  declare its own state directory:

    StateDirectory=wireplumber
    Environment=XDG_STATE_HOME=%S

  so that WirePlumber stores its state directly in /var/lib/wireplumber.

The second one keeps the fix in wireplumber-system-services, where the
problem shows up, and may thus be preferable.

I can prepare a merge request for whichever approach you prefer.

Thanks,

Seb.

Reply via email to