8

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:

  1. Figure out if channel(s) are muted. I used alsamixer and also checked the pavucontrol, 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.

  2. 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 :D

  1. 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 of alsa-tools repo and it provided me with a GUI. This utility writes the pin modifications to user_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
  1. 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 the ALC269 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.

10
  • 1
    Can you recall what kernel versions did you test? It seems this card is problematic on older kernels. I would suggest you try kernel 5.3 or higher. I found some ALC298 fixes here.
    – BlueManCZ
    Apr 11, 2020 at 22:28
  • @BlueManCZ sure I'm on linux56 right now and have tried since linux54 was out as the current months ago... I'm not sure if user_pin_configs are even applied by the kernel. If i could verify they are applied indeed, then I can just brute-force the pin combos. Sure it takes time and is painful, but it may work. How can i verify current pin values after setting the user_pin_configs and rebooting?
    – Jackson
    Apr 12, 2020 at 7:35
  • 1
    Also interesting to note, i found somewhere that 0x18 can be reconfigured as headphones. I did try that, but it did not work which only raised my suspicion that user_pin_configs are not applied after reboot. So really need a way to verify current pin values
    – Jackson
    Apr 12, 2020 at 7:48
  • 2
    also using hda-verb utility and issuing a VREF change on 0x1a pin to change it from default HREZ (or whatever value it is) to 50, 80 or 100 fixes the headphones. For a while i wrote a systemd file to issue this command at startup, but eventually it stopped working (what a hack!!). I was hoping someone knowledgeable enough could point me in the right direction and I'd eventually make a patch for this chip.
    – Jackson
    Apr 12, 2020 at 11:07
  • 2
    Another user and I reported a kernel bug bugzilla.kernel.org/show_bug.cgi?id=207423
    – hpcmmp
    Apr 24, 2020 at 5:35

4 Answers 4

3

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

2

On elementaryOS (based on Ubuntu 20.04) no sound on my MacBook Pro 2012 was fixed by editing the configuration file by sudo vim /etc/modprobe.d/alsa-base.conf and replacing

options snd-hda-intel model=generic

by

# options snd-hda-intel model=generic
options snd-hda-intel probe_mask=1

Further explanatory details:

Note: I am not sure why the no sound issue ever occured or what had changed before, since it had been working at first after the installation.

However, quering pacmd list-cards in Terminal, the output changed from (before fix) :

ports:
    analog-input-mic: Mikrofon (priority 8700, latency offset 0 usec, available: unknown)
        properties:
            device.icon_name = "audio-input-microphone"
    analog-output-speaker: Lautsprecher (priority 10000, latency offset 0 usec, available: unknown)
        properties:
            device.icon_name = "audio-speakers"
    analog-output-headphones: Kopfhörer (priority 9900, latency offset 0 usec, available: no)
        properties:
            device.icon_name = "audio-headphones"
    iec958-stereo-output: Digitalausgang (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
        properties:

to (after fix) :

ports:
    [Out] Speaker: Speaker (priority 100, latency offset 0 usec, available: unknown)
        properties:
            
    [Out] Headphones: Headphones (priority 200, latency offset 0 usec, available: no)
        properties:
            
    [In] Mic2: Headphones Stereo Microphone (priority 200, latency offset 0 usec, available: unknown)
        properties:

(Note the difference in Syntax here.)

Also, the output of sudo vim aplay -l changed from (before fix) :

Karte 0: PCH [HDA Intel PCH], Gerät 0: Generic Analog [Generic Analog]
  Sub-Geräte: 0/1
  Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 1: Generic Digital [Generic Digital]           
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0

to (after fix) :

Karte 0: PCH [HDA Intel PCH], Gerät 0: CS4206 Analog [CS4206 Analog]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: PCH [HDA Intel PCH], Gerät 1: CS4206 Digital [CS4206 Digital]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
1
  • This fixed my non-working laptop speakers after upgrading from 22.04 to 22.10 on a MBA 2012. Thank you! I hate that I had to do this to get sound after an upgrade — hardly touched the OS for months because of it...
    – Andreas
    Jan 29 at 3:04
0

So problem here is the ALC298 from Realtek has a different bus requirement which is I2S. As of linux56 I2S audio codec is not supported and this seems to be the new standard. Lenovo, Samsung and Huawei seem to use sound cards with this new I2S standard and there are a lot of unsolved threads/topics I've found abandoned regarding this matter.

I found a workaround to fix the headphones which worked for me and one other person who was using a Samsung Notebook Pro 9. The solution uses a kernel feature called "Early Patching" to optionally override the default pins, verbs, model and other ALSA specific attributes. You can find complete information including an alternative custom kernel patch on Arch Linux Forums.

0

Try these instructions in below. Since they could fix the similar issue on my system.

  1. You run the command of "aplay", but hear nothing. How about run the command of "sudo aplay"? If ALSA is working, you could hear the sound.

  2. I think that pulseaudio is running in system in your system. But there may be some compatible issues between alsa-lib and snd-hda-intel driver.

    $pacmd list-cards

Check the results on "ports". If you can't see something related to speaker, it means sound card can't be recognized by pulseaudio.

  1. Edit "/usr/share/alsa/ucm2/HDA-Intel/HDA-Intel.conf" file. If you see an empty string after "Define.Use", just input "3" into the string. Then save it.

  2. Reboot your machine. If you still can't get any sound, check whether it's "Dummy Output" as your sound card. If so, add "options snd-hda-intel model=generic" to the end of "/etc/modprobe.d/alsa-base.conf".

This issue is mainly caused by "HDA-Intel.conf". I really don't understand why developer keep "Define.Use" string as empty.

2
  • "options snd-hda-intel probe_mask=1" works better on my dell laptop. Otherwise, I'll suffer endless reset on codec.
    – cain345
    Jun 10, 2021 at 12:35
  • I found an easy way to fix the issue without using UCM. Enter "/usr/share/pulseaudio/alsa-mixer/profile-sets" directory, and rename "B-default.conf" to "B-default.conf.old". Then create a symbol link from "default.conf" to "B-default.conf". At last, restart pulseaudio. The issue should be fixed now.
    – cain345
    Jun 11, 2021 at 1:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .