This guide details the process to resolve the lack of sound from the internal speakers on the Lenovo Legion Pro 7 16IRX9H notebook running NixOS. The issue occurs because the default audio driver (snd_hda_intel
) fails to correctly initialize the amplifiers for the Realtek ALC287 codec present in this hardware.
The solution involves applying a specific firmware patch declaratively, leveraging the robustness of NixOS.
Thanks to Felipe "Noksys" Lalli for debugging and documenting the solution in his NixOS configuration repository, noksys/genoc.