I only have a single on-board sound card which is a Realtek ALC298 and I do not have any needs for advanced sound configurations. Just a working sound system to listen to youtube videos, watch movies etc… So far I've followed many online articles. To summarize all of which I've tried:
-
Figure out if channel(s) are muted. I used
alsamixer
and also checked thepavucontrol
, both of which show no muted channels. I repeated this step when was on 3rd step (read below) and new channels did show from time to time, but ultimately no sound. -
Figure out if it's ALSA or just PulseAudio issue. So I used
aplay -l
:
**** List of PLAYBACK Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: ALC298 Analog [ALC298 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 9: HDMI 3 [HDMI 3] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 10: HDMI 4 [HDMI 4] Subdevices: 1/1 Subdevice #0: subdevice #0
From there used a PCM formatted wav file aplay -D plughw:0,0 test.wav
which gave:
Playing WAVE 'test.wav' : Signed 32 bit Little Endian, Rate 44100 Hz, Stereo
But nothing! no sound nowhere, speakers or headphones. I conculded that it's an ALSA problem and not a PulseAudio issue, but I do have a doubt as PulseAudio daemon was running throughout this step. As an interesting side note, when I was doing this step the gnome sound settings showed the sound bars moving as if something was playing 😀
- I found an article on kernel website about HDA audio and a kernel ability to dynamically reconfigure the audio codec without having to reboot the machine. I managed to find and use the
hdajackretask
utility which is part ofalsa-tools
repo and it provided me with a GUI. This utility writes the pin modifications touser_pin_configs
file (FYI verified this manually after reboot). However I could not figure out the right combination of pin reassignments. Following are the pins that can be reassigned:
0x12 0x13 0x14 0x17 0x18 0x19 0x1a 0x1d 0x1e 0x1f 0x21
- My idea here was to basically use
ALC269
model as I saw an interesting patch file when googling. Link is for rasp pi, but I figured it's worth a shot seeing theALC269
is a supported kernel HDA audio model. Although this did not change anything, perhaps someone can benefit from it.
Any help is appreciated here. I'm way beyond my linux skills.
PS: manjaro, linux56 although all distributions have the same issue with the sound card. I've installed almost every distro in the past a few months hoping sound would work.
Edit 1
Added a pastebin of alsa-info.sh
for more information.
Best Answer
Good news! A very smart Arch user by the name of ronincoder discovered a fix for the headphone jack. I worked with ronincoder to make a kernel patch [1] and our patch made it into the 5.7 kernel release! It was also applied to the 5.4 LTS kernel. I booted both 5.7.2 and 5.4.46 and the headphone jack audio is loud and clear. :)
Does it work for you? It should if you have a Samsung Notebook 9 Pro NP930SBE-K01US or NP930MBE-K04US (ronincoder's is the former, mine is the latter). You can check your laptop model by running alsa_info.sh and looking at "Board Name". The Realtek ALC298 codec in the NP930SBE-K01US and NP930MBE-K04US identifies itself with "Subsystem Id" 0x144dc169 and 0x144dc176, respectively. If snd_hda_intel sees either of these ids it implements the fix.
What about the speakers? I reported the no-sound-on-internal-speakers issue on the kernel bugzilla [2]. Linux sound maintainer Jaroslav Kysela speculates that there may be some amplifiers connected to the HDA codec which are not initialized by the BIOS, and are thus not active in Linux. He suggests dumping the codec communication for the Windows driver using QEMU. We could then parse the dump and replay the communication in Linux using Early Patching [3] or writing another kernel patch. It's been a month since Jaroslav made this suggestion and I've made some progress but I still don't have a good dump. Please join the discussion on the kernel bugzilla if you'd like to help me. ^^
[1] For reference, our patch made it into Linus' tree as commit 14425f1f521f (ALSA: hda/realtek: Add quirk for Samsung Notebook). [2] https://bugzilla.kernel.org/show_bug.cgi?id=207423 [3] https://www.kernel.org/doc/html/v4.17/sound/hd-audio/notes.html#early-patching