[Top][All Lists]

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

Re: Multiple pulseaudio process after re-loging

From: Pierre Neidhardt
Subject: Re: Multiple pulseaudio process after re-loging
Date: Sun, 20 May 2018 15:43:54 +0200
User-agent: mu4e 1.0; emacs 26.1

OK, I've nailed it!

I was mistaken about the "3 pulseaudio processes" I mentioned before,
those actually were

             │                              └─{alsa-source-ALC}(510,499)

But htop did not display them that explicitly.  So nothing odd there.

Following Chris suggestion, I used `pstree -ugh` which revealed that the
additional processes were started by my `conky` config.  I have no clue
why this only happens on the first relogging.

Here is the conky config excerpt that I use to query the state/volume:

--8<---------------cut here---------------start------------->8---
${if_match "${exec pactl list sinks | awk '/^\tMute:/ {print $2;exit}'}" == 
${exec pactl list sinks | awk '/^\tVolume:/ {print $5;exit}'}\
--8<---------------cut here---------------end--------------->8---

The `pactl` calls triggers pulseaudio.  There is obviously a race
condition when I relog too fast.  Probably a Pulseaudio bug, don't know.

I tried to to add a check whether pulseaudio is running or not:

--8<---------------cut here---------------start------------->8---
${if_match "${exec if pgrep pulseaudio; then pactl list sinks | awk '/^\tMute:/ 
{print $2;exit}'; fi}" == "no"}\
${exec if pgrep pulseaudio; then pactl list sinks | awk '/^\tVolume:/ {print 
$5;exit}'; fi}\
--8<---------------cut here---------------end--------------->8---

It does not seem to work.

Anyways, it's brittle to parse pactl and using conky makes it even

Would you know any alternative to pactl and/or conky?
i3status does not seem to cut it either.

Pierre Neidhardt

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]