linux-on-huawei-matebook-x-2017 icon indicating copy to clipboard operation
linux-on-huawei-matebook-x-2017 copied to clipboard

Right channel audio not working

Open thisisshi opened this issue 5 years ago • 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: https://github.com/lidel/linux-on-huawei-matebook-x-2017/pull/9

TL;DR: follow instructions here: https://github.com/lidel/linux-on-huawei-matebook-x-2017/issues/8#issuecomment-460067010

thisisshi avatar Jan 28 '19 05:01 thisisshi

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 avatar Jan 28 '19 08:01 janbaer

@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

thisisshi avatar Feb 01 '19 22:02 thisisshi

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

thisisshi avatar Feb 01 '19 22:02 thisisshi

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.

MaxValue avatar Feb 02 '19 02:02 MaxValue

@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!

janbaer avatar Feb 02 '19 11:02 janbaer

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 avatar Feb 03 '19 16:02 thisisshi

@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.

janbaer avatar Feb 03 '19 17:02 janbaer

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 avatar Feb 03 '19 17:02 MaxValue

@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

thisisshi avatar Feb 03 '19 18:02 thisisshi

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

MaxValue avatar Feb 03 '19 18:02 MaxValue

doh, thanks @MaxValue!

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

thisisshi avatar Feb 03 '19 18:02 thisisshi

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

joanibal avatar Feb 04 '19 19:02 joanibal

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

thisisshi avatar Feb 04 '19 20:02 thisisshi

Nope, they did not.

MaxValue avatar Feb 05 '19 01:02 MaxValue

@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.

janbaer avatar Feb 05 '19 09:02 janbaer

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'.

Davidgo123 avatar Mar 08 '19 23:03 Davidgo123

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.

joanibal avatar Mar 09 '19 00:03 joanibal

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

Davidgo123 avatar Mar 09 '19 00:03 Davidgo123

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.

aymanbagabas avatar May 22 '19 01:05 aymanbagabas