hp Z240 SFF sound configuration redux


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


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


One Comment

  1. Hello, thanks for the post, I have the same workstation in the MT form factor, but they seem to have the same on-board audio chip. Could you get the combo headset jack on the front to work? With your configuration, it seems to be detected as a mic jack, but the techdet for Z240 on HP’s website specifies that the jack can be used for a combo headset.

Leave a Reply

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