Unable to start service Huawei-WMI

Hello Garuda users, sorry for my bad english I'm Italian.
I use Garuda KDE DE and I have a problem with all the distro I tried those years (Ubuntu, Arch, Manjaro, Debian based and so on) that on ma laptop that is a Huawei Matebook D AMD SoC even if Huawei-WMI driver is included in the kernel (so I can use FN key and OSD for volume ...) the battery protection doesn't work even in theory system say it stop charging at 70% , it charge 100%.
Now thanks Garuda use AUR active by default I was able to install Huawei-WMI
https://aur.archlinux.org/packages/huawei-wmi
to sets group write privileges and reinstates battery charge-thresholds.

Now I have this service on my Systemd that is called Huawei-wmi-reinstate.service but is Unloaded and not active. I need this service active to take care of charging protection. How to get this service loaded at startup and active?
I try sudo systemctl enable huawei-wmi-reinstate.service but does nothing.
Many thanks and I love Garuda

1 Like

Hi there, welcome to the forum!
Please check this article in the Arch wiki.
Also the internet is full of tutorials.
https://wiki.archlinux.org/title/Systemd#Using_units
It should be something like

sudo systemctl enable --now Huawei-wmi-reinstate

There might be something else, of course.
You could check the logs if not working, maybe the comments in the AUR and the upstream documentation...
At a quick glance, there should be also another service working before, huawei-wmi-privilege.service, and maybe (a comment in the AUR) some permissions to be given.

2 Likes

Yes there are the 2 Huawei services both inactive and unloaded.
Even using the command Sudo systemctl enable --now those 2 service still unloaded and inactive because konsole say:
$ sudo systemctl enable --now huawei-wmi-privilege.service
Unit /usr/lib/systemd/system/huawei-wmi-privilege.service is added as a depende
ncy to a non-existent unit sys-devices-platform-huawei\x2dwmi.device.

Strange that battery control was working in all matebook laptop in 2020 (as i can find on web) but not working in 2022 probably some change on modern kernels or something else to do
Basically Battery Control is the only thing not working on my laptop using linux

Unfortunately there is very little documentation for this package.
Although it is not updated since several months, the maintainer seemed to respond immediately to the last enquiry, so you could try...
You could also try switching to the linux-lts kernel, which is a little bit older.

1 Like

even older kernels same issue
Well I try to go to arch and made a question about the issue on the package wiki page
thanks

1 Like

Give also a look here
https://wiki.archlinux.org/title/Huawei_MateBook_14_AMD_(2020)#Battery_protection

1 Like

Thanks, I know that link and all those "tricks and workaround" and I try iwith all linux distro in last year but no way to get battery protection to work, or better say to continue working, because if I boot on windows (that use a Huwei app to take care of battery) and than reboot on linux battery protection work perfectly, it spot charging at 70% but after 2 or 3 reboot it loose the setting and no more working, as it say in the link you find "hardware reports incorrect values for the charge thresholds, preventing battery protection from working" thats why I try to install huawei-wmi that "will set the group write privileges. This will also take care of the thresholds resetting randomly upon reboot by automatically reinstating the battery charge-thresholds"
I have made a question on arch wiki and I'll wait if someone respond.
Many thanks!

Edit /usr/lib/systemd/system/huawei-wmi-privilege.service and remove the line that says After=sys-devices-platform-huawei\x2dwmi.device and change WantedBy=sys-devices-platform-huawei\x2dwmi.device to WantedBy=multi-user.target then do sudo systemctl daemon-reload before enabling and activating both units. Keep in mind they will only be active for a split second, but should show as enabled regardless.

You will have to redo this every time the package updates, or you can copy these files to /etc, but then you might miss out on any changes this unit gets. Happy garudaing!

4 Likes

Thanks, I change huawei-wmi-privilege.service as you said and now the 2 services in systemd are loaded but inactive and unit state is dead. That is means that battery control will work? Because if they stay inactive probably they can't check battery threeshold so they can't do the job they are created to do.
Thanks

The script these units run is only run for a split second, it’s not a deamon.

Sadly the trick to load services on system doesn't work, battery continued been charged to 100% so probably services doesn't work as expected
I made a question at the devs here

I know it's been a couple months since the last post but did you find a solution to this problem? I have the same laptop and I still can't find a way to fix this thing.

Since no one else here has replied, don't.
Please contact the developers of the app.
I'll close here.

3 Likes