So I was trying to stop pulseaudio with pulseaudio -k
, but it kept restarting "on its own", even though I have the configuration autospawn = no
in place.
I'm pretty sure it's systemd that keeps restarting it, as instructed by /usr/lib/systemd/user/pulseaudio.service:
[Unit]
Description=Sound Service
[Service]
# Note that notify will only work if --daemonize=no
Type=notify
ExecStart=/usr/bin/pulseaudio --daemonize=no
Restart=on-failure
[Install]
Also=pulseaudio.socket
WantedBy=default.target
But the thing is, when I try to stop this service with systemctl stop pulseaudio.service
, systemctl returns me the following:
Failed to stop pulseaudio.service: Unit pulseaudio.service not loaded.
How do I stop/disable this service?
Best Answer
To stop user services it's necessary to use the parameter
--user
: