thesofproject / linux

Linux kernel source tree
Other
91 stars 133 forks source link

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

Open dgunay opened 6 months ago

dgunay commented 6 months ago

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.

plbossart commented 6 months ago

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

dgunay commented 6 months ago

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 commented 6 months ago

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

dgunay commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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

dgunay commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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

dgunay commented 6 months ago

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 commented 6 months ago

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

dgunay commented 6 months ago

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

dgunay commented 6 months ago

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

dgunay commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

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

mjkim0727 commented 6 months ago

Is this verb work on NT961XGK-K02/C?

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

dgunay commented 6 months ago

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.

mayanksingh2298 commented 4 months ago

I use Galaxy book 3 pro 14"

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

mixim-mixim commented 4 months ago

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 !

olwe1 commented 4 months ago

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

mayanksingh2298 commented 4 months ago

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

mixim-mixim commented 4 months ago

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 :(

PowerKiKi commented 4 months ago

@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" ?

mixim-mixim commented 4 months ago

@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

PowerKiKi commented 4 months ago

@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...

mjkim0727 commented 4 months ago

@PowerKiKi

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

PowerKiKi commented 4 months ago

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

joshuagrisham commented 2 months ago

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)

mixim-mixim commented 2 months ago

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

qemu-system-x86_64

file ... where to get it from ?

dginhoux commented 1 month ago

Hi,

i'm still, like everybody here trying and testing lot of things, but never to find a positive result.

It seem to be a big problem with all meteorlake laptop. This king of problem remember me like wit 2.2 kernel and 56k "winmodems" lol.