-
Notifications
You must be signed in to change notification settings - Fork 132
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
Comments
This is likely a codec and amplifier issue, see suggestions to double-check if this also happens with the legacy HDaudio driver. |
I finally got my speakers working. Steps to reproduce I have to rerun the script every time I restart/wake the PC from sleep. |
@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). |
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. |
@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. |
This issue seems to affect other Galaxy Book Models too |
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! |
Once the right set of verbs identified for the device they can be integrated to |
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:
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 (
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! |
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). |
@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! |
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 |
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
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:
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! 😎 |
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 ;) |
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. |
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). I hope that a fix will be available soon |
@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. |
same problem for me (non 360)
|
I am also having the same exact issue with the non-360 Galaxy Book2 Pro
|
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 Output from 'lspci -kvv'
Output of
Output of
|
@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. |
If my sleuthing is correct, it is @KailangYang. Hopefully I am correct. 😁. |
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 |
Can confirm that the verbs by joshuagrisham get audio working on Linux on the Galaxy Book 3 Pro 360 |
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 the same thing in mine, @drewdrew0! |
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! |
@Sylrelo |
@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? |
@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.
@hamfirst Yeah, that's what I'm scared of. Devices in the same IOMMU group as the soundcard :
Added to GRUB (also tried with vfio-pci.ids) :
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 :
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.
Details : Complete QEMU args
|
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: |
I just got the Ultra Book4 ( This was the output:
|
Same as above, Galaxy Book 4 Ultra, tried all those verbs, multiple other things, nothing worked. |
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. |
Already try kernel 6.13 on GB4... and nothing. |
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. |
@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. |
@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). |
Same hardware, tried with Ubuntu 24.04.2 no success, I will try to reinstall and see if I can get the same results. |
Don't waste your time... |
@mrw1986 Please share the dmesg when you use Fedora. We need to know the reason why the sound doesn't work. |
Is the laptop internal speaker working? I mean, not a phone or external
display, but the internal speaker?
Em dom., 23 de fev. de 2025, 13:26, Matt ***@***.***>
escreveu:
… @Sylrelo <https://github.com/Sylrelo> @bardliao
<https://github.com/bardliao> @hamfirst <https://github.com/hamfirst>
@raelgc <https://github.com/raelgc> @JoseFMP <https://github.com/JoseFMP>
@dginhoux <https://github.com/dginhoux> @lgirdwood
<https://github.com/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).
—
Reply to this email directly, view it on GitHub
<#4055 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACAJBVOSVP3E2UY45E3JFT2RHZC3AVCNFSM6AAAAAASPX3KCGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZWHE3DMOJWG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
[image: mrw1986]*mrw1986* left a comment (thesofproject/linux#4055)
<#4055 (comment)>
@Sylrelo <https://github.com/Sylrelo> @bardliao
<https://github.com/bardliao> @hamfirst <https://github.com/hamfirst>
@raelgc <https://github.com/raelgc> @JoseFMP <https://github.com/JoseFMP>
@dginhoux <https://github.com/dginhoux> @lgirdwood
<https://github.com/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).
—
Reply to this email directly, view it on GitHub
<#4055 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACAJBVOSVP3E2UY45E3JFT2RHZC3AVCNFSM6AAAAAASPX3KCGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZWHE3DMOJWG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
No, only BT connected devices work at this time |
@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. |
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? |
I'd start asking you the output of:
|
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. |
Yeap, same here, but in the bad way: under Wayland, it doesn't work too :D |
So for the ultra it seem work but not the pro... What the difference... |
Yes me too... Already try fedora last 4 months without sound too |
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. |
Ask samsung... the compuiter will be totally died before they answer and helpus. At this time, th're releasing the book5 series. |
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
Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
Name of the topology file:
Topology: ABI 3:22:1 Kernel ABI 3:21:0 (dmesg output)
Name of the platform(s) on which the bug is observed.
dmesg
dmesg_grep_sof.txt
dmesg.txt
sof-logger
freezes my system
alsa-info.txt
The text was updated successfully, but these errors were encountered: