[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Riddling over systemctl, pulseaudio, firefox-esr, and salsa.debian.org



On Mon 10 Apr 2023 at 17:42:04 (+0200), Thomas Schmitt wrote:

> i experience a strange behavior of my Debian 11 with firefox-esr and
> pulseaudio.
> After visiting
>   https://salsa.debian.org/groups/optical-media-team/-/activity
> the most busy process on my Debian 11 is the one that was started at boot
> (or user login) automatically by
>   /usr/bin/pulseaudio --daemonize=no --log-target=journal
> It uses tenfold more CPU time than the idle firefox-esr (says top(1)).
> I cannot tell whether it really tries to make noise, because no
> loudspeakers are attached.
> Before the visit to salsa.debian.org pulseaudio is not shown by top(1)
> among the busiest processes. Afterwards it steadily uses 10 percent of
> a 4 GHz Xeon core.
> Leaving the web site and even removing the browser tab does not reduce
> this activity.
> 
> So what is salsa.debian.org doing with firefox-esr to get pulseaudio so
> excited ?

I don't use pulseaudio (I'm currently browsing the pipewire docs to
see whether it can do anything for me), but googling pulseaudio cpu usage
produces a lot of hits.

> Next riddle is how i could keep pulseaudio from being started automatically
> for my desktop user. I understand from web and man page of systemctl that
>   systemctl --user disable pulseaudio.service pulseaudio.socket
> should do the trick.
> But on next boot and login (even via ssh) there is again a pulseaudio
> instance running with my desktop user id.

AFAICT that command touches files under /run, which would explain why
rebooting resets it. I just tried disabling obex.service because this
machine has no wireless. Each time I ran it, the result was:

  $ strace -f systemctl --user disable obex.service |& cat > /tmp/sysudiso

As root if you want to check those inaccessible directories:

[ … ]

/run/user/1000/systemd/generator.late:
total 4
-rw-r--r-- 1 454 Apr 11 09:55 app-geoclue\x2ddemo\x2dagent-autostart.service
drwxr-xr-x 2  60 Apr 11 09:55 xdg-desktop-autostart.target.wants/

/run/user/1000/systemd/generator.late/xdg-desktop-autostart.target.wants:
total 0
lrwxrwxrwx 1 49 Apr 11 09:55 app-geoclue\x2ddemo\x2dagent-autostart.service -> ../app-geoclue\x2ddemo\x2dagent-autostart.service

[ … ]

I couldn't make anything out from the trace: it didn't contain the
word geoclue. It's probably all implemented by dbus messages.

> The superuser can prevent the starting of pulseaudio for my user and for
> user "lightdm" by
>   systemctl --global disable pulseaudio.service pulseaudio.socket
> 
> So do i get the man page wrong and systemctl has no means to prevent
> services for particular users ?

I'm guessing from what Michel Verdier wrote elsewhere that you
have to create a symlink, pointing at /dev/null, somewhere in
~/.config/systemd/user/. Take a look at what the global command
wrote, and copy it from /etc/systemd/user/, before removing the
global one.

Cheers,
David.


Reply to: