Pulseaudio fails to start via systemctl after upgrade

Hi!

Actaully problem I have workaround to live with, but really strange for me. After upgrading Leap 15.0 to 15.1 pulseaudio daemon is not starting on user login and as well via

systemctl--userstartpulseaudio11:26:58
Job for pulseaudio.service failed because a fatal signal was delivered to the control process.
See "systemctl --user status pulseaudio.service" and "journalctl --user -xe" for details.

Авг 11 11:16:48 ThinkPad-E480 systemd[2420]: Listening on Sound System.
-- Subject: Starring unit UNIT finished 
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--  
-- Процесс запуска юнита UNIT был завершен.
--  
-- Result: done.
Авг 11 11:16:48 ThinkPad-E480 systemd[2420]: Starting Sound Service...
-- Subject: Starting UNIT
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--  
-- Начат процесс запуска юнита UNIT.
Авг 11 11:16:48 ThinkPad-E480 systemd[2420]: **pulseaudio.service: Main process exited, code=killed, status=31/SYS**
Авг 11 11:16:48 ThinkPad-E480 systemd[2420]: **Failed to start Sound Service.**
-- Subject: Ошибка юнита UNIT
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--  
-- Произошел сбой юнита UNIT.
--  
-- Результат: failed.
Авг 11 11:16:48 ThinkPad-E480 systemd[2420]: **pulseaudio.service: Unit entered failed state.**
Авг 11 11:16:48 ThinkPad-E480 systemd[2420]: **pulseaudio.service: Failed with result 'signal'.**
Авг 11 11:16:48 ThinkPad-E480 systemd[2420]: pulseaudio.service: Service RestartSec=100ms expired, scheduling restart.
Авг 11 11:16:48 ThinkPad-E480 systemd[2420]: Stopped Sound Service.
-- Subject: Завершена остановка юнита UNIT.
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--  
-- Процесс остановки юнита UNIT был завершен.


But, it’s ok when starting just via

pulseaudio --start

from console. Sound is working ok meanwhile even without pulseaudio loaded.

Aparently problem is with unit file -

pulseaudio.service

. I’ve commented everything I don’t know and it’s worked. Not sure it’s correct…
So, now it looks like

[Unit]
Description=Sound Service

# We require pulseaudio.socket to be active before starting the daemon, because
# while it is possible to use the service without the socket, it is not clear
# why it would be desirable.
#
# A user installing pulseaudio and doing `systemctl --user start pulseaudio`
# will not get the socket started, which might be confusing and problematic if
# the server is to be restarted later on, as the client autospawn feature
# might kick in. Also, a start of the socket unit will fail, adding to the
# confusion.
#
# After=pulseaudio.socket is not needed, as it is already implicit in the
# socket-service relationship, see systemd.socket(5).
Requires=pulseaudio.socket
ConditionUser=!root

[Service]
ExecStart=/usr/bin/pulseaudio --daemonize=no
#LockPersonality=yes
#MemoryDenyWriteExecute=yes
#NoNewPrivileges=yes
Restart=on-failure
#RestrictNamespaces=yes
#SystemCallArchitectures=native
#SystemCallFilter=@system-service
# Note that notify will only work if --daemonize=no
Type=notify
#UMask=0077

[Install]
Also=pulseaudio.socket
WantedBy=default.target

I’m not sure what you are looking for there.

As far as I know, “pulseaudio” is started by the desktop on login. It is not started by “systemd” (or “systemctl”).

As a test, I just logged into Icewm. And “pulseaudio” was not running there. I then logged out, and logged into KDE Plasma, and “pulseaudio” was running under KDE. So Plasma starts it, but Icewm doesn’t. It should be started by your desktop software.

I’m pretty sure it’s systemctl on user level.
Maybe KDE/Plasma invokes it, but pulseaudio launch is controlled by it. I did not follow all chain of pulseaudio daemon to start.

But then it should be running if I login to “Icewm”. But it isn’t.

That’s why I started with that test.

However, once Plasma starts it, then it may remain running even if I logout.

I have a similar issue.

This started about 2 or 3 days ago after some updates were installed on Suse 15.1.

On system start, I get a number of log messages like:


  pulseaudio.service: Service RestartSec=100ms expired, scheduling restart.
  pulseaudio.service: Main process exited, code=killed, status=31/SYS
  pulseaudio.service: Start request repeated too quickly.
  pulseaudio.service: Unit entered failed state.
  pulseaudio.service: Failed with result 'signal'.

Sound is not working until I start pulseaudio manually (using pulsaudio --start).
Once started from a console, everything works ok until the next power cycle.

Richard Rosa

Via experiments were found, than need to modify file
/usr/lib/systemd/user/pulseaudio.service
and comment out line

#SystemCallFilter=@system-service

After this -

systemctl --user daemon-reload
systemctl --user restart pulseaudio 

And all work as expected

This worked for me! Thanx.

Richard Rosa

Can someone please report this as a bug at https://en.opensuse.org/openSUSE:Submitting_bug_reports

Same username/password as here.

And please post a link to your report here, so others can add information.

Already there.
https://bugzilla.opensuse.org/show_bug.cgi?id=1145462

> Already there.
> https://bugzilla.opensuse.org/show_bug.cgi?id=1145462](https://bugzilla.opensuse.org/show_bug.cgi?id=1145462)

apparently, no interest from devs in the bug/issue for Leap, particularly if you’re using MedaLibs repo.

for those repos, it’s the result of a sloppy rpm spec – publishing for Leap15.1, but not dealing with the Systemd version diffs for it.

the fix is trivial – and is already mentioned below.

if manually-applying the change isn’t of interest, a simple patch to a DIY obs build takes care of it; fwiw, here’s mine:

https://build.opensuse.org/package/view_file/home:pgnd:multimedia:libs/pulseaudio/boo-1145462.patch?expand=1

for me, on all my Leap15.1 + pulseaudio@MediaLibs instances, it solves the problem.

ymmv.