lidel/linux-on-huawei-matebook-x-2017

Right channel audio not working

thisisshi opened this issue · 19 comments

Although this is already documented in the readme, wanted to open an issue to better track the status of the issue:

Bug submitted to ubuntu bug tracker:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1721987

Fix submitted to alsa here:
https://patchwork.kernel.org/patch/10764291/

Pull request to update docs here: #9

TL;DR:
follow instructions here: #8 (comment)

I'm not an Linux expert, but is it difficult to apply the patch manually or do we have to wait for the next kernel version.

@janbaer looksl ike omegadota from the bug tracker was actually able to create a script to run it without having to recomplie the kernel: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1721987/comments/25

After running the script provided it also appears that the hotkeys have started working as well.... interesting

Works for me too!

EDIT: I would ask anyone reading this and interested in this issue voting for this bug on the Launchpad tracker and the other bug trackers as well.

@thisisshi - Works great also for me! Thanks! The sound from both speakers sound really very good! One more missing part which is now working on Linux with my MatebookX!

Here's a few instructions:

  1. Download the script provided by omegadota found here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1721987/comments/25
  2. Copy the script to /usr/local/bin:
sudo cp huawei-sound.sh /usr/local/bin/huawei-sound.sh
  1. Add a new service to /etc/systemd/service to call the script like so:
$ sudo touch /etc/systemd/service/huawei-sound.service
  1. add the following details into your service:
[Unit]
Description=Huawei-soundfix

[Service]
Type=idle
ExecStart=/usr/bin/bash /usr/local/bin/huawei-sound.sh

[Install]
WantedBy=multi-user.target suspend.target hibernate.target hybrid-sleep.target
  1. enable the service:
systemctl enable huawei-sound
  1. check that the service is running:
systemctl status huawei-sound
  1. run a stereo test to validate that right audio is working:

e..g https://www.youtube.com/watch?v=6TWJaFD6R2s

@thisisshi Great thanks, that's exactly how I did it and it worked perfectly. I just had the problem, that after waking up the matebook x from the hibernate state, the sound came again only from the left speaker. I had the restart the service and then it worked again.

Heyo @janbaer, I already solved this problem by changing the service file:

[Unit]
Description=Huawei-soundfix

[Service]
Type=idle
ExecStart=/usr/bin/bash /usr/local/bin/huawei-sound.sh

[Install]
WantedBy=multi-user.target suspend.target hibernate.target hybrid-sleep.target

This way you don't have to do anything manually.

@MaxValue I've been trying that but unfortunately haven't been able to get it to work:

$ cat /etc/systemd/system/huawei-sound.service
[Unit]
Description=Huawei-soundfix

[Service]
Type=idle
ExecStart=/usr/bin/bash /usr/local/bin/huawei-sound

[Install]
WantedBy=multi-user.target suspend.target hibernate.target hybrid-sleep.target

also tried adding wakeup.target as well but for some reason it isn't working as expected

Ohhh, I think I know what you forgot.

You will need to reinstall the service after you changed the file:

sudo systemctl disable huawei-sound.service

After that reload the systemd daemon (so it picks up the changes):

sudo systemctl daemon-reload

Then install the service again:

sudo systemctl enable huawei-sound.service

doh, thanks @MaxValue!

I'll be submitting a pr here shortly with updated docs on the sound and keyboard shortcuts :)

This fixed the speakers for me too, but not the hotkeys.

I'm still a novice at Linux, so perhaps something went wrong along the way. I did have to tweak a few things from the steps submitted in the PR.
I changed ExecStart=/usr/bin/bash to ExecStart=/bin/bash in huawei-sound.service and had to move the file to /etc/systemd/system/ for it to be found when using systemctl enable huawei-sound.

I'm using Ubuntu 18.04

That's interesting @joanibal I'll update my PR to note that. @MaxValue @janbaer did the hotkeys start working after running the omegadota script?

Nope, they did not.

@thisisshi I'm not sure about that, my hotkeys were working before because of another patch. But to be honest, I don't believe, that the sound patch would also affect the hotkeys. They are completely different thinks.

hey guys,
i dont know why, but its dont work...
used same changes as @joanibal , but i still got a Error. (Ubuntu 18.10, Kernel 5.0)
Someone can help me here please ?

//Error//
● huawei-sound.service - Huawei-soundfix
Loaded: loaded (/etc/systemd/system/huawei-sound.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2019-03-09 00:08:47 CET; 14min ago
Main PID: 776 (code=exited, status=127)

Mär 09 00:08:47 david-HUAWEI-MateBook-X bash[776]: /usr/local/bin/huawei-sound.sh: Zeile 655: hda-verb: Befehl nicht gefunden
Mär 09 00:08:47 david-HUAWEI-MateBook-X bash[776]: /usr/local/bin/huawei-sound.sh: Zeile 656: hda-verb: Befehl nicht gefunden
Mär 09 00:08:47 david-HUAWEI-MateBook-X bash[776]: /usr/local/bin/huawei-sound.sh: Zeile 657: hda-verb: Befehl nicht gefunden
Mär 09 00:08:47 david-HUAWEI-MateBook-X bash[776]: /usr/local/bin/huawei-sound.sh: Zeile 658: hda-verb: Befehl nicht gefunden
Mär 09 00:08:47 david-HUAWEI-MateBook-X bash[776]: /usr/local/bin/huawei-sound.sh: Zeile 659: hda-verb: Befehl nicht gefunden
Mär 09 00:08:47 david-HUAWEI-MateBook-X bash[776]: /usr/local/bin/huawei-sound.sh: Zeile 660: hda-verb: Befehl nicht gefunden
Mär 09 00:08:47 david-HUAWEI-MateBook-X bash[776]: /usr/local/bin/huawei-sound.sh: Zeile 661: hda-verb: Befehl nicht gefunden
Mär 09 00:08:47 david-HUAWEI-MateBook-X bash[776]: /usr/local/bin/huawei-sound.sh: Zeile 662: hda-verb: Befehl nicht gefunden
Mär 09 00:08:47 david-HUAWEI-MateBook-X systemd[1]: huawei-sound.service: Main process exited, code=exited, status=127/n/a
Mär 09 00:08:47 david-HUAWEI-MateBook-X systemd[1]: huawei-sound.service: Failed with result 'exit-code'.

Hey @Davidgo123,

Did you install alas-tools? it looks like the hda-verb command isn't recognized.
You should be able to get alas-tools by simply using sudo apt-get install alsa-tools.

oh, there was the problem...
It works now, thanks for fast response!

Hey guys! This is kinda out of topic but hopefully, someone can contribute. I'm preparing to submit a new update of Huawei-WMI to mainline kernel. I was hoping that someone with a Matebook X can test it and report if there are any concerns. Please let me know, thanks in advance.