Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Samsung Galaxy Book2 Pro 360 no sound through speaker #4055

Open
datmischa opened this issue Jul 6, 2022 · 145 comments
Open

[BUG] Samsung Galaxy Book2 Pro 360 no sound through speaker #4055

datmischa opened this issue Jul 6, 2022 · 145 comments
Labels
bug Something isn't working

Comments

@datmischa
Copy link

Describe the bug
On my Galaxy Book2 Pro 360, there is no audio output through the internal speakers. Audio works fine with headphones (wired as well as bluetooth), could not test over usbc - displayport cable yet, but guessing this works too. If I play some test sound through speaker-test, I can see the indicator in the plasma-pa applet moving.
I tested the internal microphone with arecord, it works as well.

What have you tried to diagnose or workaround this issue?
Installed mainline kernel (5.19-rc5) and sof-firmware 2.2 with no effect.

To Reproduce
Installed / booted various Linux derivates (Gentoo, Arch, Void, Ubuntu, Fedora) with the same outcome.

Reproduction Rate
100% of the time.

Expected behavior
Sound is playing through internal speakers

Impact
deal breaker, no sound on the go

Environment

  1. Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).

  2. Name of the topology file:
    Topology: ABI 3:22:1 Kernel ABI 3:21:0 (dmesg output)

  3. Name of the platform(s) on which the bug is observed.

    • Platform: ARCH (and derivates), Gentoo, Fedora, Ubuntu

dmesg
dmesg_grep_sof.txt
dmesg.txt

sof-logger
freezes my system

alsa-info.txt

@datmischa datmischa added the bug Something isn't working label Jul 6, 2022
@plbossart
Copy link
Member

This is likely a codec and amplifier issue, see suggestions to double-check if this also happens with the legacy HDaudio driver.

https://thesofproject.github.io/latest/getting_started/intel_debug/suggestions.html#disable-sof-on-pci-hdaudio-devices-to-test-audio-playback

@datmischa
Copy link
Author

I finally got my speakers working.

Steps to reproduce
/etc/pulse/default.pa
#load-module module-suspend-on-idle
and run the script (credits to drlucas from manjaro.org)
https://pastebin.com/raw/zsXp2vz6

I have to rerun the script every time I restart/wake the PC from sleep.
What would be the appropriate place to get this script implemented into the kernel/driver/firmware, so that this hack does not have to be used?

@lgirdwood
Copy link
Member

lgirdwood commented Jul 11, 2022

@datmischa thanks for posting the script, GH has mangled the URL but it works if copy and pasted.

I've pasted the top of the script below and it looks like its the same verbs being modified over and over. Are you able to reduce this script to a minimum set of verb writes ? Once the minimum verbs are known it should be possible to patch the drivers.

#!/bin/bash

sudo hda-verb /dev/snd/hwC0D0 0x1a SET_PIN_WIDGET_CONTROL 0x5
sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0x2b
sudo hda-verb /dev/snd/hwC0D0 0x20 0xc00 0x0
sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0x2b
sudo hda-verb /dev/snd/hwC0D0 0x20 0x40c 0x10
sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0x3
sudo hda-verb /dev/snd/hwC0D0 0x20 0x400 0x42
sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0x5
sudo hda-verb /dev/snd/hwC0D0 0x20 0x42b 0xe0
sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0x8
sudo hda-verb /dev/snd/hwC0D0 0x20 0x42f 0xcf
sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0xe
sudo hda-verb /dev/snd/hwC0D0 0x20 0x46f 0x80
sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0xf
sudo hda-verb /dev/snd/hwC0D0 0x20 0x400 0x62
sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0x10
sudo hda-verb /dev/snd/hwC0D0 0x20 0x40e 0x21
sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0x11
sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0x19
sudo hda-verb /dev/snd/hwC0D0 0x20 0x400 0x17
sudo hda-verb /dev/snd/hwC0D0 0x20 0x500 0x2b
sudo hda-verb /dev/snd/hwC0D0 0x20 0x40c 0x10

Fwiw verb 0x500 looks like it could be a volume ramp (and maybe some others could be too).

@F0xedb
Copy link

F0xedb commented Aug 21, 2022

Hi @lgirdwood,

I'm able to replicate the verbs working on the Galaxy Book 2 Pro 360.

Since the original Author is not replying I might be able to assist with getting the minimal verb list to get it working.
What is the best approach to get this minimum set of verbs?

@lgirdwood
Copy link
Member

@F0xedb I think you have to use this tool to dump the needed verbs https://github.com/Conmanx360/QemuHDADump, once known they can then be upstreamed to the Linux codec driver.
@plbossart @ujfalusi @bardliao please correct me if I'm wrong.

@ghost
Copy link

ghost commented Aug 28, 2022

This issue seems to affect other Galaxy Book Models too

@joshuagrisham
Copy link

Hi!

I have the Galaxy Book2 Pro (non-360) and have similar sound issues in Linux (multiple kernels and versions of SOF).

Maybe the 360 and non-360 have some kind of difference because the verb list from that Manjaro forum post never worked for me.

However I have succeeded in using QemuHDADump to get a (very long) list of verbs that actually do work -- now I can get sound on my Book2 Pro, but I would like that we can try to fix whatever is needed in the driver/upstream to remove these little workarounds :)

@lgirdwood I don't think its an issue to get the verbs again (they are already in the file and if they are working then that is all that this script/process would get out too from what I understand) but the issue is more about trying to narrow down exactly which verbs are actually "needed".

For example the smallest I have gotten my list down to is around 1,500 lines (yikes) but have a bit of a tough time trying to narrow it down at it seems there is some kind of cache which "holds on" to the settings for a while, even after restarts. Basically once I send in the verbs that work, the sound keeps "working" even after restarts and then after several hours or a day later I find that it seems to not be working anymore.

So my question is actually now, is there an easy way to "reset" the driver/hardware cache so that I can get a faster cycle to trial-and-error which verbs are really needed and then narrow the list down? Some kind of command or anything which I can run to clear this "cache" that appears to be there?

Thank you!

@lgirdwood
Copy link
Member

@ujfalusi @bardliao any idea how to reset the HDA register cache here ?

@ujfalusi
Copy link
Collaborator

ujfalusi commented Sep 7, 2022

Once the right set of verbs identified for the device they can be integrated to sound/pci/hda/patch_realtek.c as quirk or fixup.
After that there will be no need for the script in user space.

@joshuagrisham
Copy link

Once the right set of verbs identified for the device they can be integrated to sound/pci/hda/patch_realtek.c as quirk or fixup. After that there will be no need for the script in user space.

Hi @ujfalusi this sounds great to me but still having a bit of trouble with being able to quickly test which verbs are really needed vs not. The issue is it takes some time for the cache to reset/clear so trying to narrow down 1500 verbs to just a few (5-10??) with only one attempt per day is a bit tricky 😆

I have tried a bit with using some of the sysfs files (https://www.kernel.org/doc/html/latest/sound/hd-audio/notes.html#hd-audio-reconfiguration) a bit like this:

$ systemctl --user stop pulseaudio.s*
$ sudo su
# cat /sys/class/sound/hwC0D0/init_pin_configs
0x12 0x411111f0
0x13 0x40000000
0x14 0x411111f0
0x17 0x90170110
0x18 0x04a11020
0x19 0x411111f0
0x1a 0x411111f0
0x1d 0x40630245
0x1e 0x411111f0
0x1f 0x411111f0
0x21 0x04211050
# echo 0x12 0x411111f0 > /sys/class/sound/hwC0D0/user_pin_configs
# cat /sys/class/sound/hwC0D0/user_pin_configs
0x12 0x411111f0
# echo 1 > /sys/class/sound/hwC0D0/reconfig

Every time I try to update /reconfig or /clear then everything just "freezes" and it never seems to finish.

After a while in the journal (dmesg or journalctl) I can see something like this:

[  734.517375] snd_hda_codec_realtek ehdaudio0D0: hda-codec: reconfiguring
[  968.061471] INFO: task bash:4817 blocked for more than 120 seconds.
[  968.061485]       Not tainted 5.15.0-47-generic thesofproject/sof#51-Ubuntu
[  968.061488] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  968.061491] task:bash            state:D stack:    0 pid: 4817 ppid:  4816 flags:0x00004006
[  968.061500] Call Trace:
[  968.061503]  <TASK>
[  968.061509]  __schedule+0x23d/0x590
[  968.061519]  ? call_rcu+0xe/0x20
[  968.061529]  schedule+0x4e/0xc0
[  968.061533]  schedule_timeout+0x103/0x140
[  968.061538]  ? call_rcu+0xe/0x20
[  968.061543]  ? __cond_resched+0x1a/0x50
[  968.061547]  ? __dentry_kill+0x14a/0x190
[  968.061553]  __wait_for_common+0xab/0x150
[  968.061556]  ? usleep_range_state+0x90/0x90
[  968.061567]  wait_for_completion+0x24/0x30
[  968.061573]  snd_card_free+0xa0/0xb0 [snd]
[  968.061591]  soc_cleanup_card_resources+0x2c5/0x2e0 [snd_soc_core]
[  968.061624]  snd_soc_del_component_unlocked+0x135/0x170 [snd_soc_core]
[  968.061648]  snd_soc_unregister_component_by_driver+0x3b/0x60 [snd_soc_core]
[  968.061671]  devm_component_release+0x11/0x20 [snd_soc_core]
[  968.061706]  release_nodes+0x3d/0xb0
[  968.061712]  devres_release_all+0x9b/0xd0
[  968.061717]  __device_release_driver+0x1bb/0x2a0
[  968.061724]  device_release_driver+0x29/0x40
[  968.061729]  snd_hda_codec_reset+0x2a/0x70 [snd_hda_codec]
[  968.061752]  reconfig_store+0x47/0xa0 [snd_hda_codec]
[  968.061769]  dev_attr_store+0x14/0x30
[  968.061775]  sysfs_kf_write+0x3b/0x50
[  968.061782]  kernfs_fop_write_iter+0x138/0x1c0
[  968.061788]  new_sync_write+0x114/0x1b0
[  968.061795]  vfs_write+0x1d5/0x270
[  968.061798]  ksys_write+0x67/0xf0
[  968.061802]  __x64_sys_write+0x19/0x20
[  968.061805]  do_syscall_64+0x59/0xc0
[  968.061809]  ? fput+0x13/0x20
[  968.061813]  ? filp_close+0x60/0x70
[  968.061818]  ? exit_to_user_mode_prepare+0x37/0xb0
[  968.061824]  ? syscall_exit_to_user_mode+0x27/0x50
[  968.061828]  ? __x64_sys_close+0x11/0x50
[  968.061833]  ? do_syscall_64+0x69/0xc0
[  968.061836]  ? do_syscall_64+0x69/0xc0
[  968.061838]  entry_SYSCALL_64_after_hwframe+0x61/0xcb
[  968.061845] RIP: 0033:0x7f4b9db8da37
[  968.061850] RSP: 002b:00007fff3ab56e38 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[  968.061856] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f4b9db8da37
[  968.061858] RDX: 0000000000000002 RSI: 00005589c83bfc40 RDI: 0000000000000001
[  968.061860] RBP: 00005589c83bfc40 R08: 00007f4b9dc4a460 R09: 000000007fffffff
[  968.061862] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
[  968.061864] R13: 00007f4b9dc93780 R14: 00007f4b9dc8f600 R15: 00007f4b9dc8ea00
[  968.061868]  </TASK>

But then again maybe I am trying to go about this totally wrong. 😆 So I guess back to my earlier question, is there a (relatively) easy way to reset the HDA verbs so that I can try to test different sets of verbs and narrow down the list so we can figure out what needs to be included in the fixup?

Thanks again!

@lgirdwood
Copy link
Member

Hi @ujfalusi this sounds great to me but still having a bit of trouble with being able to quickly test which verbs are really needed vs not. The issue is it takes some time for the cache to reset/clear so trying to narrow down 1500 verbs to just a few (5-10??) with only one attempt per day is a bit tricky

Yeah, this sounds painful. Fwiw a lot of these 1500 could be volume ramps i.e. to prevent loud pops. I would check the verb list for writes of increasing values to the same verb ID and just use the last write for that verb. This should speed things up (but will pop atm). There may be increasing value writes to multiple verb IDs (e.g. for L/R spk or HP).

@Itaig10
Copy link

Itaig10 commented Sep 28, 2022

@joshuagrisham I am struggling with extracting the needed verbs with the non 360 model, can you please upload somewhere the list of the verbs? thanks!

@majosamaso
Copy link

I have the same 360 laptop and I tried months ago get a patch to solve speaker problems in kernel bugzilla https://bugzilla.kernel.org/show_bug.cgi?id=216023

Unfortunately, there is multiple issues like the big quantity of verbs needed to make it work, being unable to use snd-hda-intel early patching and even then, only the left speaker works. Only both work if you try initialize from windows and reset to linux.

The audio configuration carries until the computer is fully shutdown, reset isn't enough to clean state of audio card

@joshuagrisham
Copy link

Hi @Itaig10 I just threw my list into pastebin so you can see if you like here: https://pastebin.com/45ksYAXX

Just to state again, this list I got by using the QEMU method to actually run a new Windows instance using QEMU from within Linux, then inside of Windows, installing the soundcard drivers, playing audio from the virtual Windows environment (which worked!), and capturing the verbs using some combination of tools and processes that were linked in some of the other threads.

I have done some debugging the last few days with adding a sleep delay to each line with this file and found that the exact line which "turns on" left speaker is line 2249 and then the right speaker "turns on" at line 3857

Both happen exactly when this value is sent:

hda-verb /dev/snd/hwC0D0 0x20 0x4b0 0x11

But it is a bit strange, it seems almost like a sequence which needs to be preceded by something else. I have looked a bit to see what patterns seem to exist and have used meld to try and find what is really "different" between when the left speaker turns on and the right speaker turns on, and the best I could find is this:

At the beginning of the file seem to be some kind of ramps and other things happening which I have not quite fully figured out, but once you get somewhere past line 500-600 or so then there seems to be basically a "left speaker" sequence which turns the left on, followed by a "right speaker" sequence which turns the right on. These two "sides" (approx. 1600 lines each) seem to be almost exactly identical except I found a small sequence that seems to be unique for each one.

For the "left side" it happens between line 2173 and line 2182 in my file

hda-verb /dev/snd/hwC0D0 0x20 0x500 0x23
hda-verb /dev/snd/hwC0D0 0x20 0x423 0xa6
hda-verb /dev/snd/hwC0D0 0x20 0x400 0x0
hda-verb /dev/snd/hwC0D0 0x20 0x400 0x64
hda-verb /dev/snd/hwC0D0 0x20 0x4b0 0x11
hda-verb /dev/snd/hwC0D0 0x20 0x500 0x23
hda-verb /dev/snd/hwC0D0 0x20 0x423 0xa6
hda-verb /dev/snd/hwC0D0 0x20 0x400 0x0
hda-verb /dev/snd/hwC0D0 0x20 0x400 0x64
hda-verb /dev/snd/hwC0D0 0x20 0x4b0 0x11

Followed eventually as said that on line 2249 the speaker turns on.

And then for the "right side" it is between line 3672 and 3680 of my file:

hda-verb /dev/snd/hwC0D0 0x20 0x423 0x91
hda-verb /dev/snd/hwC0D0 0x20 0x400 0x0
hda-verb /dev/snd/hwC0D0 0x20 0x400 0x3
hda-verb /dev/snd/hwC0D0 0x20 0x4b0 0x11
hda-verb /dev/snd/hwC0D0 0x20 0x500 0x23
hda-verb /dev/snd/hwC0D0 0x20 0x423 0x91
hda-verb /dev/snd/hwC0D0 0x20 0x400 0x0
hda-verb /dev/snd/hwC0D0 0x20 0x400 0x3
hda-verb /dev/snd/hwC0D0 0x20 0x4b0 0x11

And then the speaker turns on at line 3857.

I have tried to do a bit what @lgirdwood suggested and try to take the max value from what seem like various ramps, then take these two different sequences plus some group of the sequence before the speakers "turns on" -- few attempts so far but still no dice as of yet. If I push the whole file in, then I have sound and that is great! But does not feel super close yet to identifying actually which verb values are needed, and to pinpoint what would need to be fixed in the kernel...

Also as a small aside, my perception is that even after all of this, the right side speaker is slightly quieter than the left side.. if I drag the balance slider a bit towards the right then I feel like I get a bit more "balanced" sound.

Since this is a very part-time "hobby" for me (meaning that my time is usually a bit limited!), my hope is that someone can maybe pick up from what I have here and we can find a way forward together somehow! 😎

@drewdrew0
Copy link

So - the verbs that @joshuagrisham posted here saved me. I have the Galaxy Book2 Pro Arc graphics version (NP950XEE), and none of the other fixes or verbs from the various forums worked at all. So here's my question:

I noticed when it first worked, as others here do, that the right-side volume was about 10% less. No biggie at all. But during testing, I shutdown to reset, confirmed I had no sound, then re-ran the verbs, getting sound again. But this time the right-side was like 50% quieter. Is it possible these verbs are altering the volume, and leaving the right slightly lower each time it runs - Has anyone else noticed this? And if so, does it reset ever, when, how?

In the meantime, I am going to apply these verbs only when necessary (as opposed to installing as a service as planned), and cross my fingers that there are some updates on this issue/thread... Cause I tried to go down the QEMU route myself, and got endlessly stuck, so you all are better men than me ;)

@mkdolan
Copy link

mkdolan commented Nov 27, 2022

I am also having the same exact issue with the non-360 Galaxy Book2 Pro with Ubuntu 22.04 with all the latest package and kernel updates. Bluetooth or headphone audio works fine, but nothing from the speakers. If there's anything I can do to help run a test, or provide any outputs, just let me know.

@grovera-md
Copy link

I am also having the same issue with my Samsung Galaxy Book 2 Pro 360 running Linux Mint 21 Cinnamon (Kernel: 5.15.0-53-generic).
System information data:
Audio:
Device-1: Intel Alder Lake PCH-P High Definition Audio vendor: Samsung Co
driver: sof-audio-pci-intel-tgl
Sound Server-1: ALSA v: k5.15.0-53-generic running: yes
Sound Server-2: PulseAudio v: 15.99.1 running: yes
Sound Server-3: PipeWire v: 0.3.48 running: yes

I hope that a fix will be available soon

@lgirdwood
Copy link
Member

@bardliao anyone from Realtek that should be added here? I think Realtek are the only folks who can solve the codec/amp config.

@bardliao
Copy link
Collaborator

@bardliao anyone from Realtek that should be added here? I think Realtek are the only folks who can solve the codec/amp config.

[email protected], but I can't remember his github account.

@plbossart plbossart transferred this issue from thesofproject/sof Nov 30, 2022
@tencnivel
Copy link

same problem for me (non 360)

[soso@pc1234 ~]$ inxi -A
Audio:
  Device-1: Intel Alder Lake PCH-P High Definition Audio
    driver: sof-audio-pci-intel-tgl
  Sound API: ALSA v: k6.0.10-300.fc37.x86_64 running: yes
  Sound Server-1: PipeWire v: 0.3.61 running: yes
[soso@pc1234 ~]$ uname -a
Linux pc-131.home 6.0.10-300.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Nov 26 16:55:13 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

@TompeHarshavardhan
Copy link

TompeHarshavardhan commented Dec 2, 2022

I am also having the same exact issue with the non-360 Galaxy Book2 Pro

Audio:
  Device-1: Intel Alder Lake PCH-P High Definition Audio
    driver: sof-audio-pci-intel-tgl
  Sound Server-1: ALSA v: k5.15.0-56-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
uname -a
Linux Harshs-Galaxybook 5.15.0-56-generic #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

@t-trmg
Copy link

t-trmg commented Dec 28, 2022

Just another +1 to having this issue with a Samsung Galaxy Book2 Pro 360 (NP950QED-KA1US). Just installed Ubuntu 20.04 and fully updated said install via apt update && apt dist-upgrade.

Output from 'lspci -kvv'

00:1f.3 Multimedia audio controller: Intel Corporation Alder Lake PCH-P High Definition Audio Controller (rev 01)
	DeviceName: Onboard - Sound
	Subsystem: Samsung Electronics Co Ltd Device c1ac
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 32, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 187
	IOMMU group: 13
	Region 0: Memory at 601d190000 (64-bit, non-prefetchable) [size=16K]
	Region 4: Memory at 601d000000 (64-bit, non-prefetchable) [size=1M]
	Capabilities: [50] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
		Status: D3 NoSoftRst+ PME-Enable+ DSel=0 DScale=0 PME-
	Capabilities: [80] Vendor Specific Information: Len=14 <?>
	Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
		Address: 00000000fee00a38  Data: 0000
	Kernel driver in use: sof-audio-pci-intel-tgl
	Kernel modules: snd_hda_intel, snd_sof_pci_intel_tgl

Output of inxi -A

Audio:
  Device-1: Intel Alder Lake PCH-P High Definition Audio driver: sof-audio-pci-intel-tgl
  Sound Server-1: ALSA v: k5.15.0-56-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes

Output of uname -a

Linux GalaxyBook2 5.15.0-56-generic #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

@t-trmg
Copy link

t-trmg commented Dec 28, 2022

@joshuagrisham your perception is not wrong. Looks like running through the verb list you shared on Oct 16 also works for me, and as you observed the left channel is noticeably quieter. It seems if I adjust balance to the left about 1/3rd-ish of the way between center and full left it sounds even.

@t-trmg
Copy link

t-trmg commented Dec 28, 2022

@bardliao anyone from Realtek that should be added here? I think Realtek are the only folks who can solve the codec/amp config.

[email protected], but I can't remember his github account.

If my sleuthing is correct, it is @KailangYang. Hopefully I am correct. 😁.

@influenist
Copy link

Hi guys, same issue here with the xiaomi notebook pro x 15 (ALC 298). Sound only coming from 2 speakers out of 4, with 20%. Rear ones don't get any sound at all.

http://alsa-project.org/db/?f=e4477f3727b1df458e1647d10a48cba2f94b2112

@hamfirst
Copy link

hamfirst commented Feb 21, 2023

Can confirm that the verbs by joshuagrisham get audio working on Linux on the Galaxy Book 3 Pro 360

@wcota
Copy link

wcota commented Apr 8, 2023

I have the Samsung NP950XEE-XA1BR model with ALC298 and the verbs by @joshuagrisham worked fine for the left speaker. However, the right one is very low. It was an improvement since nothing else worked. It would be great to fix this and have both speakers working similarly!

I noticed when it first worked, as others here do, that the right-side volume was about 10% less. No biggie at all. But during testing, I shutdown to reset, confirmed I had no sound, then re-ran the verbs, getting sound again. But this time the right-side was like 50% quieter. Is it possible these verbs are altering the volume, and leaving the right slightly lower each time it runs - Has anyone else noticed this? And if so, does it reset ever, when, how?

I noticed the same thing in mine, @drewdrew0!

@emilianodellacasa
Copy link

I just tried @joshuagrisham verbs on my NP958XED-KA1IT and sound is working now, even after a reboot!

I am not noticing any problem with the volumes, but I will periodically check.

Thanks!

@bardliao
Copy link
Collaborator

bardliao commented Dec 2, 2024

@Sylrelo both work on native Windows on the Windows guest, I reproduce the exact same problem Sorry, I didn't get it.
Do you mean it worked on the native Windows which is installed in the device when you got the device, but the issue can be reproduced after you installed a new Windows?

@hamfirst
Copy link

hamfirst commented Dec 2, 2024

@Sylrelo If you can't get vfio passthrough working then there's no way to get the proper information to get it working in linux. If you haven't done so, make sure you have downloaded samsung update from inside the VM and have installed all the applicable drivers so that they're in sync with your windows install. If samsung update isn't installing anything then maybe there's an issue with the VFIO passthrough config. Can you describe how you're doing the passthrough?

@Sylrelo
Copy link

Sylrelo commented Dec 2, 2024

both work on native Windows on the Windows guest, I reproduce the exact same problem Sorry, I didn't get it. Do you mean it worked on the native Windows which is installed in the device when you got the device, but the issue can be reproduced after you installed a new Windows?

@bardliao Aah sorry, the native Windows installation (dual-boot) is working well, however, for the one installed in QEMU, I reproduce the same problem as linux : sound on headphone, but not on internal speaker.

If you can't get vfio passthrough working then there's no way to get the proper information to get it working in linux. If you haven't done so, make sure you have downloaded samsung update from inside the VM and have installed all the applicable drivers so that they're in sync with your windows install. If samsung update isn't installing anything then maybe there's an issue with the VFIO passthrough config. Can you describe how you're doing the passthrough?

@hamfirst Yeah, that's what I'm scared of.
Already all drivers are installed from samsung update, for the passthrough :

Devices in the same IOMMU group as the soundcard :

00:1f.0 ISA bridge [0601]: Intel Corporation Device [8086:7e02] (rev 20)
00:1f.3 Multimedia audio controller [0401]: Intel Corporation Meteor Lake-P HD Audio Controller [8086:7e28] (rev 20)
00:1f.4 SMBus [0c05]: Intel Corporation Meteor Lake-P SMBus Controller [8086:7e22] (rev 20)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Meteor Lake-P SPI Controller [8086:7e23] (rev 20)

Added to GRUB (also tried with vfio-pci.ids) :

iommu=pt intel_iommu=on pci-stub.ids=8086:7e02,8086:7e28,8086:7e22,8086:7e23

Binding to VFIO (for each) :

echo "0000:00:1f.X" | sudo tee /sys/bus/pci/drivers/vfio-pci/bind

Note : I also blacklisted module to be sure that they are not loaded and used.

QEMU VFIO specific arguments (tried with and without x-no-mmap) :

-device vfio-pci,host=0000:00:1f.0,x-no-mmap=true \
-device vfio-pci,host=0000:00:1f.3,x-no-mmap=true \
-device vfio-pci,host=0000:00:1f.4,x-no-mmap=true \
-device vfio-pci,host=0000:00:1f.5,x-no-mmap=true

But QEMU always warn :

qemu-system-x86_64: vfio: Cannot reset device 0000:00:1f.5, no available reset mechanism.
qemu-system-x86_64: vfio: Cannot reset device 0000:00:1f.4, no available reset mechanism.
qemu-system-x86_64: vfio: Cannot reset device 0000:00:1f.0, no available reset mechanism.
qemu-system-x86_64: vfio: Cannot reset device 0000:00:1f.3, no available reset mechanism.

I guess it may be related to that, but I can't find a way to make it works.

I also noted that on the native Windows, I have a device/driver "ADI Amp Device" in the audio category, so I tried to bind it to the VM, but no changes, and it won't install it in the vm.

00:15.0 Serial bus controller [0c80]: Intel Corporation Meteor Lake-P Serial IO I2C Controller #0 [8086:7e78] (rev 20)
00:15.1 Serial bus controller [0c80]: Intel Corporation Meteor Lake-P Serial IO I2C Controller #1 [8086:7e79] (rev 20)
00:15.2 Serial bus controller [0c80]: Intel Corporation Meteor Lake-P Serial IO I2C Controller #2 [8086:7e7a] (rev 20) <- This is the ADI Amp Device as seen by Windows
00:15.3 Serial bus controller [0c80]: Intel Corporation Meteor Lake-P Serial IO I2C Controller #3 [8086:7e7b] (rev 20)

Details : Complete QEMU args

sudo qemu-system-x86_64 \
    -enable-kvm \
    -cpu host,-hypervisor,+invtsc \
    -hda win11.img \
    -m 6G \
    -smp 12 \
    -usbdevice tablet \
    -device vfio-pci,host=0000:00:1f.0,x-no-mmap=true \
    -device vfio-pci,host=0000:00:1f.3,x-no-mmap=true \
    -device vfio-pci,host=0000:00:1f.4,x-no-mmap=true \
    -device vfio-pci,host=0000:00:1f.5,x-no-mmap=true \
    -trace events=./events.txt \
    -monitor stdio \
    -display gtk,gl=on \
    -device qemu-xhci,id=xhci

@hamfirst
Copy link

hamfirst commented Dec 5, 2024

I don't see anything wrong with your setup, but I'm definitely not an expert. What ended up working for me was installing windows 11 through virtual machine manager and then taking their command line and adapting it to have the vfio config.

If you want to take a look at my startup file, it's here:
https://github.com/hamfirst/hda-tools/blob/main/startvm.sh

@raelgc
Copy link

raelgc commented Dec 15, 2024

I just got the Ultra Book4 (960xgl-xg1) and installed Ubuntu 24.04.1 (with default kernel 6.8). The necessary-verbs.sh script didn't worked for me. Can I help providing any additional info?

This was the output:

Init front left speaker (0x38)
nid = 0x20, verb = 0x500, param = 0x22
value = 0x0
nid = 0x20, verb = 0x400, param = 0x38
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x1
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0xff
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x3a
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x80
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0xe1
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x12
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x6f
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x14
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x1b
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x1
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x1d
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x1
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x1f
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0xfe
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x21
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x22
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x10
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x3d
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x5
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x3f
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x3
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x50
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x2c
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x76
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0xe
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x7c
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x4a
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x81
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x3
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0x99
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x3
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0xa4
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0xb5
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0xa5
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x1
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0xba
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x94
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x89
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
Init front right speaker (0x39)
nid = 0x20, verb = 0x500, param = 0x22
value = 0x0
nid = 0x20, verb = 0x400, param = 0x39
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x1
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0xff
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x3a
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x80
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0xe1
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x12
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x6f
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x14
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x1b
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x2
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x1d
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x2
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x1f
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0xfd
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x21
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x1
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x22
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x10
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x3d
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x5
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x3f
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x3
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x50
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x2c
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x76
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0xe
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x7c
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x4a
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x81
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x3
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0x99
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x3
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0xa4
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0xb5
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0xa5
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x1
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0xba
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x94
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x89
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
Init back left speaker (0x3C)
nid = 0x20, verb = 0x500, param = 0x22
value = 0x0
nid = 0x20, verb = 0x400, param = 0x3c
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x1
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0xff
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x3a
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x80
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0xe1
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x12
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x6f
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x14
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x1b
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x1
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x1d
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x1
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x1f
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0xfe
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x21
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x22
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x10
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x3d
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x5
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x3f
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x3
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x50
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x2c
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x76
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0xe
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x7c
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x4a
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x81
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x3
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0xba
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x8d
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x89
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
Init back right speaker (0x3D)
nid = 0x20, verb = 0x500, param = 0x22
value = 0x0
nid = 0x20, verb = 0x400, param = 0x3d
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x1
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0xff
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x3a
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x80
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0xe1
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x12
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x6f
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x14
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x1b
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x2
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x1d
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x2
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x1f
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0xfd
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x21
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x1
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x22
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x10
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x3d
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x5
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x3f
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x3
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x50
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x2c
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x76
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0xe
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x7c
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x4a
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x81
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x3
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0xba
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x8d
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x89
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
Enable front left speaker (0x38)
nid = 0x20, verb = 0x500, param = 0x22
value = 0x0
nid = 0x20, verb = 0x400, param = 0x38
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x3a
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x81
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0xff
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x1
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
Enable front right speaker (0x39)
nid = 0x20, verb = 0x500, param = 0x22
value = 0x0
nid = 0x20, verb = 0x400, param = 0x39
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x3a
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x81
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0xff
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x1
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
Enable back left speaker (0x3C)
nid = 0x20, verb = 0x500, param = 0x22
value = 0x0
nid = 0x20, verb = 0x400, param = 0x3c
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x3a
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x81
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0xff
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x1
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
Enable back right speaker (0x3D)
nid = 0x20, verb = 0x500, param = 0x22
value = 0x0
nid = 0x20, verb = 0x400, param = 0x3d
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x420, param = 0x3a
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x81
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0
nid = 0x20, verb = 0x500, param = 0x23
value = 0x0
nid = 0x20, verb = 0x423, param = 0xff
value = 0x0
nid = 0x20, verb = 0x400, param = 0x0
value = 0x0
nid = 0x20, verb = 0x400, param = 0x1
value = 0x0
nid = 0x20, verb = 0x4b0, param = 0x11
value = 0x0

@JoseFMP
Copy link

JoseFMP commented Jan 24, 2025

Same as above, Galaxy Book 4 Ultra, tried all those verbs, multiple other things, nothing worked.

@raelgc
Copy link

raelgc commented Jan 24, 2025

I even tried the QemuHDADump. But it doesn't matter if Win10 or 11 VM, I could not get sound working (correct Intel drivers installed).

I think it'd be better if we create a new issue for GB4 Ultra.

@dginhoux
Copy link

dginhoux commented Feb 9, 2025

Already try kernel 6.13 on GB4... and nothing.

@lgirdwood
Copy link
Member

lgirdwood commented Feb 14, 2025

Fwiw, some codecs have multiple GPIOs (that can be controlled by verbs to enable or disable the SPK amp) and the GPIO mappings could differ on some devices. It might be worthwhile getting the codec data sheet and to try and enable each GPIO via verb one by one (if the codec has more than 1 GPIO).

Alternatively, it could be a GPIO on the SoC - Qemu may be able to dump that mapping.

@raelgc
Copy link

raelgc commented Feb 14, 2025

@lgirdwood thank you for your suggestion, but I'm afraid that this will be a bit out of my acknowledgement. Is there any known guide for this?

@lgirdwood
Copy link
Member

lgirdwood commented Feb 14, 2025

@lgirdwood thank you for your suggestion, but I'm afraid that this will be a bit out of my acknowledgement. Is there any known guide for this?

@Kailang may be able to advise on the Realtek codec HDA verbs and how they could map to amp.

Re the Qemu advice for SoC GPIO, I would just check previous discussions here or Google, there maybe someone else who has debugged this on SoC. I would check codec 1st though.

@mrw1986
Copy link

mrw1986 commented Feb 23, 2025

@Sylrelo @bardliao @hamfirst @raelgc @JoseFMP @dginhoux @lgirdwood

Hey all, I'm a newbie to Linux, but I installed Ubuntu 24.04.1 on my Galaxy Book4 Ultra (i9, 32gb, RTX 4070) and the internal speakers are working perfectly. I also tried Kubuntu 24.04.2 (I'd like to use KDE Plasma) and the speakers are working. I'm using Wayland in both and haven't tested X11. I've been unable to get the speakers to work in any other distro. I'd prefer to use Fedora if possible, but have no clue how to use this information. Maybe someone here smarter than I can help me figure out how exactly the sound is working. I feel like this could help get the speakers working in other distros/kernels (sorry if I'm using the wrong terminology, I'm still learning).

@xcap2000
Copy link

@Sylrelo @bardliao @hamfirst @raelgc @JoseFMP @dginhoux @lgirdwood

Hey all, I'm a newbie to Linux, but I installed Ubuntu 24.04.1 on my Galaxy Book4 Ultra (i9, 32gb, RTX 4070) and the sound is working perfectly. I also tried Kubuntu 24.04.2 (I'd like to use KDE Plasma) and the sound is also working. I'm using Wayland in both and haven't tested X11. I've been unable to get the sound to work in any other distro. I'd prefer to use Fedora if possible, but have no clue how to use this information. Maybe someone here smarter than I can help me figure out how exactly the sound is working. I feel like this could help get the sound working in other distros/kernels (sorry if I'm using the wrong terminology, I'm still learning).

Same hardware, tried with Ubuntu 24.04.2 no success, I will try to reinstall and see if I can get the same results.

@dginhoux
Copy link

Don't waste your time...
It's not the distro version, it's in the kernel. I'm running Ubuntu 24.10 with kernel 6.13.4. And no sound yet

@bardliao
Copy link
Collaborator

@Sylrelo @bardliao @hamfirst @raelgc @JoseFMP @dginhoux @lgirdwood

Hey all, I'm a newbie to Linux, but I installed Ubuntu 24.04.1 on my Galaxy Book4 Ultra (i9, 32gb, RTX 4070) and the sound is working perfectly. I also tried Kubuntu 24.04.2 (I'd like to use KDE Plasma) and the sound is also working. I'm using Wayland in both and haven't tested X11. I've been unable to get the sound to work in any other distro. I'd prefer to use Fedora if possible, but have no clue how to use this information. Maybe someone here smarter than I can help me figure out how exactly the sound is working. I feel like this could help get the sound working in other distros/kernels (sorry if I'm using the wrong terminology, I'm still learning).

@mrw1986 Please share the dmesg when you use Fedora. We need to know the reason why the sound doesn't work.

@raelgc
Copy link

raelgc commented Feb 24, 2025 via email

@dginhoux
Copy link

No, only BT connected devices work at this time

@raelgc
Copy link

raelgc commented Feb 24, 2025

Yes, same here @dginhoux (and probably for all of us using Book Ultra 4)..

But my question was to @mrw1986, as the comment stated it's working.

@mrw1986
Copy link

mrw1986 commented Feb 24, 2025

@raelgc yes, the internal speakers are working. Sorry, I should have been more specific. That's why I'm wondering if there's any information I can provide everyone here such as anys logs, files, etc. to see if we can figure out why my internal speakers are working and hopefully find a solution to help others.

@raelgc
Copy link

raelgc commented Feb 24, 2025

Thanks @mrw1986! This is really interesting. I was on 24.04.1 (now 24.04.2, so kernel 6.11) and could never get it working. The only difference: I'm using Xorg (selected by default, probably due the NVidia drivers).

Wondering if you upgrade to 24.04.2 will keep it working (probably yes, but better try it in a usb live first).

@mrw1986
Copy link

mrw1986 commented Feb 24, 2025

Thanks @mrw1986! This is really interesting. I was on 24.04.1 (now 24.04.2, so kernel 6.11) and could never get it working. The only difference: I'm using Xorg (selected by default, probably due the NVidia drivers).

Wondering if you upgrade to 24.04.2 will keep it working (probably yes, but better try it in a usb live first).

I just upgraded to 24.04.2 and the speakers still work. Is there anything I can provide to you that would help figure out why my speakers work?

@raelgc
Copy link

raelgc commented Feb 24, 2025

I'd start asking you the output of:

  • lspci
  • lsmod

@mrw1986
Copy link

mrw1986 commented Feb 24, 2025

I'll provide that output shortly. Just a quick update: the internal speakers are also working when using x11. So for me it seems the display server I use doesn't matter.

@raelgc
Copy link

raelgc commented Feb 24, 2025

Yeap, same here, but in the bad way: under Wayland, it doesn't work too :D

@dginhoux
Copy link

So for the ultra it seem work but not the pro... What the difference...

@raelgc
Copy link

raelgc commented Feb 25, 2025

@dginhoux to be clear: the @mrw1986 is the first report of the internal speaker working for ultra. I searched the web and tried every single solution for Meteor Lake-P without success.

@dginhoux
Copy link

Yes me too... Already try fedora last 4 months without sound too

@lgirdwood
Copy link
Member

@dginhoux to be clear: the @mrw1986 is the first report of the internal speaker working for ultra. I searched the web and tried every single solution for Meteor Lake-P without success.

Sorry to hear this. I'm pretty sure audio is being rendered with the Intel DSP and is being sent to the codec, but we are missing something at the board design or codec configuration level to get the speaker working. On Windows, board level audio integration is usually done by OEM with full schematics and is often not shared upstream with the community (i.e. which GPIO, verb or amplifier is used to enable speaker and how it is configured). A few final things to try would be to ask Samsung support for the configuration.

@dginhoux
Copy link

Ask samsung... the compuiter will be totally died before they answer and helpus. At this time, th're releasing the book5 series.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests