Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.
Admin message
The migration is almost done, at least the rest should happen in the background. There are still a few technical difference between the old cluster and the new ones, and they are summarized in this issue. Please pay attention to the TL:DR at the end of the comment.
[regression] [bisected] display audio usually doesn't work
Boot with the display plugged in, then play audio. It doesn't work probably around 90% of the time. I can do a bunch of boots and figure out a more specific statistic if that would be helpful. When I unplug and replug the monitor, it does work.
I've bisected the changes and c3c5dc1d9224fb3e0c6a104527567090fbbae13c is the first bad commit, and more specifically it seems like removing the intel_crtc_wait_for_next_vblank calls in the codec_disable function (the hsw variants are the ones that my system uses, I believe), although I'm sure that's not the proper fix.
Definitely let me know if there is any other information that would be useful, or if there are any patches that you would like me to try.
uname -m: x86_64
uname -r : 6.6.0-rc1-00374-gdc4cd6e4e53d (drm-tip as of writing)
Distribution: Arch Linux
Machine: XPS 15 9510
Display connector: DisplayPort over Dell WD19 dock OR HDMI via type-c to HDMI cable
The log also shows some really odd behaviour. We start by driving the MST display with pipe B (and presumably that is when the audio doesn't work), but later userspace suddenly decides to switch to pipe D for whatever reason (and I guess at that point audio starts working).
What kind of userspace are you running that does this weird stuff? Can you try with a a simpler setup that wouldn't do this funny pipe switching (eg. no GUI stuff at all)?
Did you try all the audio pcm devices when audio didn't work? Not really sure how the MST stream<->pcm device association works now (it no longer seems to make any sense even with DP SST/HDMI these days).
null Discard all samples (playback) or generate zero samples (capture)lavrate Rate Converter Plugin Using Libav/FFmpeg Librarysamplerate Rate Converter Plugin Using Samplerate Libraryspeexrate Rate Converter Plugin Using Speex Resamplerjack JACK Audio Connection Kitoss Open Sound Systempipewire PipeWire Sound Serverpulse PulseAudio Sound Serverspeex Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)upmix Plugin for channel upmix (4,6,8)vdownmix Plugin for channel downmix (stereo) with a simple spacializationdefault Default ALSA Output (currently PipeWire Media Server)sysdefault:CARD=PCH HDA Intel PCH, ALC289 Analog Default Audio Devicefront:CARD=PCH,DEV=0 HDA Intel PCH, ALC289 Analog Front output / inputsurround21:CARD=PCH,DEV=0 HDA Intel PCH, ALC289 Analog 2.1 Surround output to Front and Subwoofer speakerssurround40:CARD=PCH,DEV=0 HDA Intel PCH, ALC289 Analog 4.0 Surround output to Front and Rear speakerssurround41:CARD=PCH,DEV=0 HDA Intel PCH, ALC289 Analog 4.1 Surround output to Front, Rear and Subwoofer speakerssurround50:CARD=PCH,DEV=0 HDA Intel PCH, ALC289 Analog 5.0 Surround output to Front, Center and Rear speakerssurround51:CARD=PCH,DEV=0 HDA Intel PCH, ALC289 Analog 5.1 Surround output to Front, Center, Rear and Subwoofer speakerssurround71:CARD=PCH,DEV=0 HDA Intel PCH, ALC289 Analog 7.1 Surround output to Front, Center, Side, Rear and Woofer speakershdmi:CARD=PCH,DEV=0 HDA Intel PCH, LG HDR 4K HDMI Audio Outputhdmi:CARD=PCH,DEV=1 HDA Intel PCH, HDMI 1 HDMI Audio Outputhdmi:CARD=PCH,DEV=2 HDA Intel PCH, HDMI 2 HDMI Audio Outputhdmi:CARD=PCH,DEV=3 HDA Intel PCH, HDMI 3 HDMI Audio Outputusbstream:CARD=PCH HDA Intel PCH USB Stream Outputsysdefault:CARD=Dock WD19 Dock, USB Audio Default Audio Devicefront:CARD=Dock,DEV=0 WD19 Dock, USB Audio Front output / inputsurround21:CARD=Dock,DEV=0 WD19 Dock, USB Audio 2.1 Surround output to Front and Subwoofer speakerssurround40:CARD=Dock,DEV=0 WD19 Dock, USB Audio 4.0 Surround output to Front and Rear speakerssurround41:CARD=Dock,DEV=0 WD19 Dock, USB Audio 4.1 Surround output to Front, Rear and Subwoofer speakerssurround50:CARD=Dock,DEV=0 WD19 Dock, USB Audio 5.0 Surround output to Front, Center and Rear speakerssurround51:CARD=Dock,DEV=0 WD19 Dock, USB Audio 5.1 Surround output to Front, Center, Rear and Subwoofer speakerssurround71:CARD=Dock,DEV=0 WD19 Dock, USB Audio 7.1 Surround output to Front, Center, Side, Rear and Woofer speakersiec958:CARD=Dock,DEV=0 WD19 Dock, USB Audio IEC958 (S/PDIF) Digital Audio Outputiec958:CARD=Dock,DEV=1 WD19 Dock, USB Audio #1 IEC958 (S/PDIF) Digital Audio Outputusbstream:CARD=Dock WD19 Dock USB Stream Outputusbstream:CARD=JV601 JOUNIVO JV601 USB Stream Outputusbstream:CARD=Camera HD Web Camera USB Stream Output
When the audio is working normaly, speaker-test -D hdmi:CARD=PCH,DEV=0 -c 2 works properly to generate noise. It doesn't work properly when the audio is broken (I do need to wait a few seconds after playing via mpv to wait for pipewire to not be holding the device anymore though). DEV={1,2,3} also don't play anything.
Userspace wise, I'm playing a audio stream through mpv with pipewire. I think the bug is somehow related to modechanges (or something else that starting a graphical session does). If I run mpv from a TTY on boot, it always seems to work. But if I run it in cage it doesn't work most of the time. It seems even when it does work, if I restart cage it (usually) doesn't work. So seems like there's like a chance of it breaking on every modeset or something?
It also repro's if I never start pipewire in the first place and just use speaker-test (but only after starting a GUI)
Considering speaker-test doesn't work when things are broken, it does seem like a kernel bug and not a userspace one?
I'm happy to provide some more logs of certain situations if that would be helpful. Thanks!
Attached some logs. 2vblank-notworking*.txt are from drm-tip as of a a few days ago, and 1vblank-working*.txt are from that same kernel with one of the intel_crtc_wait_for_next_vblank in hsw_audio_codec_disable commented out.
NOTE: I stripped timestamps out for diffing...I can get new ones with those back in (forgot to back them up) if that's important.
The fact that audio_fastset_2 works is good news, albeit somewhat surprising as it more or less just adds more delay between the audio disable and crtc disable. So pretty much the exact opposite of your fix to remove the extra vblank wait.
I guess pipewire provides some kind of fake alsa device which is set to be the default. Presumably you need to specify the card by hand to amixer then.
Yep, you're totally correct, passing -c 0 seems to get a working output. I have logs from 2 boots here, both from drm-tip as of today. The first one audio worked after the modeset, the second one audio didn't work after the modeset. I have amixer contents for both before and after the modeset, and dmesg logs as well.
commit 07e823c0fd991565106eff6f03892c5d645cd690Author: Ville Syrjälä <ville.syrjala@linux.intel.com>Date: Tue Nov 21 07:43:24 2023 +0200 drm/i915: Implement audio fastset
Unfortunately I don't have any good plan for stable since that patch series is rather large to comfortably backport. But I'll ponder on it a bit more perhaps.
Huh, your audio_fastset_2 continues to work well but drm-tip which has that patch series doesn't work....same symptom of good audio if I boot to a terminal and no good after starting my compositor..... tested 7bd342323d5bd405b02fd21cd78f157f363278ac
6.10.8, 6.6.49, and drm-tip @ f87cdc7bf4ab80cce53a4d300611f2d4ccc8cb86 (I can update again if you think it's changed, cgit.freedesktop is just down rn so was latest I had access to) and they all seem to have the same behavior: HDMI audio usually works when I boot to a tty, then I start my display manager which causes a modeset, then HDMI audio usually doesn't work.
Sometimes it never works, sometimes it always works tho.
I will note that my test setup has changed slighty, I now use a HDMI cable instead of a DP cable (I think the DP input on my monitor died), but the symptoms seem the same.