hp Z240 SFF sound configuration redux

summary

This is all the configuration required, on Linux 6.0.0-6-amd64 on an hp Z240 SFF PC. Put these lines in /etc/modprobe.d/snd_hda_intel.conf and reboot.

options snd_hda_intel model=alc221-hp-mic
options snd_hda_intel power_save=0

options snd_hda_intel power_save_controller=N
options snd_hda_intel enable_msi=1

# /etc/modprobe.d/snd_hda_intel.conf

problems

With enable_msi set to 0 (the default), while happily playing sound for a random indeterminate period of time, the sound system would lose grip and leave me with nothing but buzzing in the headphones, and only a reboot would return things to normal. Sometimes, unloading and reloading the sound modules did the trick, but often things would be stuck waiting for the hardware to return to normal, which it had no intention of doing. Enabling Message Signalled Interrupts avoids this problem.

power-saving mode

Sometimes the sound will play for a fraction of a second, and then immediately change to static noise on the headphones. The fact that this happens at the start of playback, presumably just after the sound hardware has been brought out of power-saving mode, points towards disabling power-saving to be the way forwards. There are two parameters related to power, and they are both recommended, even though they will not be applicable to all hardware.

options snd_hda_intel power_save=0
options snd_hda_intel power_save_controller=N

references

Leave a Reply

Your email address will not be published. Required fields are marked *