aymanbagabas / Huawei-WMI

Huawei WMI laptop extras linux driver
GNU General Public License v2.0
229 stars 15 forks source link

FAILED message in system boot log about "Huawei WMI Reinstate". charge_thresholds: No such file or directory #42

Closed RangerNJU closed 3 years ago

RangerNJU commented 3 years ago

Describe the bug "Fail to get WMI Privilege and Reinstate" message in system boot log.

To Reproduce Install the 3.4 version driver via DKMS . Boot using ly and Archlinux with lts kernel version: 5.4.72-1-lts.

Type sudo journalctl and search for Huawei WMI Reinstate.

Then you will see messages like:

Oct 20 11:49:39 Mi3 chgrp[901]: /usr/bin/chgrp: cannot access '/sys/devices/platform/huawei-wmi/charge_thresholds': No such file or directory
Oct 20 11:49:39 Mi3 systemd[1]: huawei-wmi-privilege.service: Main process exited, code=exited, status=1/FAILURE
Oct 20 11:49:39 Mi3 systemd[1]: huawei-wmi-privilege.service: Failed with result 'exit-code'.
Oct 20 11:49:39 Mi3 systemd[1]: Failed to start Huawei WMI Privilege.
Oct 20 11:49:39 Mi3 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=huawei-wmi-privilege comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Oct 20 11:49:39 Mi3 systemd[1]: Starting Huawei WMI Reinstate...
Oct 20 11:49:39 Mi3 sh[903]: cat: /sys/devices/platform/huawei-wmi/charge_thresholds: No such file or directory
Oct 20 11:49:39 Mi3 sh[902]: Old charge thresholds
Oct 20 11:49:39 Mi3 sh[905]: /usr/bin/sh: /sys/devices/platform/huawei-wmi/charge_thresholds: Permission denied
Oct 20 11:49:39 Mi3 systemd[1]: huawei-wmi-reinstate.service: Main process exited, code=exited, status=1/FAILURE
Oct 20 11:49:39 Mi3 systemd[1]: huawei-wmi-reinstate.service: Failed with result 'exit-code'.
Oct 20 11:49:39 Mi3 systemd[1]: Failed to start Huawei WMI Reinstate.

Expected behavior No such error messages in system boot log.

Desktop (please complete the following information):

Additional context Since the config file related to charging is now called charge_control_thresholds, which is not match with charge_thresholds, a simple solution may be just check out the source files and edit so that the filename matches?(However I'm not sure where to edit)

nekr0z commented 3 years ago

This is the issue with the service, not the driver, and should be reported there (although I believe in can be easily fixed by simply updating the service to the current version).

n3vu0r commented 3 years ago

Yes, the latest version (master branch) works with the new (charge_control_thresholds) driver interface.

aymanbagabas commented 3 years ago

It was named that way to match the kernel ABI https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-power

RangerNJU commented 3 years ago

Thank you everyone for your quick response:)

Yes, the latest version (master branch) works with the new (charge_control_thresholds) driver interface.

I've search AUR but got no package for the service, I'm wondering whether the Makefile is compatible with Arch? In other words, all I need to do is clone the service then go to the generic folder and sudo make install ?(Maybe a better practice would be copy the commands in the Makefile and execute them manually.)

BTW is the service only about the Start and end thresholds getting reset issue? I didn't notice such issue using Matebook13 2019 i3 version for the last 24 hours. Can I simply disable the service if the thresholds won't get reset at all?

RangerNJU commented 3 years ago

update: the thresholds get reset to 0 0, and by default the battery won't charge in this situation, which is fine for me.

nekr0z commented 3 years ago

@RangerNJU

RangerNJU commented 3 years ago

I'd like to close this issue and say sorry to everyone subscribed to this repository that don't care about the service. Thank you for your courtesy and patience @nekr0z .