systemd is starting pulseaudio for user (jenkins) without login which causes problems running jackd

psaux shows that 2 instances of pulseaudio are being started on boot: one for the only active user on the system, and one for a limited-use non-login user that provides a CI service and does not have access to the audio group. When running jackd, pulseaudio is killed and the re-run using "pactl set-default-sink jack_out" in the "Execute script after startup" options. If both instances of pulseaudio are killed, this works, but it would make more sense not to run pulseaudio for jenkins in the first place.

jenkins     1718  0.0  0.0 290224 14056 ?        Ssl  05:48   0:00 /usr/bin/pulseaudio --daemonize=no --log-target=journal
mark        1970  0.2  0.1 1302508 19416 ?       S<sl 05:53   0:08 /usr/bin/pulseaudio --daemonize=no --log-target=journal

Reading on how to disable pulse for specific users suggests a couple of approaches, but both fail:

$ sudo -i
$ su jenkins
$ pstree -sp 1718
systemd(1)───systemd(1706)───pulseaudio(1718)─┬─{pulseaudio}(1749)
                                          └─{pulseaudio}(1750)

$ systemctl --user disable pulseaudio.service pulseaudio.socket
Failed to connect to bus: No such file or directory

$ systemctl --user mask pulseaudio.socket
Failed to connect to bus: No such file or directory

So either the correct env is not being picked up when doing the sudo -i/su thing, or this is not the right approach.

Any ideas how to disable whatever systemd is doing to cause pulseaudio to be started for the jenkins user?

Thanks



from Recent Questions - Stack Overflow https://ift.tt/3420yfL
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Hibernate Search - Elasticsearch with JSON manipulation

Spring Elasticsearch Operations