Description of problem: When I resume from swsusp, the pulseaudio daemon no longer outputs the sound. Here's the last message from the log: Oct 13 10:20:55 localhost pulseaudio[6125]: module-alsa-sink.c: Got POLLERR from ALSA Version-Release number of selected component (if applicable): 0.9.7-0.15.svn20071001.fc8 Additional info: $ gst-launch audiotestsrc \! pulsesink Setting pipeline to PAUSED ... Caught interrupt -- ERROR: Pipeline doesn't want to pause. ERROR: from element /pipeline0/pulsesink0: Failed to connect: Timeout Additional debug info: pulsesink.c(334): gst_pulsesink_open (): /pipeline0/pulsesink0 Setting pipeline to NULL ... FREEING pipeline ... $ $ netstat -p |grep /tmp/pulse-lkundrak/native unix 2 [ ] STREAM CONNECTED 916307 6125/pulseaudio /tmp/pulse-lkundrak/native $ ls -l /proc/$(pidof pulseaudio)/fd |grep 916307 lrwx------ 1 lkundrak lkundrak 64 2007-10-13 10:45 11 -> socket:[916307] $ Here is what happens in mainloop_poll when a sound play is attempted (obviously, the event on fd 11): Breakpoint 2, pa_mainloop_poll (m=0x9ed3600) at pulse/mainloop.c:857 857 if (m->poll_func_ret < 0) { $25 = 1 $26 = {{fd = 3, events = 1, revents = 0}, {fd = 11, events = 1, revents = 17}, {fd = 16, events = 1, revents = 0}, {fd = 9, events = 1, revents = 0}, {fd = 21, events = 1, revents = 0}, {fd = 24, events = 1, revents = 0}, {fd = 23, events = 1, revents = 0}, {fd = 20, events = 1, revents = 0}, {fd = 10, events = 25, revents = 0}, {fd = 10, events = 0, revents = 0}, {fd = 7, events = 1, revents = 0}, {fd = 5, events = 1, revents = 0}} (gdb) next 865 m->state = m->poll_func_ret < 0 ? STATE_PASSIVE : STATE_POLLED; (gdb) 866 return m->poll_func_ret; (gdb) 871 } (gdb) pa_mainloop_iterate (m=0x9ed3600, block=1, retval=0xbfa4aa4c) at pulse/mainloop.c:922 922 if ((r = pa_mainloop_dispatch(m)) < 0) (gdb) I myslef didn't look at what happens in mainloop_dispatch; just for a quick look how did which conditional evaluate: (gdb) step pa_mainloop_dispatch (m=0x9ed3600) at pulse/mainloop.c:874 874 int dispatched = 0; (gdb) next 876 pa_assert(m); (gdb) 877 pa_assert(m->state == STATE_POLLED); (gdb) 879 if (m->quit) (gdb) 882 if (m->n_enabled_defer_events) (gdb) 885 if (m->n_enabled_time_events) (gdb) 886 dispatched += dispatch_timeout(m); (gdb) 888 if (m->quit) (gdb) 891 if (m->poll_func_ret > 0) (gdb) 892 dispatched += dispatch_pollfds(m); (gdb) 895 if (m->quit) (gdb) 898 m->state = STATE_PASSIVE; (gdb) 900 return dispatched; (gdb) If there's anything I can do to aid debugging the problem, I'll gladly do that
Perhaps a duplicate of 314411? If it helps changing to another console and back, then it's the same bug.
No, it does not help.
If it is worth noting -- Since yesterday I use pulseaudio from yesterday's SVN snapshot and instead of hang pulseaudio works nicely, just outputs a line E: module-alsa-sink.c: failed to get delay: Broken pipe which is fair, I guess. But maybe that's just a coincidence.
Hmm, since ALSA returns POLLERR from poll() I am tempted to say that this is some kind of driver bug.
Hmm, I just talked to some people on #alsa. Apparently some audio drivers don't cope well with with suspend-to-disk right now, and this might just be an instance of this problem. Which driver is this?
$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog] Subdevices: 0/1 Subdevice #0: subdevice #0 $ lspci |grep -i audio 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03) $ lsmod |grep snd snd_hda_intel 260029 6 snd_seq_dummy 6725 0 snd_seq_oss 30673 0 snd_seq_midi_event 9929 1 snd_seq_oss snd_seq 46361 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event snd_seq_device 10325 3 snd_seq_dummy,snd_seq_oss,snd_seq snd_pcm_oss 38625 0 snd_mixer_oss 16969 2 snd_pcm_oss snd_pcm 65389 4 snd_hda_intel,snd_pcm_oss snd_timer 20957 2 snd_seq,snd_pcm snd 45189 16 snd_hda_intel,snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer soundcore 9761 2 snd snd_page_alloc 11465 2 snd_hda_intel,snd_pcm $
Thanks to Takashi I think I can fix this problem now. I will upload a new version of PA shortly.
*** Bug 333431 has been marked as a duplicate of this bug. ***
I just commited a new version into rawhide that should be able to deal with these errors returned from ALSA. Unfortunately my machine locks up on suspend anyway when I do a suspend-to-disk cycle, so I cannot test this. Please test and reopen this bug when it doesn't work. It's 0.16-svn20071017.
I've updated to 0.16... suspend to ram causes arts to crash with "cpu overload error" on resume. suspend to disk works. ??
Per comment #4, since I'm seeing syslog'd: pulseaudio{...]: module-alsa-sink.c: Got POLLERR from ALSA may well by a driver bug.
I also have this problem on kernel-2.6.23.1-49.fc8.x86_64 with this audio device: 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02) The driver stops working after a suspend-to-disk. Log: Nov 16 23:13:11 hive pulseaudio[2155]: module-alsa-sink.c: Error opening PCM device hw:0: No such device Nov 16 23:17:05 hive pulseaudio[2155]: module-alsa-sink.c: Error opening PCM device hw:0: No such device Nov 16 23:20:06 hive pulseaudio[2155]: module-volume-restore.c: failed to open file '(null)': No such file or director Nov 16 23:20:28 hive kernel: ACPI: PCI interrupt for device 0000:00:1b.0 disabled Nov 16 23:20:32 hive kernel: ACPI: PCI Interrupt 0000:00:1b.0[A] -> GSI 21 (level, low) -> IRQ 21 Nov 16 23:20:55 hive pulseaudio[21583]: alsa-util.c: Cannot find mixer control "Master". Nov 16 23:20:55 hive pulseaudio[21583]: alsa-util.c: Cannot find fallback mixer control "PCM". The first two lines are two atempts to play a sound file. Then I killed pulseaudio. Then I was able to 'modprobe -r snd_hda_intel' and 'modprobe snd_hda_intel'. Finally started pulseaudio again which outputed those last 2 lines. Sound comes back to work normally.