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

Right channel audio not working #8

Open
thisisshi opened this issue Jan 28, 2019 · 19 comments · May be fixed by #9
Open

Right channel audio not working #8

thisisshi opened this issue Jan 28, 2019 · 19 comments · May be fixed by #9

Comments

@thisisshi
Copy link

thisisshi commented Jan 28, 2019

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)

@janbaer
Copy link

janbaer commented Jan 28, 2019

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.

@thisisshi
Copy link
Author

@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
Copy link
Author

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

@MaxValue
Copy link

MaxValue commented Feb 2, 2019

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.

@janbaer
Copy link

janbaer commented Feb 2, 2019

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

@thisisshi
Copy link
Author

thisisshi commented Feb 3, 2019

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

@janbaer
Copy link

janbaer commented Feb 3, 2019

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

@MaxValue
Copy link

MaxValue commented Feb 3, 2019

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.

@thisisshi
Copy link
Author

@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

@MaxValue
Copy link

MaxValue commented Feb 3, 2019

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

@thisisshi
Copy link
Author

doh, thanks @MaxValue!

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

@joanibal
Copy link

joanibal commented Feb 4, 2019

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

@thisisshi
Copy link
Author

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

@MaxValue
Copy link

MaxValue commented Feb 5, 2019

Nope, they did not.

@janbaer
Copy link

janbaer commented Feb 5, 2019

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

@Davidgo123
Copy link

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

@joanibal
Copy link

joanibal commented Mar 9, 2019

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.

@Davidgo123
Copy link

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

@aymanbagabas
Copy link

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.

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