* Multiple pulseaudio process after re-loging
@ 2018-04-23 6:40 Pierre Neidhardt
2018-04-23 18:43 ` Leo Famulari
0 siblings, 1 reply; 10+ messages in thread
From: Pierre Neidhardt @ 2018-04-23 6:40 UTC (permalink / raw)
To: help-guix
[-- Attachment #1: Type: text/plain, Size: 597 bytes --]
After a fresh boot, pulseaudio works just fine. If I log out and log
back again, I systematically get the following odd behaviour:
- When no sound is playing, I hear crackles.
- Instead of one, two pulseaudio processes are running.
- `pavucontrol' fails to start, claiming it cannot connect to the server.
- Power consumption skyrockets.
If I kill all pulseaudio processes, it goes back to normal. That is to
say, until I log out and in again.
Can anyone reproduce?
--
Pierre Neidhardt
Newton's Little-Known Seventh Law:
A bird in the hand is safer than one overhead.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Multiple pulseaudio process after re-loging
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
0 siblings, 1 reply; 10+ messages in thread
From: Leo Famulari @ 2018-04-23 18:43 UTC (permalink / raw)
To: Pierre Neidhardt; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 672 bytes --]
On Mon, Apr 23, 2018 at 12:10:37PM +0530, Pierre Neidhardt wrote:
>
> After a fresh boot, pulseaudio works just fine. If I log out and log
> back again, I systematically get the following odd behaviour:
>
> - When no sound is playing, I hear crackles.
> - Instead of one, two pulseaudio processes are running.
> - `pavucontrol' fails to start, claiming it cannot connect to the server.
> - Power consumption skyrockets.
>
> If I kill all pulseaudio processes, it goes back to normal. That is to
> say, until I log out and in again.
>
> Can anyone reproduce?
I can't reproduce this. How are you starting Pulseaudio? Can you include
your config.scm?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Multiple pulseaudio process after re-loging
2018-04-23 18:43 ` Leo Famulari
@ 2018-04-24 6:33 ` Pierre Neidhardt
2018-04-27 3:43 ` Chris Marusich
0 siblings, 1 reply; 10+ messages in thread
From: Pierre Neidhardt @ 2018-04-24 6:33 UTC (permalink / raw)
To: Leo Famulari; +Cc: help-guix
[-- Attachment #1.1: Type: text/plain, Size: 287 bytes --]
I'm not doing anything to start Pulseaudio since it starts
on demand. I can't think of anything wrong with how I start my
user session. I run EXWM via ~/.xsession. See my dotfiles:
https://github.com/ambrevar/dotfiles
Find my config.scm attached.
--
Pierre Neidhardt
[-- Attachment #1.2: config.scm --]
[-- Type: application/octet-stream, Size: 5935 bytes --]
;; This is an operating system configuration template
;; for a "desktop" setup without full-blown desktop
;; environments.
(use-modules (gnu)
(gnu packages linux)
(gnu packages tls)
(gnu system nss)
(guix build-system trivial)
(guix download)
(guix git-download)
(gnu services xorg)
(gnu services networking)
(gnu packages admin)
((guix licenses) #:prefix license:)
(guix packages)
(srfi srfi-1))
(use-service-modules desktop)
(use-package-modules bootloaders certs suckless ;; xorg
)
(define (linux-nonfree-urls version)
"Return a list of URLs for Linux-Nonfree VERSION."
(list (string-append
"https://www.kernel.org/pub/linux/kernel/v4.x/"
"linux-" version ".tar.xz")))
(define-public linux-nonfree
(package
(inherit linux-libre)
(name "linux-nonfree")
(version "4.14.33")
(source
(origin
(method url-fetch)
(uri (linux-nonfree-urls version))
(sha256
(base32 "0c88p5vly63jsz62ff7971zl6vqzzbv5q519gi8z17ld66sf5063" ; 4.14.33
;; "1hv00176njm4g9m1aj92lvhwqn75c46qwsglsmx95ivbr9qc58av" ; 4.16.1
))))))
(define-public linux-nonfree-firmware
(let ((version "0.0.0")
(commit "6d5131107f2ba67a13f469ac770a55f101ba654d"))
(package
(name "linux-nonfree-firmware")
(version version)
(source (origin
(method git-fetch)
(uri (git-reference
(url "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git")
(commit commit)))
(sha256
(base32
"0nql7rqkx064lsw5bh6n29yfdxmp3hl4nqgp1fxdb4ys76awchg3"))))
(build-system trivial-build-system)
(arguments
`(#:modules ((guix build utils))
#:builder (begin
(use-modules (guix build utils))
(let ((source (assoc-ref %build-inputs "source"))
(destination (string-append %output "/lib/firmware")))
(mkdir-p destination)
(copy-recursively source destination #:follow-symlinks? #t)
#t))))
(home-page "")
(synopsis "Non-free firmware for the Linux kernel")
(description "Non-free firmware for the Linux kernel")
(license #f))))
;; Allow members of the "video" group to change the screen brightness.
(define %backlight-udev-rule
(udev-rule
"90-backlight.rules"
(string-append "ACTION==\"add\", SUBSYSTEM==\"backlight\", "
"RUN+=\"/run/current-system/profile/bin/chgrp video /sys/class/backlight/%k/brightness\""
"\n"
"ACTION==\"add\", SUBSYSTEM==\"backlight\", "
"RUN+=\"/run/current-system/profile/bin/chmod g+w /sys/class/backlight/%k/brightness\"")))
;; (define my-xorg-modules
;; ;; Everything but Nouveau.
;; (delete xf86-video-nouveau %default-xorg-modules))
;; Use the "desktop" services, which include the X11
;; log-in service, networking with Wicd, and more.
(define %my-services
(modify-services
%desktop-services
(udev-service-type config =>
(udev-configuration
(inherit config)
(rules (append (udev-configuration-rules config)
(list %backlight-udev-rule)))))
(slim-service-type config =>
(slim-configuration
(inherit config)
(auto-login? #f)
;; (startx (xorg-start-command #:modules my-xorg-modules))
;; TODO: Can't slim pre-fill the username?
(default-user "ambrevar")))))
(operating-system
(host-name "mimimi")
(timezone "Asia/Kolkata")
(locale "en_US.utf8")
;; Use the UEFI variant of GRUB with the EFI System
;; Partition mounted on /boot/efi.
;; If generating an image to a USB stick, use -bios- instead.
(bootloader (bootloader-configuration
(bootloader grub-efi-bootloader)
(timeout 1)
(target "/boot/efi")))
(kernel linux-nonfree)
(kernel-arguments '("modprobe.blacklist=pcspkr"))
;; (kernel-arguments '("modprobe.blacklist=nouveau"))
;; (kernel-arguments '("pcie_port_pm=off"))
(firmware (cons* linux-nonfree-firmware %base-firmware))
(initrd-modules (append (list "shpchp")
%base-initrd-modules))
;; Assume the target root file system is labelled "guixsd",
;; and the EFI System Partition is specified by its UUID.
(file-systems (cons* (file-system
(device "guixsd")
(title 'label)
(mount-point "/")
(type "ext4"))
(file-system
(device "home")
(title 'label)
(mount-point "/home")
(type "ext4"))
(file-system
(device (uuid "8AC2-4252" 'fat))
(title 'uuid)
(mount-point "/boot/efi")
(type "vfat"))
%base-file-systems))
(users (cons* (user-account
(name "ambrevar")
(group "users")
(supplementary-groups '("wheel" "netdev" ; netdev is needed for networking.
"audio" "video"))
(home-directory "/home/ambrevar"))
%base-user-accounts))
(packages (cons* nss-certs ;for HTTPS access
%base-packages))
(services %my-services)
;; Allow resolution of '.local' host names with mDNS.
(name-service-switch %mdns-host-lookup-nss))
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Multiple pulseaudio process after re-loging
2018-04-24 6:33 ` Pierre Neidhardt
@ 2018-04-27 3:43 ` Chris Marusich
2018-05-20 12:55 ` Pierre Neidhardt
0 siblings, 1 reply; 10+ messages in thread
From: Chris Marusich @ 2018-04-27 3:43 UTC (permalink / raw)
To: Pierre Neidhardt; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 284 bytes --]
Pierre Neidhardt <ambrevar@gmail.com> writes:
> I'm not doing anything to start Pulseaudio since it starts
> on demand.
Maybe you can trace the processes back to see what spawned the multiple
Pulseaudio processes? Try using pstree (from the "psmisc" package).
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Multiple pulseaudio process after re-loging
2018-04-27 3:43 ` Chris Marusich
@ 2018-05-20 12:55 ` Pierre Neidhardt
2018-05-20 13:43 ` Pierre Neidhardt
0 siblings, 1 reply; 10+ messages in thread
From: Pierre Neidhardt @ 2018-05-20 12:55 UTC (permalink / raw)
To: Chris Marusich; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 1122 bytes --]
I've investigated further to come up with a more precise recipe:
- Start the machine afresh.
- Log in, play some music, everything is fine (only one pulseaudio
process, no crackles.)
- Log out and relog _as fast as possible_ (if possible, enter the
credentials in SLiM in less than 2-3 seconds).
- 4 pulseaudio processes are up. Sound is crackling when not playing
anything. It stops crackling when I play something.
- Log out again and relog (no need to be fast). This time only one
process is up but the sound is still crackling. Killing the process
fixes it.
- On subsequent logouts+logins, the issue does not seem to be
reproducible. I have to reboot.
Another clue:
After a fresh boot, the first time I log out I can see from a TTY that 3
pulseaudio processes are now running.
If I wait some seconds, they all eventually die and I can login without
sound issue.
Subsequent logouts won't spawn those 3 processes.
If however I follow the above receipe and log back in fast enough, an
additional process is spawned (which is normal) but the 3 processes remain.
Puzzling...
--
Pierre Neidhardt
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Multiple pulseaudio process after re-loging
2018-05-20 12:55 ` Pierre Neidhardt
@ 2018-05-20 13:43 ` Pierre Neidhardt
2018-06-03 1:07 ` Chris Marusich
0 siblings, 1 reply; 10+ messages in thread
From: Pierre Neidhardt @ 2018-05-20 13:43 UTC (permalink / raw)
To: Chris Marusich; +Cc: help-guix
[-- 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 --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Multiple pulseaudio process after re-loging
2018-05-20 13:43 ` Pierre Neidhardt
@ 2018-06-03 1:07 ` Chris Marusich
2018-06-03 12:41 ` Pierre Neidhardt
0 siblings, 1 reply; 10+ messages in thread
From: Chris Marusich @ 2018-06-03 1:07 UTC (permalink / raw)
To: Pierre Neidhardt; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 1846 bytes --]
Pierre Neidhardt <ambrevar@gmail.com> writes:
> 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:
>
> ${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}\
>
>
> 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 '/^\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}\
>
> 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!
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Multiple pulseaudio process after re-loging
2018-06-03 1:07 ` Chris Marusich
@ 2018-06-03 12:41 ` Pierre Neidhardt
2018-06-06 9:33 ` Oleg Pykhalov
0 siblings, 1 reply; 10+ messages in thread
From: Pierre Neidhardt @ 2018-06-03 12:41 UTC (permalink / raw)
To: Chris Marusich; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 629 bytes --]
Chris Marusich <cmmarusich@gmail.com> writes:
> 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.
While I haven't tested on another distribution (yet, and chances are low
that I'm ever gonna leave Guix :p), I cannot be certain, but the
symptoms seem to be very independent of Guix.
I'd put the blame on conky / Pulseaudio for now :)
--
Pierre Neidhardt
The animals are not as stupid as one thinks -- they have neither
doctors nor lawyers.
-- L. Docquier
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Multiple pulseaudio process after re-loging
2018-06-03 12:41 ` Pierre Neidhardt
@ 2018-06-06 9:33 ` Oleg Pykhalov
2018-06-06 9:37 ` Pierre Neidhardt
0 siblings, 1 reply; 10+ messages in thread
From: Oleg Pykhalov @ 2018-06-06 9:33 UTC (permalink / raw)
To: Pierre Neidhardt; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 965 bytes --]
Hello Pierre,
Pierre Neidhardt <ambrevar@gmail.com> writes:
[…]
> I'd put the blame on conky / Pulseaudio for now :)
I have a different Pulseaudio behavior. Sometimes I use a program which
does not use Pulseaudio but Alsa, then I need to start Pulseaudio
manually if there is no program which produces a sound, e.g. with
‘pulsemixer’. In ‘pulsemixer’ I'll have ‘PROGRAM_NAME: AudioStream’
string after launching Alsa only program, which means I can contol Alsa
only program with Pulseaudio. If I don't run Pulseaudio manually, then
Alsa only program will still a device until the program will be killed.
I don't use any desktop environment, which usually run Pulseaudio
automatically as I know.
Does Conky show you a Pulseaudio current volume? Conky probably runs
Pulseaudio to do it. Also, it will be better to test a Pulseaudio
behavior in a clean environment, e.g. by using a window manager like
Ratpoison.
Oleg.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Multiple pulseaudio process after re-loging
2018-06-06 9:33 ` Oleg Pykhalov
@ 2018-06-06 9:37 ` Pierre Neidhardt
0 siblings, 0 replies; 10+ messages in thread
From: Pierre Neidhardt @ 2018-06-06 9:37 UTC (permalink / raw)
To: Oleg Pykhalov; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 284 bytes --]
I don't use a desktop environment. Pulseaudio starts on demand for me,
but I rarely use anything but mpv to play sound.
Conky does not seem to support Pulseaudio, so I parse `pactl` output
instead. It's dirty but I can't figure out anything better.
--
Pierre Neidhardt
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2018-06-06 9:37 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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.