linux icon indicating copy to clipboard operation
linux copied to clipboard

Samsung Galaxy Book4 Pro 14" (NP940XGK) - speakers do not work

Open dgunay opened this issue 1 year ago • 43 comments

EDIT: for anyone coming across this, here is the outcome of my attempt to reverse engineer the codec configuration: https://github.com/dgunay/galaxy-book4-pro-reverse-engineering

The speakers on the Galaxy Book4 Pro 14" NP940XGK don't work out of the box on Linux. The issue seems very similar to previously reported issues with Galaxy Book2 and Book3 laptop speakers not producing sound despite seeing the volume meter move when sound is being output. #4055

I tried using many of the provided hda-verb scripts but they don't fix the problem - still no sound output.

Bluetooth headphones do work. I haven't tried using the onboard headphone jack yet.

My hunch is that the HDA verb sequence is different and needs to be recaptured for this specific device. I might give this a shot while I'm still in the return window, but it's my first time doing something like this so no promises.

dgunay avatar May 17 '24 19:05 dgunay

I presume you've looked at https://thesofproject.github.io/latest/getting_started/intel_debug/suggestions.html for the verb tables?

plbossart avatar May 17 '24 22:05 plbossart

I presume you've looked at https://thesofproject.github.io/latest/getting_started/intel_debug/suggestions.html for the verb tables?

I looked at the Reverse-engineer the Windows audio driver section yesterday while rabbit-holing in that direction but not the rest of it. I'll go through it step by step tonight.

Thank you for the very prompt response.

dgunay avatar May 17 '24 22:05 dgunay

Ran alsa-info.sh. Results: http://alsa-project.org/db/?f=6105eef8dd841227908a445246a6b2582aff57da

dgunay avatar May 18 '24 00:05 dgunay

I followed the steps outlined in Disable SOF on PCI/HDaudio devices to test audio playback. No sounds were produced, again despite the volume monitor showing movement on the output device:

image

dgunay avatar May 18 '24 00:05 dgunay

Followed the Try booting into Windows first, then reboot into Linux step. No dice. Sound works in Windows, continues to not work in Linux. I didn't expect this to work since I booted to Windows quite a bit at first to get firmware updates, but worth a shot.

dgunay avatar May 18 '24 00:05 dgunay

I'm going to save the reverse engineering step for later since the other steps look like much lower hanging fruit.

dgunay avatar May 18 '24 00:05 dgunay

For Make sure the ME is enabled - I'm not seeing any way of configuring ME in the BIOS for this laptop, and I think I remember Windows Update downloading drivers for Intel ME when I first booted the thing, so I'm going to just assume for now that I have ME and it is enabled.

dgunay avatar May 18 '24 00:05 dgunay

Tried Test at the ALSA ‘hw’ device level

I'm not totally sure what to make of the commands mentioned in the guide.

Installing the suggested packages didn't do anything. When I enabled pulseaudio, it actually broke audio in a different way (YouTube videos would no longer play in Firefox until I disabled it). Installing pulseaudio-alsa fixed that, but did not result in sound coming out of the speakers.

dgunay avatar May 18 '24 00:05 dgunay

I've done Verify mixer settings multiple times now so I'm pretty sure the mixer isn't muting my speakers.

dgunay avatar May 18 '24 00:05 dgunay

Enabled dynamic debugging and ran sudo dmesg | rg -i 'snd|sof|pci'

Maybe someone more knowledgeable than me can glean something from this: https://gist.github.com/dgunay/0eea4dc528c55d30906429e9419d8264

dgunay avatar May 18 '24 01:05 dgunay

I'm not really qualified to tell whether the SOF tracing step is necessary yet, but I have sof-logger installed now.

dgunay avatar May 18 '24 01:05 dgunay

I don't think Digital mic issues applies to me, so I'm skipping that step.

dgunay avatar May 18 '24 01:05 dgunay

Looks like my system does not have ES8336 support according to the output of alsa-info - skipping that step.

dgunay avatar May 18 '24 01:05 dgunay

I've now tried everything in the suggestions article to the best of my ability, except for the reverse engineering step. Don't know if I'll have the time to attempt that tonight, we'll see.

dgunay avatar May 18 '24 01:05 dgunay

I've run through the reverse engineering steps from https://asus-linux.org/blog/sound-2021-01-11/ now but haven't had any luck. Here are my realtek driver dumps from both windows and linux: https://gist.github.com/dgunay/3c9a326e7f653a6cb1c7d282bb41853f

I ultimately intend to return the laptop so I'm not going to be able to keep grinding this problem down. I'm hoping this at least saves someone some time down the road, or perhaps someone more knowledgeable can use this to make a patch.

Wasn't able to figure out how to reconfigure the pins and HDA verbs. I'll be cleaning up my work and pushing up a repository soon.

dgunay avatar May 20 '24 02:05 dgunay

Repository with all the dumps and some accompanying information: https://github.com/dgunay/galaxy-book4-pro-reverse-engineering

dgunay avatar May 20 '24 05:05 dgunay

Is this verb work on NT961XGK-K02/C?

I use Galaxy Book 4 Pro 16" South Korea Domestic model.

mjkim0727 avatar May 23 '24 03:05 mjkim0727

Is this verb work on NT961XGK-K02/C?

I use Galaxy Book 4 Pro 16" South Korea Domestic model.

I wasn't able to get it to work for me and I don't have the 16", but you're welcome to try it out.

dgunay avatar May 23 '24 23:05 dgunay

I use Galaxy book 3 pro 14"

I also can't get it to work using any list. Any help?

mayanksingh2298 avatar Jul 05 '24 17:07 mayanksingh2298

I also use Galaxy Book 4 Pro 16" (Europe version) Tried everything mentioned here (all hadd-verb scripts) nothing fixed, speakers always no sound, jack is ok

Please help !

mixim-mixim avatar Jul 05 '24 20:07 mixim-mixim

I have the same issue on Galaxy Book 4 Pro 14" (Europe version)

olwe1 avatar Jul 07 '24 23:07 olwe1

Hey @mixim-mixim and @olwe1,

I can confirm this list works for me: https://github.com/joshuagrisham/galaxy-book2-pro-linux/blob/main/sound/necessary-verbs.sh

I just tried this today.

Make sure your volume control looks something like this in your PulseAudioControl: image (I was setting this to ProAudio and it didn't work then)

I'm on Galaxy Book 3 Pro 14": image

mayanksingh2298 avatar Jul 08 '24 11:07 mayanksingh2298

Hey @mixim-mixim and @olwe1,

I can confirm this list works for me: https://github.com/joshuagrisham/galaxy-book2-pro-linux/blob/main/sound/necessary-verbs.sh

Unfortunatly this does not work on a galaxy book4 ... at least not for mine :(

mixim-mixim avatar Jul 08 '24 17:07 mixim-mixim

@mjkim0727 does your webcam work on your Galaxy Book 4 Pro 16" ? What linux are you using, Ubuntu ?

@mixim-mixim, what about your webcam, is it working ? which model of Galaxy Book 4 do you have ? pro/ultra 14"/16" ?

PowerKiKi avatar Jul 09 '24 02:07 PowerKiKi

@PowerKiKi my webcam is also NOT working and my model is Galaxy Book 4 Pro 360 ... Fedora 40 (latest release) ... Kernel is 6.9.x

mixim-mixim avatar Jul 09 '24 06:07 mixim-mixim

@mixim-mixim, thanks for the info. The webcam has been fixed very recently, according to https://github.com/intel/ipu6-drivers/pull/230. You might want to try that out...

PowerKiKi avatar Jul 09 '24 06:07 PowerKiKi

@PowerKiKi

Webcam isn't working at Galaxy Book 4 Pro 16"

mjkim0727 avatar Jul 09 '24 08:07 mjkim0727

@mjkim0727, it should work now if you can use https://github.com/intel/ipu6-drivers/pull/230

PowerKiKi avatar Jul 09 '24 08:07 PowerKiKi

Just realized maybe I should cross-post this here... I took a look at the RtHDDump file provided by @dgunay .. If you want I can try to help you get this working. We just finished submitting a patch that should be working for many GB2 and GB3 models and my guess is that it is quite similar for the GB4. However based on the RtHDDump files it does not seem exactly the same (different coef indexes and possibly even different speaker amp IDs ??).

Is it possible for someone to run a trace using my version of QEMU from here?
https://github.com/joshuagrisham/galaxy-book2-pro-linux/tree/main/sound/qemu

(more info here: https://github.com/thesofproject/linux/issues/4055#issuecomment-2323411911)

joshuagrisham avatar Sep 11 '24 19:09 joshuagrisham

i took a look to ur script startvm.sh ... but i miss the

qemu-system-x86_64

file ... where to get it from ?

mixim-mixim avatar Sep 12 '24 17:09 mixim-mixim