Last active
September 24, 2024 07:23
-
-
Save philipperoubert/a4dd97bd94c78a588147c044000a87da to your computer and use it in GitHub Desktop.
Huawei Matebook 14S Audio Fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
value=`cat selected_audio_output.txt` | |
if [ -z "$value" ] | |
then | |
value=0 | |
fi | |
if [ $value -eq 0 ] | |
then | |
sudo hda-verb /dev/snd/hwC0D0 0x16 0x701 0x0001 // move output to speaker dac | |
sudo hda-verb /dev/snd/hwC0D0 0x17 0x70C 0x0002 // enable speaker | |
sudo hda-verb /dev/snd/hwC0D0 0x1 0x715 0x2 // disable headphones | |
value=1 | |
else | |
sudo hda-verb /dev/snd/hwC0D0 0x16 0x701 0x0000 // move output to headphones dac | |
sudo hda-verb /dev/snd/hwC0D0 0x17 0x70C 0x0000 // disable speaker | |
sudo hda-verb /dev/snd/hwC0D0 0x1 0x717 0x2 // pin output mode | |
sudo hda-verb /dev/snd/hwC0D0 0x1 0x716 0x2 // pin enable | |
sudo hda-verb /dev/snd/hwC0D0 0x1 0x715 0x0 // clear pin value | |
value=0 | |
fi | |
echo $value > selected_audio_output.txt |
Thank for this code! I've created a daemon for listening headphones connected/disconnected and switching audio output: https://github.com/Smoren/huawei-ubuntu-sound-fix
Hey everyone,
I just got a matebook 14 with AMD Ryzen 7 and 16gb RAM and on linux distros (already tested Mint, Ubuntu 23 and 22) is not working.
Only with bluetoth headset is working, beside that no speeker is working even if I plug in headphones in the jack they are not recognized and don't work and no sound at all.
Even the microphone input is also not even detected.
Any clue what the issue there might be and how I can fix it, cause I just don't want to change to windows after beeing for more than 4 year a linux user.
In windows works everything perfectly!
Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry for the belated response. Sorry to hear that this doesn't work on your PC.
I fear the issue may be coming from the distros, KDE Plasma vs Ubuntu, or maybe a difference in Kernel version. What kernel is your distro using? In my case I was using 5.19. Hope this can help.