FS#24837 - Hibernate to disk breaks Pulseaudio.

Attached to Project: Arch Linux
Opened by none given (hoban) - Thursday, 23 June 2011, 13:52 GMT
Last edited by Jan Alexander Steffens (heftig) - Monday, 04 June 2012, 15:35 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
Hibernate to disk breaks Pulseaudio.
"Running hook /etc/pm/sleep.d/90alsa thaw hibernate:
socket(): Address family not supported by protocol
ALSA lib pulse.c:229:(pulse_connect) PulseAudio: Unable to connect: Connection refused

aplay: main:660: audio open error: Connection refused"

Additional info:
* package version(s)
[root@x2 ~]# pacman -Q | egrep "(pulse|pm-utils|alsa)"
alsa-lib 1.0.24.1-1
alsa-plugins 1.0.24-2
alsa-utils 1.0.24.2-1
lib32-alsa-lib 1.0.24.1-1
lib32-alsa-plugins 1.0.24-1
lib32-libpulse 0.9.22-1
libcanberra-pulse 0.28-1
libpulse 0.9.22-2
pm-utils 1.4.1-3
pulseaudio 0.9.22-2
pulseaudio-alsa 1-2
pulseaudio-equalizer 2.7.0.2-1

* config and/or log files etc.
See attached pm-suspend.log

Steps to reproduce:
Using pulseaudio + alsa, suspend to disk with pm-hibernate.
Wake the box up.
No audio.
This task depends upon

Closed by  Jan Alexander Steffens (heftig)
Monday, 04 June 2012, 15:35 GMT
Reason for closing:  Works for me
Comment by none given (hoban) - Friday, 24 June 2011, 13:43 GMT
# /var/log/pacman.log
[2011-06-24 07:28] Running 'pacman -Sy'
[2011-06-24 07:28] synchronizing package lists
[2011-06-24 07:31] Running 'pacman -S -u'
[2011-06-24 07:31] starting full system upgrade
[2011-06-24 07:31] upgraded gnutls (2.12.6.1-1 -> 2.12.7-1)
[2011-06-24 07:31] upgraded libpulse (0.9.22-2 -> 0.9.23-1)
[2011-06-24 07:31] upgraded lib32-libpulse (0.9.22-1 -> 0.9.23-1)
[2011-06-24 07:31] upgraded pulseaudio (0.9.22-2 -> 0.9.23-1)
[2011-06-24 07:31] upgraded paprefs (0.9.9-6 -> 0.9.9-7)
[2011-06-24 07:33] Running 'pacman -U /tmp/yaourt-tmp-tgelter/PKGDEST.S9s/package-query-0.8.1-1-x86_64.pkg.tar.xz'
[2011-06-24 07:33] upgraded package-query (0.8-1 -> 0.8.1-1)

This bug still persists after the pulseaudio upgrade:
Comment by Jan Alexander Steffens (heftig) - Wednesday, 19 October 2011, 15:49 GMT
Is this still an issue?
Comment by none given (hoban) - Wednesday, 19 October 2011, 16:17 GMT
I believe so. I have been shutting down instead of hibernating ever since I reported this since I hadn't seen any notes to indicate it was fixed.
I will test this tonight when I get home and report back.
Comment by none given (hoban) - Thursday, 20 October 2011, 03:25 GMT
Yes, this is still an issue.
I should note that when I tried to play pandora, the track wouldn't even progress.
What additional logs/details can I provide?
Thanks
Comment by Jan Alexander Steffens (heftig) - Thursday, 20 October 2011, 04:27 GMT
lib32-alsa-plugins is installed?

What's the output of "sudo fuser -av /dev/snd/*" and "pacmd list" while the sound works and while it doesn't work?
Also note down which audio app is trying to play at the time.
Comment by none given (hoban) - Saturday, 22 October 2011, 00:18 GMT
Yes, as mentioned in the description, lib32-alsa-plugins is installed:
[root@x2 ~]# pacman -Q lib32-alsa-plugins
lib32-alsa-plugins 1.0.24-1

While sound is working:
[root@x2 ~]# fuser -av /dev/snd/*
USER PID ACCESS COMMAND
/dev/snd/by-path:
/dev/snd/controlC0: mgelter 3167 F.... pulseaudio
/dev/snd/midiC0D0:
/dev/snd/pcmC0D0c:
/dev/snd/pcmC0D0p: mgelter 3167 F...m pulseaudio
/dev/snd/pcmC0D1p:
/dev/snd/pcmC0D2p:
/dev/snd/seq:
/dev/snd/timer:
[root@x2 ~]# pacmd list
No PulseAudio daemon running, or not running as session daemon.

After hibernate, when sound is broken:
[root@x2 ~]# fuser -av /dev/snd/*
USER PID ACCESS COMMAND
/dev/snd/by-path:
/dev/snd/controlC0: mgelter 3167 F.... pulseaudio
/dev/snd/midiC0D0:
/dev/snd/pcmC0D0c:
/dev/snd/pcmC0D0p: mgelter 3167 F...m pulseaudio
/dev/snd/pcmC0D1p:
/dev/snd/pcmC0D2p:
/dev/snd/seq:
/dev/snd/timer:
[root@x2 ~]# pacmd list
No PulseAudio daemon running, or not running as session daemon.

Interesting that no PulseAudio daemon runs in either case...

Also:
[root@x2 ~]# killall pulseaudio
[root@x2 ~]# killall -9 pulseaudio
[root@x2 ~]# rm -rf ~/.pulse*
[root@x2 ~]# rm -rf /tmp/pulse*
[root@x2 ~]# su - mgelter
mgelter@x2:~/Desktop$ pulseaudio --start
E: [pulseaudio] main.c: Daemon startup failed.0
mgelter@x2:~/Desktop$ start-pulseaudio-x11
E: [pulseaudio] main.c: Daemon startup failed.

[root@x2 ~]# grep DAEMONS /etc/rc.conf
# DAEMONS
DAEMONS=(rsyslogd mdadm hal !networkmanager network iptables @sshguard @netfs @crond @anacrond @mysqld @sshd @postfix @transmissiond @httpd @subsonic @mediatomb @cpufreq @sensors @ntpd @smartd @rpcbind @nfs-common @nfs-server @avahi-daemon @samba @cups @alsa gdm @dropboxd-userspace)

Can I provide any other info?
Comment by Jan Alexander Steffens (heftig) - Saturday, 22 October 2011, 00:31 GMT
pacmd must be run as mgelter, not root. Also provide the output of "amixer -c0 contents" for both cases, please. pulseaudio -vvvv will provide more information than pulseaudio --start.
Comment by none given (hoban) - Saturday, 22 October 2011, 00:47 GMT
Sound working:
--------------
pacmd list: http://pastie.org/2738232

amixer -c0 contents: http://pastie.org/2738236

mgelter@x2:~/Desktop$ pulseaudio -vvvv
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
D: [pulseaudio] core-util.c: RealtimeKit worked.
I: [pulseaudio] core-util.c: Successfully gained nice level -11.
I: [pulseaudio] main.c: This is PulseAudio 1.1
D: [pulseaudio] main.c: Compilation host: x86_64-unknown-linux-gnu
D: [pulseaudio] main.c: Compilation CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wall -W -Wextra -Wno-long-long -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option
D: [pulseaudio] main.c: Running on host: Linux x86_64 3.0-ARCH #1 SMP PREEMPT Wed Oct 19 10:27:51 CEST 2011
D: [pulseaudio] main.c: Found 2 CPUs.
I: [pulseaudio] main.c: Page size is 4096 bytes
D: [pulseaudio] main.c: Compiled with Valgrind support: no
D: [pulseaudio] main.c: Running in valgrind mode: no
D: [pulseaudio] main.c: Running in VM: no
D: [pulseaudio] main.c: Optimized build: yes
D: [pulseaudio] main.c: All asserts enabled.
I: [pulseaudio] main.c: Machine ID is a6d0832dbeedf571845da0c34a8337dd.
I: [pulseaudio] main.c: Session ID is a6d0832dbeedf571845da0c34a8337dd-1319243866.412153-1383556808.
I: [pulseaudio] main.c: Using runtime directory /storage/home/mgelter/.pulse/a6d0832dbeedf571845da0c34a8337dd-runtime.
I: [pulseaudio] main.c: Using state directory /storage/home/mgelter/.pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-1.1/modules.
I: [pulseaudio] main.c: Running in system mode: no
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.

Sound not working:
------------------
pacmd list: http://pastie.org/2738247

amixer -c0 contents: http://pastie.org/2738252

mgelter@x2:~/Desktop$ pulseaudio -vvvv
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
D: [pulseaudio] core-util.c: setpriority() worked.
I: [pulseaudio] core-util.c: Successfully acquired nice level -10, which is lower than the requested -11.
I: [pulseaudio] main.c: This is PulseAudio 1.1
D: [pulseaudio] main.c: Compilation host: x86_64-unknown-linux-gnu
D: [pulseaudio] main.c: Compilation CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wall -W -Wextra -Wno-long-long -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option
D: [pulseaudio] main.c: Running on host: Linux x86_64 3.0-ARCH #1 SMP PREEMPT Wed Oct 19 10:27:51 CEST 2011
D: [pulseaudio] main.c: Found 2 CPUs.
I: [pulseaudio] main.c: Page size is 4096 bytes
D: [pulseaudio] main.c: Compiled with Valgrind support: no
D: [pulseaudio] main.c: Running in valgrind mode: no
D: [pulseaudio] main.c: Running in VM: no
D: [pulseaudio] main.c: Optimized build: yes
D: [pulseaudio] main.c: All asserts enabled.
I: [pulseaudio] main.c: Machine ID is a6d0832dbeedf571845da0c34a8337dd.
I: [pulseaudio] main.c: Session ID is a6d0832dbeedf571845da0c34a8337dd-1319243866.412153-1383556808.
I: [pulseaudio] main.c: Using runtime directory /storage/home/mgelter/.pulse/a6d0832dbeedf571845da0c34a8337dd-runtime.
I: [pulseaudio] main.c: Using state directory /storage/home/mgelter/.pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-1.1/modules.
I: [pulseaudio] main.c: Running in system mode: no
E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: pa_pid_file_create() failed.


Thanks!
Comment by Jan Alexander Steffens (heftig) - Saturday, 22 October 2011, 00:55 GMT
I can't find any difference in PA's or ALSA's state. They seem to work properly. Are you sure this is a PA problem and not a driver problem?
Comment by none given (hoban) - Saturday, 22 October 2011, 03:06 GMT
I really am not sure about anything...why is audio in Linux so complicated? </troll>
Comment by Allan McRae (Allan) - Saturday, 02 June 2012, 12:43 GMT
Status?
Comment by none given (hoban) - Monday, 04 June 2012, 15:33 GMT
I no longer use the computer which was experiencing this bug. Since nobody else has reported having this issue, please close it.
Thanks!

Loading...