Closed sermart1234 closed 2 years ago
Smart charge
[mode] [unknow] [start] [stop]
mode:
1 - home
2 - office
3 - travel
4 - smart charge - disable user-settable thresholds
unknow - maybe a timer
start stop like charge_control_thresholes
Smart charge param unknow. You can set 1 or 2. I think it disables smart charging for one time https://consumer.huawei.com/en/support/content/en-us15784067/
I can confirm that it works on HUAWEI MateBook D 15 AMD. Mic led is still working too. Thanks for your work @sermart1234. @aymanbagabas Thanks to you too. Any idea when this could be merged in the kernel?
@mpi3d @aymanbagabas 1) smart charging test (this is not the final implementation. there may be conflicts with thresholds) 2) finish the LEDs and hwmon 3) I don't like quirks 4) wq branch 5) there are still unrealized WMI methods
I can confirm that it works on HUAWEI MateBook D 15 AMD. Mic led is still working too. Thanks for your work @sermart1234. @aymanbagabas Thanks to you too. Any idea when this could be merged in the kernel?
We could start merging that into kernel once we thoroughly test these changes and confirm their backward compatibility and coverage across different Huawei models
@mpi3d Do you have any ideas to improve the smart charging interface?
Ok, thanks a lot.
@aymanbagabas ec_micmute
only for Matebook X?
FN lock work on Matebook X?
I see the method in dsdt
Method (FNLK, 1, NotSerialized)
Is the handle_kbdlight
quirk necessary? On which devices does it work?
@aymanbagabas Can I hook atkbd events? Or do I need to patch atkbd to remove these messages in dmesg? It would be nice to get events from hotkeys (keyboard backlight key, display backlight button, power unlock (FN + P))
@mpi3d @aymanbagabas
- smart charging test (this is not the final implementation. there may be conflicts with thresholds)
- finish the LEDs and hwmon
- I don't like quirks
- wq branch
- there are still unrealized WMI methods
using Ghidra to reverse engineer Huawei PC Manger will definitely help. You can decompile the DLLs that come with PC Manager and try to understand how it works.
@aymanbagabas Can I hook atkbd events? Or do I need to patch atkbd to remove these messages in dmesg? It would be nice to get events from hotkeys (keyboard backlight key, display backlight button, power unlock (FN + P))
The atkbd driver emits these keys. And since huawei-wmi handles key inputs using linux/input/sparse-keymap
, we can ignore atkbd events and rely on huawei-wmi registered input device to do the right action.
You can ignore atkbd events using SystemdD keyboard hwdb
@sermart1234
@mpi3d Do you have any ideas to improve the smart charging interface?
Sorry, I did not see your message. I don't know, really, what smart charging does. When I activate it, just charge to 100%. Even on Windows. Is it supposed to do something else?
@aymanbagabas
using Ghidra to reverse engineer Huawei PC Manger will definitely help. You can decompile the DLLs that come with PC Manager and try to understand how it works.
I wish I could help. But I'm already busy with making the fingerprint sensor work. Also, I don't know how this work for now. Of course, I can learn, but since you are already working on it, I prefer working on the fingerprint sensor.
experimental support smart charge