Bug 218027

Summary: No sound from monitor speakers unless snd_hda_codec_realtek is inserted before snd_hda_intel
Product: Drivers Reporter: aguertin (aguertin+kbz)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: NEW ---    
Severity: normal    
Priority: P3    
Hardware: All   
OS: Linux   
Kernel Version: Subsystem:
Regression: No Bisected commit-id:
Attachments: alsa-info.sh output from a normal boot with sound not working
alsa-info.sh output after reloading snd_hda_intel, with sound working

Description aguertin 2023-10-19 23:44:32 UTC
Created attachment 305267 [details]
alsa-info.sh output from a normal boot with sound not working

I have an Asus Pro B550M-C/CSM motherboard, which uses a Realtek ALC887-VD, and a monitor (with speakers) plugged in via DisplayPort. On booting normally, I get no sound from the monitor speakers (other sound outputs like USB or bluetooth headphones work fine).

I have found two workarounds for getting the monitor sound working:
1. rmmod snd_hda_intel && modprobe snd_hda_intel
2. ensure that snd_hda_codec_realtek is inserted before snd_hda_intel (e.g. by adding `softdep snd_hda_intel pre: snd_hda_codec_realtek` in modprobe.d)

Notably, timing does not seem to be an issue: even if snd_hda_intel is blacklisted from loading at boot, it will not work when it is loaded unless is is unloaded and loaded again or snd_hda_codec_realtek is loaded first.

This is not a recent regression - it has been happening as long as I have had the hardware (since at least late 2021).

Since it's not clear which is more useful, I am attaching two runs of alsa-info.sh - one is from a normal boot with sound not working, and the other is after running rmmod snd_hda_intel && modprobe snd_hda_intel with sound working.
Comment 1 aguertin 2023-10-19 23:45:21 UTC
Created attachment 305268 [details]
alsa-info.sh output after reloading snd_hda_intel, with sound working