From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: Multiple pulseaudio process after re-loging Date: Sat, 02 Jun 2018 18:07:33 -0700 Message-ID: <87r2lollt6.fsf@gmail.com> References: <87tvs2mnmi.fsf@gmail.com> <20180423184306.GC27672@jasmine.lan> <87604hw1ur.fsf@gmail.com> <87in8d2u27.fsf@gmail.com> <87zi0upjur.fsf@gmail.com> <87bmdao31h.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPHUl-0000KF-9V for help-guix@gnu.org; Sat, 02 Jun 2018 21:07:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPHUi-0001nA-3m for help-guix@gnu.org; Sat, 02 Jun 2018 21:07:43 -0400 Received: from mail-pl0-x22f.google.com ([2607:f8b0:400e:c01::22f]:34694) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fPHUh-0001mn-Th for help-guix@gnu.org; Sat, 02 Jun 2018 21:07:40 -0400 Received: by mail-pl0-x22f.google.com with SMTP id ay10-v6so17478880plb.1 for ; Sat, 02 Jun 2018 18:07:39 -0700 (PDT) In-Reply-To: <87bmdao31h.fsf@gmail.com> (Pierre Neidhardt's message of "Sun, 20 May 2018 15:43:54 +0200") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Pierre Neidhardt Cc: help-guix --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Pierre Neidhardt writes: > OK, I've nailed it! > > I was mistaken about the "3 pulseaudio processes" I mentioned before, > those actually were > > =E2=94=9C=E2=94=80pulseaudio(500,499,ambrevar)=E2=94=80=E2= =94=AC=E2=94=80{alsa-sink-ALC25}(509,499) > =E2=94=82 =E2=94=94=E2=94=80{al= sa-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: > > ${if_match "${exec pactl list sinks | awk '/^\tMute:/ {print $2;exit}'}" = =3D=3D "no"}\ > ^fg(grey)=E2=99=AA^fg(DeepSkyBlue)\ > ${exec pactl list sinks | awk '/^\tVolume:/ {print $5;exit}'}\ > ${endif}\ > > > 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: > > ${if_match "${exec if pgrep pulseaudio; then pactl list sinks | awk '/^\t= Mute:/ {print $2;exit}'; fi}" =3D=3D "no"}\ > ^fg(grey)=E2=99=AA^fg(DeepSkyBlue)\ > ${exec if pgrep pulseaudio; then pactl list sinks | awk '/^\tVolume:/ {pr= int $5;exit}'; fi}\ > ${endif}\ > > 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. I'm afraid I don't know anything else that might help at this time. If you suspect this is a Guix bug, it may be worth recording your findings in a proper bug report sent to bug-guix@gnu.org. Thank you for looking into it! =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlsTP1YACgkQ3UCaFdgi Rp3t+xAAlQzl1n0ujDf7KP09heKeNzpqkGrUHwkevSMiwcX0DE1pJNuaONCmIvWZ HgRsyylLUME7SHOxCTvPqWiWSTJ76GWHIpFWMdHFpBLsVdOKd9zHURVy5Z5DyoAb 50w56PVyktIWm0ghEm0HcFz+AQgJ/TbeI1eP8dJZmIUGU5xLeOUxE4+wFR0r0GwI JrYGkfZRLK9PuRDosJ7F4S7qQhPF2UhS8+ss+wjfl42oHp/dW3yOnFclcMIAgg0b eI5cqyFb4Vnw70kW8EbGvZRUvsh2inIdzfa70XxJ1okESewnHfcztA5IEvsghuXv Hyl8rFFgpP2DrmjVMOo7OTzA5bCcKX857D72dvGkVc/E/KzOeI13uTcQmanJaZiQ h3SJMRC51hKr6QseBGOWgouSsm15QPSkcH+qsDCv61IsGRIgLBZt16PgLa+5gOGw YleeQhVqCvVW4ph4LUMF1KN6E0Ui9/rA+HT49Tl5FsqfzsSUAJGKfS6mjUoPV3fg SrgsMix6QiPpdvcD4JXe9HbnsiZa02qBpm2JvbBY8r6NjxtbggJD0J/QsKnYhi8u BLRK8CBB5vTkibHEnC0mwlcLBY+bdaMXrz8vN77vCIzA7inYIAGxBVze1+LQpES4 8bQOrYCu3EZbP1IEEhiKugGEIqZj49JUKk9EJmKFH4VFeB0J3PY= =bcCy -----END PGP SIGNATURE----- --=-=-=--