Hi, I have a dual display card setup on a hp tm2 laptop, Ubuntu linux. There is both a discrete radeon graphics card and an integrated intel card. If I use vgaswitcheroo to turn the radeon card OFF (to save battery), then pulseaudio hangs on the next sound played. This happens every time. Solutions for me: a) have the card on, or b) remove pulseaudio from the system. Pulseaudio hangs the system HARD. Let me know what logs you need, if any. Or if I possibly can change the configuration to make it work.
post output of alsa-info.sh does it help if you switch the default sink back to analog first before you switch off HDMI ? i.e. pulseaudio cannot get card removal udev event
Created attachment 94749 [details] alsa-info.sh output
No difference in behaviour. The card seems to be present, still. One comment: it seems that it is not the whole system that hangs, just the program that plays the sound. If this is the session manager, I can't do anything anymore. And pulseaudio itself hangs. Pulseaudio doesn't even react to being killed after that.
Can you check with gdb where pulseaudio is hanging?
[ 9.743743] HDMI: ELD buf size is 0, force 128 [ 9.743760] HDMI: invalid ELD data byte 0 it seem that graphic driver cannot pass valid ELD to audio driver post output of xrandr --verbose did you find your HDMI TV model in system log when drm parse EDID of your HDMI tv/monitor ?
Created attachment 94800 [details] gdb-pulseaudio.log
Created attachment 94801 [details] xrandr--verbose.txt
I noticed that the sound-playing program hangs for quite some time, but then recovers and does play the sound. However, pulseaudio is completely non-responsive after this has happened. No reaction whatsoever, even to kill commands. I even had to cut and paste gdb output, my typescript session never wrote the last buffer to disk.
I seem to remember that the monitor model is correct in the screen config when I connect an external monitor. Does that answer your question?
HDMI-1-0 disconnected (normal left inverted right x axis y axis) and graphic driver does not show audio is supported hdmi is plugged but no valid ELD state.Generic { control.1 { iface CARD name 'HDMI/DP,pcm=3 Jack' value true comment { access read type BOOLEAN count 1 } } control.6 { iface PCM device 3 name ELD value '' comment { access 'read volatile' type BYTES count 0 } }
LVDS1 EDID: 00ffffffffffff004ca3414d00000000 00120103801a10780a87f594574f8c27 27505400000001010101010101010101 010101010101121b0049502036301030 130005a3100000190000000f00000000 00000000002387026400000000fe0053 414d53554e470a2020202020000000fe 00313231415430392d4830310a20001e seem not your hdmi monitor as no audio supported Manufacturer: SEC Model 4d41 Serial Number 0 Made week 0 of 2008 EDID version: 1.3 Digital display Maximum image size: 26 cm x 16 cm Gamma: 2.20 Supported color formats: RGB 4:4:4, YCrCb 4:2:2 First detailed timing is preferred timing Established timings supported: Standard timings supported: Detailed mode: Clock 69.300 MHz, 261 mm x 163 mm 1280 1296 1344 1353 hborder 0 800 801 804 854 vborder 0 -hsync -vsync Manufacturer-specified data, tag 15 ASCII string: SAMSUNG ASCII string: 121AT09 Checksum: 0x1e (valid)
Sorry if I seem slow. The card is OFF, no HDMI monitor attached. This is the interesting case, no?
I guess that would be the built-in screen in the laptop, then? This has no audio. There are built-in speakers in the laptop.
http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=include/control.h;hb=HEAD TLV_DB_GAIN_MUTE -9999999 it is strange that the virtual master playback volume has min dB -99999.99 but dB of slaves (e.g. headphone and speaker only have -95.25dB) pulseaudio min_dB=-100146 which is even less than SND_CTL_TLV_DB_GAIN_MUTE D: [pulseaudio] alsa-mixer.c: Removing path 'analog-output' as it is a subset of 'analog-output-speaker'. D: [pulseaudio] alsa-mixer.c: Available mixer paths (after tidying): D: [pulseaudio] alsa-mixer.c: Path Set 0x80e19b8, direction=1 D: [pulseaudio] alsa-mixer.c: Path analog-output-speaker (Speakers), direction=1, priority=100, probed=yes, supported=yes, has_mute=yes, has_volume=yes, has_dB=yes, min_volume=0, max_volume=127, min_dB=-100146, max_dB=0 MID { control.1 { iface MIXER name 'Headphone Playback Volume' value.0 127 value.1 127 comment { access 'read write' type INTEGER count 2 range '0 - 127' dbmin -9525 dbmax 0 dbvalue.0 0 dbvalue.1 0 } } control.3 { iface MIXER name 'Speaker Playback Volume' value.0 0 value.1 0 comment { access 'read write' type INTEGER count 2 range '0 - 127' dbmin -9525 dbmax 0 dbvalue.0 -9525 dbvalue.1 -9525 } } control.15 { iface MIXER name 'Master Playback Volume' value 0 comment { access 'read write' type INTEGER count 1 range '0 - 127' dbmin -9999999 dbmax 0 dbvalue.0 -9999999 }
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/patch_sigmatel.c?id=de8c85f7840e5e29629de95f5af24297fb325e0b the original code seem apply to real master volume control of sigmatel codecs and not virtual master playback volume control https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/patch_sigmatel.c?id=a74ccea51d4314632a81d568d59bf885e5b09d93
is this normal when you turn off one of the slaves of the combine-sine as you use combine-sink ? is it impossible for module-switch-on-port-available to switch from combin-sink to the still available slave ?
Sequence: -Check status of hardware in pavucontrol: --Cedar HDMI Audio [Radeon HD 5400/6300 Series]: Analog stereoduplex --Built-in audio: Anaolg stereoduplex -Exit pavucontrol -Turn off hardware -Start pavucontrol -It waits for pulseaudio forever Reboot -Turn discrete card off in pavucontrol: --Cedar HDMI Audio [Radeon HD 5400/6300 Series]: Off --Built-in audio: Anaolg stereoduplex -Exit pavucontrol -Turn off hardware -Start pavucontrol -Seems to work Note that even in the later case, sound-playing programs hang for quite some time before playing the sound, and pulseaudio itself becomes [defunct] if killed, and won't respawn.
[ 9.678269] [drm] Connector 1: [ 9.678272] [drm] HDMI-A-1 [ 9.678275] [drm] HPD1 did the system log show the graphic driver got your HDMI monitor 's EDID before snd-hda-Intel was loaded ?
--Cedar HDMI Audio [Radeon HD 5400/6300 Series]: Analog stereoduplex your HDMI support playback only , not duplex (no cpature) did you not remove module-combine-sink from default.pa ? APLAY **** List of PLAYBACK Hardware Devices **** card 0: MID [HDA Intel MID], device 0: 92HD81B1X5 Analog [92HD81B1X5 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0 ARECORD **** List of CAPTURE Hardware Devices **** card 0: MID [HDA Intel MID], device 0: 92HD81B1X5 Analog [92HD81B1X5 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0
The two choices I have in pavucontrol is "Analog stereoduplex" and "Off" No I did not remove module-combine-sink from default.pa, it is not present in any file in /etc/pulse.
D: [pulseaudio] module-gconf.c: Loading module 'module-combine' with args '' due to GConf configuration. W: [pulseaudio] module.c: [1mmodule-combine is deprecated: Please use module-combine-sink instead of module-combine![0m W: [pulseaudio] module-combine.c: [1mWe will now load module-combine-sink. Please make sure to remove module-combine from your configuration.[0m D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event. I: [pulseaudio] module-device-restore.c: Restoring mute state for sink combined. I: [pulseaudio] sink.c: Created sink 2 "combined" with sample spec s16le 2 kan. 44100 Hz and channel map front-left,front-right I: [pulseaudio] sink.c: device.class = "filter" I: [pulseaudio] sink.c: device.description = "Simultaneous Output" I: [pulseaudio] sink.c: device.icon_name = "audio-card" I: [pulseaudio] source.c: Created source 3 "combined.monitor" with sample spec s16le 2 kan. 44100 Hz and channel map front-left,front-right I: [pulseaudio] source.c: device.description = "Monitor of Simultaneous Output" I: [pulseaudio] source.c: device.class = "monitor" I: [pulseaudio] source.c: device.icon_name = "audio-input-microphone" : [pulseaudio] module-suspend-on-idle.c: Sink combined becomes busy, resuming. D: [pulseaudio] sink.c: Suspend cause of sink combined is 0x0000, resuming D: [pulseaudio] module-stream-restore.c: Not restoring device for stream sink-input-by-media-role:filter, because already set to 'alsa_output.pci-0000_01_00.1.hdmi-stereo'. D: [pulseaudio] module-intended-roles.c: Not setting device for stream Simultaneous output on Cedar HDMI Audio [Radeon HD 5400/6300 Series] Digital Stereo (HDMI), because already set.
The combine sink is being loaded by module-gconf, which is controlled by paprefs.
Yes, I did understand that, eventually. I turned that off this morning and now I have "Stereo output" or whatever, and "Off" to choose from. While I doubt this has any effect on the bug, I'll redo the test tonight, or when I get the time.
Created attachment 95143 [details] gdb-pulseaudio-2.log
Appears to fix the issue. No freeze, no crash. Thanks, guys. Complicated, this: Dual cards. Turn one off. Play a sound. Pulseaudio freezes. Turns out it is a configuration error: The combined sink cannot handle removing hardware, if I understand this correctly. I did already check for /etc, ~/.pulse and dconf mis-configuration. Repeatedly. For a long time, removing .pulse seemed to fix the issue for the next login. But at the time I had all sorts of problems even booting the machine (a race condition in the two graphics drivers, which is gone now). I didn't think to look for gconf mis-configuration. Besides, I wouldn't have known to remove combine-sink, it was not obvious to me this would have any effect, even when I got the advice from you. Will you write this as user error, or will you try to fix the issue? I mean, it is still there, because I see this as a workaround. Anyhow, I can use the system now, which is great.
(In reply to comment #25) > Appears to fix the issue. No freeze, no crash. Thanks, guys. > > Complicated, this: Dual cards. Turn one off. Play a sound. Pulseaudio > freezes. Turns out it is a configuration error: The combined sink cannot > handle removing hardware, if I understand this correctly. That's not correct - module-combine-sink does handle removing hardware (I just verified this myself - works fine). This sounds like a sound card driver bug that is somehow triggered by module-combine-sink. When I asked to check with gdb where pulseaudio is hanging, I meant getting a backtrace, which would then probably show that it's some alsa call that is hung. (Sorry for not being more responsive, I don't have much time for engaging with bug reports.)
Yes, I would have provided a backtrace, but it seems pulseaudio does not react to SIGINT. Nor to SIGKILL. I'll try again during the weekend, but don't hold your breath.
Does not respond to SIGINT when it has hung, I mean.
I wonder if attaching to the hung process from outside (with gdb -p `pidof pulseaudio`) would work better?
Good point, I'll try that. And for what it's worth, I'm completely happy with the responsiveness of the bug tracking here.
Nope, no response. Loads symbols, and reports three LWP items. Then completely unresponsive, debugger hung too.
Do you mind if I close this bug with the assumption that this is a bug in the kernel driver of the sound card?
Well, no, because my system is now usable (but the sound indicator is still missing, haven't found how to re-enable that). On the other hand, perhaps I should file a bug report on the driver. Any advice on that?
You can send mail to the alsa-devel mailing list. Attach or link to the alsa-info.sh output in your bug report. I'm closing this bug now.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.