I get no sound via the speakers of my Lenovo Legion 7i laptop, which alsamixer tells me is using a Realtek ALC287.
I have tried various Linux distros and kernel combinations, including Ubuntu 16.04, 18.04, and 20.04, with both the default and mainline kernels (5.7.x & 5.8.x), and Manjaro with 5.6.x, 5.7.x and 5.8.x kernels.
In each case, I made sure to disable Auto-Mute in alsamixer, and turn all volume levels to maximum. In all cases, I get no sounds from the speakers (running speaker-test, playing music, etc.). I am able to get sound via headphones and HDMI (though I believe HDMI is via a different sound card).
Also, I can see that there is some kind of sound activity occurring when I look at pavucontrol (the reddish-orange bar that indicates a sound is playing), but there is no actual sound produced from the speakers.
My alsa-info.sh results (from Manjaro on 5.6.15) are here (ignore this, newer one below):
http://alsa-project.org/db/?f=ba86fe76a9d9cf1cced56600edf82eb206a36a72
I am happy to run the script again (or any other tool) from a different distro/kernel combination, please just let me know what would be helpful.
I have already filed a bug report with that same information, but sadly the only responses have been from other people with the same issue.
What can I do to get my sound working? I am experienced with software development, but not drivers or kernel space. Willing to learn and try anything at this point.
UPDATE
alsa-info.sh using a more recent kernel:
http://alsa-project.org/db/?f=4272343a3590cc08f192f98113dedfc0418afe52
Best Answer
Partial answer:
The info you provided has a section about the codec, and that tells you that this particular codec is not recognized:
On my system, the first line says
The code for the patches that deal with the various codecs is in
/sound/pci/hda/patch_realtek.c
, at least for the relatively old kernel I use at the moment.So to get your sound working, you need to debug what's going wrong with the codec, then write a patch, and include it in the code, so everyone else with that hardware can have it working.
The codec information can be dumped with
cat /proc/asound/card*/codec\#*
. Read up on how an Intel HDA Codec works, and debug it.I recommend disabling Pulseaudio.
hda-verb
from thealsa-tools
package (at least that's how it is called on Debian) may also help.You can google datasheets for older codecs to understand how they work.