From: Pierre Neidhardt <ambrevar@gmail.com>
To: Chris Marusich <cmmarusich@gmail.com>
Cc: help-guix <help-guix@gnu.org>
Subject: Re: Multiple pulseaudio process after re-loging
Date: Sun, 20 May 2018 15:43:54 +0200 [thread overview]
Message-ID: <87bmdao31h.fsf@gmail.com> (raw)
In-Reply-To: <87zi0upjur.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1778 bytes --]
OK, I've nailed it!
I was mistaken about the "3 pulseaudio processes" I mentioned before,
those actually were
├─pulseaudio(500,499,ambrevar)─┬─{alsa-sink-ALC25}(509,499)
│ └─{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}'}" == "no"}\
^fg(grey)♪^fg(DeepSkyBlue)\
${exec pactl list sinks | awk '/^\tVolume:/ {print $5;exit}'}\
${endif}\
--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"}\
^fg(grey)♪^fg(DeepSkyBlue)\
${exec if pgrep pulseaudio; then pactl list sinks | awk '/^\tVolume:/ {print $5;exit}'; fi}\
${endif}\
--8<---------------cut here---------------end--------------->8---
It does not seem to work.
Anyways, it's brittle to parse pactl and using conky makes it even
worse.
Would you know any alternative to pactl and/or conky?
i3status does not seem to cut it either.
--
Pierre Neidhardt
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
next prev parent reply other threads:[~2018-05-20 13:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-23 6:40 Multiple pulseaudio process after re-loging Pierre Neidhardt
2018-04-23 18:43 ` Leo Famulari
2018-04-24 6:33 ` Pierre Neidhardt
2018-04-27 3:43 ` Chris Marusich
2018-05-20 12:55 ` Pierre Neidhardt
2018-05-20 13:43 ` Pierre Neidhardt [this message]
2018-06-03 1:07 ` Chris Marusich
2018-06-03 12:41 ` Pierre Neidhardt
2018-06-06 9:33 ` Oleg Pykhalov
2018-06-06 9:37 ` Pierre Neidhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bmdao31h.fsf@gmail.com \
--to=ambrevar@gmail.com \
--cc=cmmarusich@gmail.com \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.