Comments (22)
Judging by the log, matebook-applet
is reading the battery threshold information in /sys/devices/platform/huawei-wmi/charge_control_thresholds
(which is the expected place with the latest version of the driver), and is getting 0 0
from it (which is kind of unexpected, because 0 0
is not a sane value as far as I know, "battery protection OFF" is 0 100
on all the models we've tested so far). It is then trying to write to /sys/devices/platform/huawei-wmi/charge_control_thresholds
but fails, so it tries some other places where this setting can be located with older versions of the driver, but doesn't find any.
Since your new model is — well — new and not extensively tested, could you please confirm that /sys/devices/platform/huawei-wmi/charge_control_thresholds
is a working endpoint for the battery protection levels, that is
cat /sys/devices/platform/huawei-wmi/charge_control_thresholds
gives the currently set values, and new values (for example, 40 70
) cat be set with
echo 40 70 | sudo tee /sys/devices/platform/huawei-wmi/charge_control_thresholds
?
from matebook-applet.
At first the values were 0 0. But after setting them with the second command, they updated correctly and now matebook-applet works fine. So the issue seems to be that it didnt expect a 0 0 value for initial value.
Appreciate the help thanks! If you need anything else from the device let me know.
from matebook-applet.
That's interesting! I'd highly appreciate if you did a couple of simple tests to help me understand the issue here and maybe improve matebook-applet
to make sure the next owner of such a model doesn't run into an issue:
- set thresholds manually (i.e. via the console command I've given earlier) back to
0 0
whilematebook-applet -vv
is running, then try changing it with thematebook-applet
, observe behaviour and record this part of the log; - set battery protection to OFF via
matebook-applet
and manually observe the thresholds in the endpoint, I wonder if those will get set to0 100
or to0 0
...
from matebook-applet.
Btw when i change mode thats the log without manually touching anything just changing mode:
TRACE: 2020/11/19 20:26:44 driver.go:326: successful write to driver interface
TRACE: 2020/11/19 20:26:44 driver.go:394: Saving values for persistence...
ERROR: 2020/11/19 20:26:44 driver.go:324: failed to set thresholds
TRACE: 2020/11/19 20:26:44 driver.go:241: got values from interface: [70 90]
TRACE: 2020/11/19 20:26:44 driver.go:262: interpreted values: min 70%, max 90%
As for the tests i get:
echo 0 0 | sudo tee /sys/devices/platform/huawei-wmi/charge_control_thresholds
0 0
tee: /sys/devices/platform/huawei-wmi/charge_control_thresholds: No such device
trying to change that again no matter if matebook-applet is running or not, when i do
cat /sys/devices/platform/huawei-wmi/charge_control_thresholds
i get what i set via matebook-applet. Also i am still not sure if it works correctly. If i am in the range is it supposed to stop charging or charge to the top (second one is happening with me).
When i set mode to OFF it changes to 0 100
Thanks
from matebook-applet.
echo 0 0 | sudo tee /sys/devices/platform/huawei-wmi/charge_control_thresholds
0 0
tee: /sys/devices/platform/huawei-wmi/charge_control_thresholds: No such device
This should not happen™, should it, @aymanbagabas ? Maybe there are things that can be improved in the driver itself here.
Now it is clear what the problem initially was. matebook-applet
read the values as 0 0
, got a little bit surprised but didn't give up just yet, and tried writing the values. It tries writing the same values that it has (so as not to change the settings), so it tried writing 0 0
, received this error from the interbace and assumed the interface was broken and unusable (which it kinda was). I'd say matebook-applet
did well under the circumstances. The driver, not so much. ;-)
Also i am still not sure if it works correctly. If i am in the range is it supposed to stop charging or charge to the top (second one is happening with me).
Mine does the first, but the behaviour could be different for different models.
When i set mode to OFF it changes to 0 100
Exactly as expected, then. The only question is: where did the driver get that initial 0 0
from, especially seeing as how it itself refuses to set these values…
from matebook-applet.
@thomas510111 just for the completeness sake: it looks like matebook-applet
also found /sys/class/power_supply/BAT0/charge_control_start_threshold
and /sys/class/power_supply/BAT0/charge_control_end_threshold
. These two are basically the same as /sys/devices/platform/huawei-wmi/charge_control_thresholds
and can be read and written the same way, but each one only has one value (while the common one has both values together). Looks like the applet read 0
and 0
from there, too, and failed to write those values, so it decided that interface was broken, too. Can you try those manually and confirm they also go belly up when trying to write 0
to both of them?
from matebook-applet.
TRACE: 2020/11/19 20:26:44 driver.go:326: successful write to driver interface
TRACE: 2020/11/19 20:26:44 driver.go:394: Saving values for persistence...
ERROR: 2020/11/19 20:26:44 driver.go:324: failed to set thresholds
Looks like you don't have the systemd harness properly installed. What happens here is matebook-applet
sets the values in the driver successfully, and then tries to write the same values to /etc/default/huawei-wmi/
(so they can be later used by systemd to restore from when reset during a long poweroff period) and fails. If you never intend to use the systemd harness and this error message bothers you, you may use the -n
option when you run matebook-applet
to tell it not to bother with /etc/
at all.
from matebook-applet.
@thomas510111 just for the completeness sake: it looks like
matebook-applet
also found/sys/class/power_supply/BAT0/charge_control_start_threshold
and/sys/class/power_supply/BAT0/charge_control_end_threshold
. These two are basically the same as/sys/devices/platform/huawei-wmi/charge_control_thresholds
and can be read and written the same way, but each one only has one value (while the common one has both values together). Looks like the applet read0
and0
from there, too, and failed to write those values, so it decided that interface was broken, too. Can you try those manually and confirm they also go belly up when trying to write0
to both of them?
On the first one /sys/class/power_supply/BAT0/charge_control_start_threshold
i can write 0 on the second one /sys/devices/platform/huawei-wmi/charge_control_thresholds
i cant. Seems to make sense so the issue is the second 0.
TRACE: 2020/11/19 20:26:44 driver.go:326: successful write to driver interface
TRACE: 2020/11/19 20:26:44 driver.go:394: Saving values for persistence...
ERROR: 2020/11/19 20:26:44 driver.go:324: failed to set thresholdsLooks like you don't have the systemd harness properly installed. What happens here is
matebook-applet
sets the values in the driver successfully, and then tries to write the same values to/etc/default/huawei-wmi/
(so they can be later used by systemd to restore from when reset during a long poweroff period) and fails. If you never intend to use the systemd harness and this error message bothers you, you may use the-n
option when you runmatebook-applet
to tell it not to bother with/etc/
at all.
thanks, had issue with this too due to the 0 0 thing.Here is the log for this, should i also open an issue there or maybe on the driver?
Νοε 19 12:19:12 thomas-KLVL-WXX9 reinstate[33551]: Old battery charge-thresholds 0 0
Νοε 19 12:19:12 thomas-KLVL-WXX9 reinstate[33555]: cp: error writing '/sys/devices/platform/huawei-wmi/charge_control_thresholds': No such device
Νοε 19 12:19:12 thomas-KLVL-WXX9 systemd[1]: huawei-wmi-reinstate.service: Main process exited, code=exited, status=1/FAILURE
Νοε 19 12:19:12 thomas-KLVL-WXX9 systemd[1]: huawei-wmi-reinstate.service: Failed with result 'exit-code'.
Νοε 19 12:19:12 thomas-KLVL-WXX9 systemd[1]: Failed to start Huawei WMI Reinstate.
from matebook-applet.
should i also open an issue there or maybe on the driver?
It's the driver. Both matebook-applet
and Rouven's systemd magic make the same assumptions about how the driver behaves, and it turns out that with your particular model in this particular corner case (0
as end threshold) the driver gives us unexpected behaviour. I've tagged the author of the driver in one of the earlier messages, so let's just wait and see what he has to say. If he thinks the driver should be fixed, that's one story; if he has good reasons to believe this driver's behaviour is actually the proper one, we'll have to adapt both the applet and the systemd service. I happily admit I know nothing about the kernel, even less about how to write a driver, so I completely trust Ayman's expertise on this. ;-)
from matebook-applet.
Could you attach a dmesg log while you try echo 0 0 | sudo tee /sys/devices/platform/huawei-wmi/charge_control_thresholds
? You can watch dmesg using dmesg -w
from matebook-applet.
@aymanbagabas I tried and i dont get anything new on dmesg after running the command. Sorry i am not familiar with kernel so i am probably doing something wrong. Thats the last few lines.
[ 9.417488] rfkill: input handler disabled
[ 14.132327] wlp1s0: authenticate with e0:0e:e4:52:17:db
[ 14.657568] wlp1s0: send auth to e0:0e:e4:52:17:db (try 1/3)
[ 14.661216] wlp1s0: authenticated
[ 14.663918] wlp1s0: associate with e0:0e:e4:52:17:db (try 1/3)
[ 14.667950] wlp1s0: RX AssocResp from e0:0e:e4:52:17:db (capab=0x411 status=0 aid=4)
[ 14.668055] rtw_8822ce 0000:01:00.0: sta e0:0e:e4:52:17:db joined with macid 0
[ 14.668456] wlp1s0: associated
[ 14.674128] wlp1s0: Limiting TX power to 30 (30 - 0) dBm as advertised by e0:0e:e4:52:17:db
[ 14.687078] IPv6: ADDRCONF(NETDEV_CHANGE): wlp1s0: link becomes ready
[ 17.732686] Bluetooth: RFCOMM TTY layer initialized
[ 17.732706] Bluetooth: RFCOMM socket layer initialized
[ 17.732714] Bluetooth: RFCOMM ver 1.11
[ 17.927218] rfkill: input handler enabled
[ 18.247495] [drm] Failed to add display topology, DTM TA is not initialized.
[ 18.393111] logitech-hidpp-device 0003:046D:4008.0005: HID++ 2.0 device connected.
[ 19.439886] [drm] Failed to add display topology, DTM TA is not initialized.
[ 20.205387] Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
[ 20.668139] rfkill: input handler disabled
[ 20.769765] audit: type=1400 audit(1605816697.440:55): apparmor="DENIED" operation="capable" profile="/usr/lib/snapd/snap-confine" pid=2128 comm="snap-confine" capability=4 capname="fsetid"
[ 22.017052] audit: type=1400 audit(1605816698.688:56): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/mime.cache" pid=2128 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 22.017057] audit: type=1400 audit(1605816698.688:57): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/globs2" pid=2128 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 22.017059] audit: type=1400 audit(1605816698.688:58): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/magic" pid=2128 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 22.017061] audit: type=1400 audit(1605816698.688:59): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/aliases" pid=2128 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 22.017064] audit: type=1400 audit(1605816698.688:60): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/subclasses" pid=2128 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 22.017066] audit: type=1400 audit(1605816698.688:61): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/icons" pid=2128 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 22.017068] audit: type=1400 audit(1605816698.688:62): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/generic-icons" pid=2128 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 22.017417] audit: type=1400 audit(1605816698.688:63): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/etc/gnome/defaults.list" pid=2128 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 22.049802] audit: type=1326 audit(1605816698.720:64): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.snap-store.ubuntu-software pid=2128 comm="snap-store" exe="/snap/snap-store/481/usr/bin/snap-store" sig=0 arch=c000003e syscall=314 compat=0 ip=0x7fea8b233959 code=0x50000
[ 31.434395] kauditd_printk_skb: 13 callbacks suppressed
[ 31.434397] audit: type=1400 audit(1605816708.104:78): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/mime.cache" pid=2128 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 31.434401] audit: type=1400 audit(1605816708.104:79): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/globs2" pid=2128 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 31.434405] audit: type=1400 audit(1605816708.104:80): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/magic" pid=2128 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 31.434421] audit: type=1400 audit(1605816708.104:81): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/aliases" pid=2128 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 31.434426] audit: type=1400 audit(1605816708.104:82): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/subclasses" pid=2128 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 31.434440] audit: type=1400 audit(1605816708.104:83): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/icons" pid=2128 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 31.434449] audit: type=1400 audit(1605816708.104:84): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/generic-icons" pid=2128 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 32.976391] audit: type=1400 audit(1605816709.648:85): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/gdm/greeter/applications/gnome-initial-setup.desktop" pid=2128 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 32.993064] audit: type=1400 audit(1605816709.664:86): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/discord/discord.desktop" pid=2128 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 33.360798] audit: type=1326 audit(1605816710.032:87): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.snap-store.ubuntu-software pid=2128 comm="pool-org.gnome." exe="/snap/snap-store/481/usr/bin/snap-store" sig=0 arch=c000003e syscall=93 compat=0 ip=0x7fea8b229527 code=0x50000
[ 37.133829] audit: type=1400 audit(1605816713.805:88): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/mime.cache" pid=2128 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 37.133834] audit: type=1400 audit(1605816713.805:89): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/globs2" pid=2128 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 37.133853] audit: type=1400 audit(1605816713.805:90): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/magic" pid=2128 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 37.133862] audit: type=1400 audit(1605816713.805:91): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/aliases" pid=2128 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 37.133870] audit: type=1400 audit(1605816713.805:92): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/subclasses" pid=2128 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 37.133877] audit: type=1400 audit(1605816713.805:93): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/icons" pid=2128 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 37.133885] audit: type=1400 audit(1605816713.805:94): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/generic-icons" pid=2128 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 38.243388] audit: type=1400 audit(1605816714.913:95): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/icons/Yaru/icon-theme.cache" pid=2128 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 38.243399] audit: type=1400 audit(1605816714.913:96): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/icons/Yaru/8x8/emblems/" pid=2128 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 38.244998] audit: type=1400 audit(1605816714.917:97): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/icons/Yaru/icon-theme.cache" pid=2128 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[ 50.364512] Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
[ 413.018684] Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
[ 422.746838] Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7
Tell me if you want the whole file.
from matebook-applet.
What's the output of this script? Run it with sudo
#!/bin/bash
echo 0x00001003 | sudo tee /sys/kernel/debug/huawei-wmi/arg
sudo cat /sys/kernel/debug/huawei-wmi/call
sudo cat /sys/kernel/debug/huawei-wmi/call
echo 0x00001103 | sudo tee /sys/kernel/debug/huawei-wmi/arg
sudo cat /sys/kernel/debug/huawei-wmi/call
sudo cat /sys/kernel/debug/huawei-wmi/call
echo 0x64001003 | sudo tee /sys/kernel/debug/huawei-wmi/arg
sudo cat /sys/kernel/debug/huawei-wmi/call
sudo cat /sys/kernel/debug/huawei-wmi/call
echo 0x00001103 | sudo tee /sys/kernel/debug/huawei-wmi/arg
sudo cat /sys/kernel/debug/huawei-wmi/call
sudo cat /sys/kernel/debug/huawei-wmi/call
echo 0x461e1003 | sudo tee /sys/kernel/debug/huawei-wmi/arg
sudo cat /sys/kernel/debug/huawei-wmi/call
sudo cat /sys/kernel/debug/huawei-wmi/call
echo 0x00001103 | sudo tee /sys/kernel/debug/huawei-wmi/arg
sudo cat /sys/kernel/debug/huawei-wmi/call
sudo cat /sys/kernel/debug/huawei-wmi/call
from matebook-applet.
sudo ./script.sh
tee: /sys/kernel/debug/huawei-wmi/arg: Operation not permitted
0x00001003
cat: /sys/kernel/debug/huawei-wmi/call: Operation not permitted
cat: /sys/kernel/debug/huawei-wmi/call: Operation not permitted
tee: /sys/kernel/debug/huawei-wmi/arg: Operation not permitted
0x00001103
cat: /sys/kernel/debug/huawei-wmi/call: Operation not permitted
cat: /sys/kernel/debug/huawei-wmi/call: Operation not permitted
tee: /sys/kernel/debug/huawei-wmi/arg: Operation not permitted
0x64001003
cat: /sys/kernel/debug/huawei-wmi/call: Operation not permitted
cat: /sys/kernel/debug/huawei-wmi/call: Operation not permitted
tee: /sys/kernel/debug/huawei-wmi/arg: Operation not permitted
0x00001103
cat: /sys/kernel/debug/huawei-wmi/call: Operation not permitted
cat: /sys/kernel/debug/huawei-wmi/call: Operation not permitted
tee: /sys/kernel/debug/huawei-wmi/arg: Operation not permitted
0x461e1003
cat: /sys/kernel/debug/huawei-wmi/call: Operation not permitted
cat: /sys/kernel/debug/huawei-wmi/call: Operation not permitted
tee: /sys/kernel/debug/huawei-wmi/arg: Operation not permitted
0x00001103
cat: /sys/kernel/debug/huawei-wmi/call: Operation not permitted
cat: /sys/kernel/debug/huawei-wmi/call: Operation not permitted
from matebook-applet.
@aymanbagabas i could get a live distro and do some testing on the initial status of the driver if you think it can help you
from matebook-applet.
@aymanbagabas i could get a live distro and do some testing on the initial status of the driver if you think it can help you
Get a root shell and try rerunning the script again sudo -i
then do ./script.sh
from matebook-applet.
@aymanbagabas just did same thing happened
from matebook-applet.
I have this same issue on the same laptop.
I installed matebook-applet from AUR, and added myself to huawei-wmi
group.
matebook-applet -vv
en-US
INFO: 2023/03/27 14:56:59 main.go:63: matebook-applet version custom-build
TRACE: 2023/03/27 14:56:59 driver.go:135: Fn-lock is OFF
TRACE: 2023/03/27 14:56:59 driver.go:197: Checking if the fnlock endpoint is writable...
TRACE: 2023/03/27 14:56:59 driver.go:135: Fn-lock is OFF
TRACE: 2023/03/27 14:56:59 driver.go:165: open /sys/devices/platform/huawei-wmi/fn_lock_state: permission denied
WARNING: 2023/03/27 14:56:59 driver.go:166: Driver interface is readable but not writeable.
TRACE: 2023/03/27 14:56:59 driver.go:241: got values from interface: [0 0]
TRACE: 2023/03/27 14:56:59 driver.go:262: interpreted values: min 0%, max 0%
TRACE: 2023/03/27 14:56:59 driver.go:192: Checking if the threshold endpoint is writable...
TRACE: 2023/03/27 14:56:59 driver.go:241: got values from interface: [0 0]
TRACE: 2023/03/27 14:56:59 driver.go:262: interpreted values: min 0%, max 0%
ERROR: 2023/03/27 14:56:59 driver.go:324: failed to set thresholds
TRACE: 2023/03/27 14:56:59 driver.go:229: Couldn't access "/sys/devices/platform/huawei-wmi/charge_thresholds".
TRACE: 2023/03/27 14:56:59 driver.go:262: interpreted values: min 0%, max 0%
TRACE: 2023/03/27 14:56:59 driver.go:192: Checking if the threshold endpoint is writable...
TRACE: 2023/03/27 14:56:59 driver.go:262: interpreted values: min 0%, max 0%
ERROR: 2023/03/27 14:56:59 driver.go:268: Failed to set min threshold
TRACE: 2023/03/27 14:56:59 driver.go:292: Couldn't access "/sys/class/power_supply/BAT1/charge_control_start_threshold".
TRACE: 2023/03/27 14:56:59 driver.go:292: Couldn't access "/sys/class/power_supply/BAT2/charge_control_start_threshold".
TRACE: 2023/03/27 14:56:59 driver.go:292: Couldn't access "/sys/class/power_supply/BAT3/charge_control_start_threshold".
TRACE: 2023/03/27 14:56:59 driver.go:292: Couldn't access "/sys/class/power_supply/BAT4/charge_control_start_threshold".
TRACE: 2023/03/27 14:56:59 driver.go:292: Couldn't access "/sys/class/power_supply/BAT5/charge_control_start_threshold".
TRACE: 2023/03/27 14:56:59 driver.go:292: Couldn't access "/sys/class/power_supply/BAT6/charge_control_start_threshold".
TRACE: 2023/03/27 14:56:59 driver.go:292: Couldn't access "/sys/class/power_supply/BAT7/charge_control_start_threshold".
TRACE: 2023/03/27 14:56:59 driver.go:292: Couldn't access "/sys/class/power_supply/BAT8/charge_control_start_threshold".
TRACE: 2023/03/27 14:56:59 driver.go:292: Couldn't access "/sys/class/power_supply/BAT9/charge_control_start_threshold".
TRACE: 2023/03/27 14:56:59 main.go:73: looking for endpoint to save thresholds to...
TRACE: 2023/03/27 14:56:59 driver.go:229: Couldn't access "/etc/default/huawei-wmi/charge_control_thresholds".
TRACE: 2023/03/27 14:56:59 driver.go:229: Couldn't access "/etc/default/huawei-wmi/charge_thresholds".
TRACE: 2023/03/27 14:56:59 applet.go:38: Setting up menu...
INFO: 2023/03/27 14:56:59 applet.go:146: Couldn't get custom icon, falling back to default
TRACE: 2023/03/27 14:56:59 driver.go:262: interpreted values: min 0%, max 0%
TRACE: 2023/03/27 14:56:59 driver.go:192: Checking if the threshold endpoint is writable...
TRACE: 2023/03/27 14:56:59 driver.go:262: interpreted values: min 0%, max 0%
ERROR: 2023/03/27 14:56:59 driver.go:268: Failed to set min threshold
TRACE: 2023/03/27 14:56:59 applet.go:63: no way to change BP settings, not showing the corresponding GUI
TRACE: 2023/03/27 14:56:59 driver.go:135: Fn-lock is OFF
TRACE: 2023/03/27 14:56:59 applet.go:72: Menu is now ready
TRACE: 2023/03/27 14:56:59 applet.go:106: Setting up GUI thread...
from matebook-applet.
I installed matebook-applet from AUR, and added myself to
huawei-wmi
group.
Yet you did not bother to install the systemd harness as suggested in the README, did you?
from matebook-applet.
I actually did. Still not working.
If you need more infos just lmk, I'll be happy to provide them.
P.S. sorry for double posting
from matebook-applet.
I actually did. Still not working.
Did you check that the CLI commands provided by that service work as expected?
from matebook-applet.
I actually did. Still not working.
Did you check that the CLI commands provided by that service work as expected?
Yes I did, these are the outputs. I don't have permissions to access the thresholds file.
❯ groups | xargs -n 1 | grep huawei-wmi
huawei-wmi
❯ echo 40 70 | tee {/etc/default,/sys/devices/platform}/huawei-wmi/charge_control_thresholds
tee: /etc/default/huawei-wmi/charge_control_thresholds: Permission denied
40 70
❯ cat /sys/class/power_supply/BAT?/capacity
66
❯ cat /sys/class/power_supply/BAT?/status
Discharging
[EDIT] I solved by building the huawei-wmi from source instead of getting it from the AUR.
Sorry for bothering you and thanks for your time, and your project of course.
from matebook-applet.
You're welcome. AUR must be outdated, hopefully someone cares enough to update it. :)
Looks like your problem wasn't connected to the issue reported in this ticket, though.
from matebook-applet.
Related Issues (20)
- ERROR: neither a support version of huawei-wmi driver or any of the required scripts are properly installed HOT 5
- [linux 5.5] Driver interface is readable but not writeable. HOT 5
- Fedora HOT 6
- Driver interface is readable but not writeable. HOT 2
- Applet Icon HOT 2
- applet not able to change battery settings on matebook-2020 (intel i7) HOT 2
- BP thresholds don't make sense: min 0%, max 0% HOT 8
- Support MacOS HOT 97
- Migrate to the Ayatana (App)Indicator(s) for newer Debian versions HOT 8
- Every time restart, the settings are invalid @Matebook 2020(R5) HOT 4
- error while loading shared libraries: libayatana-appindicator3.so.1 on Fedora 34 HOT 4
- Cannot run last applet on Archlinux HOT 4
- KDE Plasma system tray applet HOT 7
- How is the battery protection different from generic limits? HOT 8
- Unable to locate package matebook-applet HOT 2
- cannot find module providing package embed HOT 2
- Функционал по ограничению порогов заряда/разряда батареи не работает HOT 4
- This application for Windows HOT 1
- Error setting thresholds on Matebook 16 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matebook-applet.