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

Doesn't work on MateBook D16 2021 (Ryzen 4600H) #8

Open
HexPandaa opened this issue May 15, 2023 · 11 comments
Open

Doesn't work on MateBook D16 2021 (Ryzen 4600H) #8

HexPandaa opened this issue May 15, 2023 · 11 comments

Comments

@HexPandaa
Copy link

Hi, I've been trying to get sound on my MateBook for over a year, so thank you for creating this repo!

I tried your linux-sound-huawei repo but as it didn't seem to work, I'm trying this one.
No mater what I do, I only see the Dummy Output in the settings and alsamixer doesn't show any more outputs.

Trying to investigate the problem, I found that the DMI_EXACT_MATCH for my device was not exactly correct.
In acp-config.c, there is an exact math for M1040, however my DMI infos shows M1010.

DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "M1040"),

System Information
     Manufacturer: HUAWEI
     Product Name: HVY-WXX9
     Version: M1010
     Serial Number: <xxx>
     UUID: 20211012-e0d4-e8f0-5325-<xxx>
     Wake-up Type: Power Switch
     SKU Number: C100
     Family: MateBook D

I tried changing the value in acp-config.c to match mine, but nothing changed.

Do you have any idea where I could look for logs explaining why the driver is supposedly not loaded? I found no info in dmesg and journalctl.

For the sake of completeness, I'm running Ubuntu 22.04.

Thanks a lot for your work!

@codepayne
Copy link
Owner

Do you still have the issue?

@ChristophBellmann
Copy link

ChristophBellmann commented Oct 2, 2023

Hi,

my laptop is this Huawei Matebook D16 as well.
Also, your patched kernel does not solve the sound issue on my matebook d16.
I built the pop kernel with your supplied config and installed it. Still have only the dummy output.
Help is be greatly appreciated! No sound is bad....

If i can give you any info or try things i'll gladly do that.

Thanks!

@codepayne
Copy link
Owner

Attach the dmesg output

@HexPandaa
Copy link
Author

Do you still have the issue?

Sorry I did not see you answer! Duplicating the WXX9-M1040 entries and replacing them with M1010 fixes the issue. I can open an MR with the change so that you can hopefully push the change along with your upstream request before the release.

@codepayne
Copy link
Owner

codepayne commented Nov 9, 2023

@HexPandaa I will update the upstream driver with your SKU. Does the sound work ok on your laptop?

@HexPandaa
Copy link
Author

@HexPandaa I will update the upstream driver with your SKU. Does the sound work ok on your laptop?

Yep the sound works fine 👍

@ChristophBellmann
Copy link

ChristophBellmann commented Dec 2, 2023

I did make the kernel with the config you added.
In working-config-huawei-la
rebootptops.config i find-replaced the M
reboot1040 entries with M1010, then cp to .config.

Then i did:

# make -j10
# sudo make modules-install
# sudo make install
# sudo kernelstub -v -k /boot/vmlinuz-6.0.12+ -i /boot/initrd.img-6.0.12+
# reboot

Somewhere in between i used strip to make the initrd size smaller:

 # cd /lib/modules/6.0.12+
 # sudo find . -name *.ko -exec strip --strip-unneeded {} +

aplay -l only shows the hdmi sound.

i tried:

#  sudo modprobe snd-acp3x-pcm-dma
 #  sudo modprobe snd-acp3x-i2s
 #  sudo modprobe snd-pci-acp3x
 #  sudo modprobe snd-soc-acp-es8336-mach

with no success.

In my /etc/modules everything is commented out.

I attached my /etc/modprobe.d/blacklist.conf here:
blacklist.conf.txt

And and my dmseg output:
dmesg.log

Thanks for your help and the work you put in!

@ChristophBellmann
Copy link

ChristophBellmann commented Dec 2, 2023

Hey it works now!

Using working-config-huawei-laptops.config as .config.

Following HexPandas discovery, the solution was:

Look at the first entry of "system information" of dmidecode

# sudo dmidecode

Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: HUAWEI
Product Name: HVY-WXX9
Version: M1020
Serial Number: --------------------------
UUID: -----------------------------------------------
Wake-up Type: AC Power Restored
SKU Number: C100
Family: MateBook D

We can see that, not like Hexpandas Version: M1010, the Version here is M1020.

Looking for occurences of HVY-WXX9 and copying the lines where M1040 is, in both of these 2 files:

~ sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c
~ sound/soc/amd/acp-config.c

then again compile and add to boot:

# (to start fresh, but omitting make clean causes make to build on top,  does not take hours again) make clean
# make -j12
# sudo make modules_install
# sudo make install
# sudo kernelstub -v -k /boot/vmlinuz-6.0.12+ -i /boot/initrd.img-6.0.12+

Result is working sound!
No blacklist, no modprobe.
Heureka!

@iTrooz
Copy link

iTrooz commented Dec 24, 2023

Hey ! I also have this issue

Looking at dmidecode, I have the model HVY-WXX9-PCB-B1 with version M1010

I modified the files sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c and sound/soc/amd/acp-config.c to include my device, which made alsamixer/KDE list my sound card, but unfortunately I still don't have any sound (I tried playing a wav file with aplay).

I have never worked with the kernel or sound stuff before, so I don't even know where to start to troubleshoot this. Could I get some help ? Thanks

alsamixer a
alsamixer b
dmidecode.txt
uname -a: Linux arch-3306 6.0.12+ #1 SMP PREEMPT_DYNAMIC Sun Dec 24 13:48:31 CET 2023 x86_64 GNU/Linux
Pipewire: 1:1.0.0-2
I am using Arch Linux

@iTrooz
Copy link

iTrooz commented Dec 24, 2023

Here are the dmesg logs of a fresh boot: dmesg.txt
After booting, I noticed white noise coming from the speakers, regardless of if I was playing sound or not

EDIT: I followed the instructions in codepayne/linux-sound-huawei#26 (comment) and https://github.com/codepayne/linux-sound-huawei/wiki (the last part about alsamixer), now the white noise stopped, and KDE doesn't recognize the sound card anymore (but alsamixer still does)

EDIT 2: created another user and KDE now seem to detect the sound card. the sound is sped up, but that seem to be an ongoing problem in the issue I mentioned earlier. I guess it works now, thanks anyway !

@codepayne
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants