-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add keyboard backlight timeout as an option #38
Comments
Do you know for a fact that changing keyboard backlight timeout is at all possible on yout MateBook? I don’t really know about D14, but at least for the MateBook 13 I own I know no way to tweak that on any operating system. I was actually under impression it wasn’t possible on any MateBooks. (Originally published at: https://evgenykuznetsov.org/en/reactions/2020/matebook-keyb-backlight/) |
Hi, @nekr0z I have the model NBL-WAQ9R Matebook D14 2020, the software that comes preinstalled with this laptop have the option to never turn off, I wiped out this operative system but this article show what I'm talking about. |
Wow! I had no idea! @aymanbagabas, this is definitely worth looking into. |
Interesting! Could you please provide an ACPI dump? |
Hi, @aymanbagabas thanks for the link, I followed the instructions and I attached the zipped result file. (For the record I use Fedora as operative system) |
This looks promising, these 2 methods 'looks' like the ones to get/set the keyboard backlight (assuming
Could you try these commands out and report the output
|
Hi, @aymanbagabas I get these results for the 3 states of the keyboard backlight Keyboard backlight turn off: echo 0x000602 | sudo tee /sys/kernel/debug/huawei-wmi/arg [root@Huawei-NBL-WAQ9R ~]# cat /sys/kernel/debug/huawei-wmi/call Keyboard backlight level 1: [german.rios.gonzalez@Huawei-NBL-WAQ9R ~]$ echo 0x000602 | sudo tee /sys/kernel/debug/huawei-wmi/arg [root@Huawei-NBL-WAQ9R ~]# cat /sys/kernel/debug/huawei-wmi/call Keyboard backlight level 2: [german.rios.gonzalez@Huawei-NBL-WAQ9R ~]$ echo 0x000602 | sudo tee /sys/kernel/debug/huawei-wmi/arg [root@Huawei-NBL-WAQ9R ~]# cat /sys/kernel/debug/huawei-wmi/call |
Hahaa, bingo! I gotta try this in my machine. You can see the changes here in the first and last cases (the second seems odd). Looking at the methods, the available values are 0x04, 0x08, and 0x10. Could you try these with each value and observe the changes to the keyboard backlight
|
Hi, I can't see any difference maybe I do it wrong? Keyboard backlight level 2 and 0x04: [german.rios.gonzalez@Huawei-NBL-WAQ9R ~]$ echo 0x0x040702 | sudo tee /sys/kernel/debug/huawei-wmi/arg [root@Huawei-NBL-WAQ9R ~]# sudo cat /sys/kernel/debug/huawei-wmi/call Keyboard backlight level 2 and 0x08: [german.rios.gonzalez@Huawei-NBL-WAQ9R ~]$ echo 0x0x080702 | sudo tee /sys/kernel/debug/huawei-wmi/arg [root@Huawei-NBL-WAQ9R ~]# sudo cat /sys/kernel/debug/huawei-wmi/call Keyboard backlight level 2 and 0x10: [german.rios.gonzalez@Huawei-NBL-WAQ9R ~]$ echo 0x0x100702 | sudo tee /sys/kernel/debug/huawei-wmi/arg [root@Huawei-NBL-WAQ9R ~]# sudo cat /sys/kernel/debug/huawei-wmi/call |
Ok, there is a catch, you gotta run each set of commands twice to get a result, otherwise, you'll get 0x01. |
Sorry for the delay, but I think I screwed again, because I can't see any change, for example this is the value that I need to echo 0x0x040702?? or is 0x040702? Do you prefer that I add the results as an attachment? [german.rios.gonzalez@Huawei-NBL-WAQ9R ~]$ echo 0x0x040702 | sudo tee /sys/kernel/debug/huawei-wmi/arg [german.rios.gonzalez@Huawei-NBL-WAQ9R ~]$ echo 0x0x040702 | sudo tee /sys/kernel/debug/huawei-wmi/arg [german.rios.gonzalez@Huawei-NBL-WAQ9R ~]$ echo 0x0x080702 | sudo tee /sys/kernel/debug/huawei-wmi/arg [german.rios.gonzalez@Huawei-NBL-WAQ9R ~]$ echo 0x0x080702 | sudo tee /sys/kernel/debug/huawei-wmi/arg [german.rios.gonzalez@Huawei-NBL-WAQ9R ~]$ echo 0x0x100702 | sudo tee /sys/kernel/debug/huawei-wmi/arg [german.rios.gonzalez@Huawei-NBL-WAQ9R ~]$ echo 0x0x100702 | sudo tee /sys/kernel/debug/huawei-wmi/arg |
No, it's gonna be in this form 0x080702 |
My bad, here are the results now Keyboard backlight level 2 and 0x04: [german.rios.gonzalez@Huawei-NBL-WAQ9R ~]$ echo 0x040702 | sudo tee /sys/kernel/debug/huawei-wmi/arg [root@Huawei-NBL-WAQ9R ~]# cat /sys/kernel/debug/huawei-wmi/call [german.rios.gonzalez@Huawei-NBL-WAQ9R ~]$ echo 0x040702 | sudo tee /sys/kernel/debug/huawei-wmi/arg Keyboard backlight level 2 and 0x08: [german.rios.gonzalez@Huawei-NBL-WAQ9R ~]$ echo 0x080702 | sudo tee /sys/kernel/debug/huawei-wmi/arg [german.rios.gonzalez@Huawei-NBL-WAQ9R ~]$ echo 0x080702 | sudo tee /sys/kernel/debug/huawei-wmi/arg Keyboard backlight level 2 and 0x10: [german.rios.gonzalez@Huawei-NBL-WAQ9R ~]$ echo 0x100702 | sudo tee /sys/kernel/debug/huawei-wmi/arg [german.rios.gonzalez@Huawei-NBL-WAQ9R ~]$ echo 0x100702 | sudo tee /sys/kernel/debug/huawei-wmi/arg |
Did the keyboard backlight change?
… On Aug 14, 2020, at 12:30 PM, Germán Ríos González ***@***.***> wrote:
My bad, here are the results now
Keyboard backlight level 2 and 0x04:
***@***.*** ~]$ echo 0x040702 | sudo tee /sys/kernel/debug/huawei-wmi/arg
0x040702
***@***.*** ~]# cat /sys/kernel/debug/huawei-wmi/call
[{0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}]
***@***.*** ~]$ echo 0x040702 | sudo tee /sys/kernel/debug/huawei-wmi/arg
0x040702
***@***.*** ~]# cat /sys/kernel/debug/huawei-wmi/call
[{0x00,0x00,0x00,0x00},{0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}]
Keyboard backlight level 2 and 0x08:
***@***.*** ~]$ echo 0x080702 | sudo tee /sys/kernel/debug/huawei-wmi/arg
0x080702
***@***.*** ~]# cat /sys/kernel/debug/huawei-wmi/call
[{0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}]
***@***.*** ~]$ echo 0x080702 | sudo tee /sys/kernel/debug/huawei-wmi/arg
0x080702
***@***.*** ~]# cat /sys/kernel/debug/huawei-wmi/call
[{0x00,0x00,0x00,0x00},{0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}]
Keyboard backlight level 2 and 0x10:
***@***.*** ~]$ echo 0x100702 | sudo tee /sys/kernel/debug/huawei-wmi/arg
0x100702
***@***.*** ~]# cat /sys/kernel/debug/huawei-wmi/call
[{0x00,0x00,0x00,0x00},{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}]
***@***.*** ~]$ echo 0x100702 | sudo tee /sys/kernel/debug/huawei-wmi/arg
0x100702
***@***.*** ~]# cat /sys/kernel/debug/huawei-wmi/call
[{0x00,0x00,0x00,0x00},{0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}]
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#38 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAYKJ3HEILA7F7PNA7RRTWDSAVRARANCNFSM4P442EFQ>.
|
Yeah, after the 0x04 the second time it turn off the backlight, the 0x08 the second time turn on the backlight in level 1, and the 0x10 the second time turn on the backlight on the level 2 |
@nekr0z can you confirm this is working on your machine? |
Yes and no. 0x04 followed by a call switches backight to full on my machine (no need to do the commands twice either, once is enough), while 0x08 and 0x10 do nothing. And neither of these commands do anything to the duration of the backlight. |
I guess that's still good news! It means we can control the keyboard backlight from the software. I'll look more into the timeout duration. |
As for the timeout duration, I don't believe this option was available before 2020, so it may be exclusive to the newer models. I definitely remember the corresponding woes on a forum dedicated to WRT-W19. That being said, it's cool that keyboard backlight can be controlled from software — even on my model (and I guess on MBX as well?); it's even more cool that at least new models allow for backlight duration control; and it's absolutely great that you're on the right track to figuring these things out. ;) Don't hesitate to ping me if anything needs testing on a WRT-W19. |
@german-rios-gonzalez can you provide a |
Hi @aymanbagabas off course dmidecode 3.2Getting SMBIOS data from sysfs. SMBIOS implementations newer than version 3.2.0 are notfully supported by this version of dmidecode.Table at 0xAE2DD000. Handle 0x0000, DMI type 0, 26 bytes Handle 0x0001, DMI type 1, 27 bytes Handle 0x0002, DMI type 2, 15 bytes Handle 0x0003, DMI type 3, 23 bytes Handle 0x0004, DMI type 4, 48 bytes Handle 0x0005, DMI type 7, 27 bytes Handle 0x0006, DMI type 7, 27 bytes Handle 0x0007, DMI type 7, 27 bytes Handle 0x0008, DMI type 9, 17 bytes Handle 0x0009, DMI type 9, 17 bytes Handle 0x000A, DMI type 11, 5 bytes Handle 0x000B, DMI type 13, 22 bytes Handle 0x000C, DMI type 16, 23 bytes Handle 0x000D, DMI type 17, 40 bytes Handle 0x000E, DMI type 17, 40 bytes Handle 0x000F, DMI type 18, 23 bytes Handle 0x0010, DMI type 18, 23 bytes Handle 0x0011, DMI type 18, 23 bytes Handle 0x0012, DMI type 19, 31 bytes Handle 0x0013, DMI type 20, 35 bytes Handle 0x0014, DMI type 20, 35 bytes Handle 0x0015, DMI type 21, 7 bytes Handle 0x0016, DMI type 22, 26 bytes Handle 0x0017, DMI type 43, 31 bytes Handle 0xFEFF, DMI type 127, 4 bytes |
Please try https://github.com/aymanbagabas/Huawei-WMI/tree/feat/kbdlight and report the behavior. FYI, I haven't tested it on my machine (I don't have it on me at the moment) so you might encounter kernel panics 🤞 @nekr0z I'd love it if you can test this too. You'd need to load the driver with |
Ooh, interesting, it works! Well, somewhat. ;-) I installed the patched driver onto my machine and rebooted. Nothing new. Then, I Now, my WRT-W19 has 3 modes of keyboard lighting: "off" (self-explanatory), "half" (low brighness for about 15 seconds, then turning off), and "full" (bright about 15 seconds, then turning off). The modes are controlled by a dedicated key (combined with F3) and switch in cycle, with one caveat: if the keyboard is in "half" or "full" mode and the lighting has timed out, pushing the key doesn't switch to the next mode, it only turns the lighting on. Well, here are the results of my playing with
|
Hi @aymanbagabas, I don't know if I do it all ok, but the keyboard can cycle through the 3 levels of backlight, from off, to medium, to maximum, and the timeout it's off 💃, and there isn't kernel panics signals yet, I'm going to work all day and be right back if anything went wrong |
I finally was able to run this on my machine (MACH-WX9) and I see a couple of differences.
The return buf always returns |
@nekr0z could you please provide a
|
@german-rios-gonzalez your device doesn't seem to have |
@nekr0z @german-rios-gonzalez I've updated https://github.com/aymanbagabas/Huawei-WMI/tree/feat/kbdlight to fix some issues. @nekr0z I've noticed that whenever I change |
Hi, @aymanbagabas so far it's working without issues, I didn't notice any drawbacks, the time out it's off and the keyboard backlight it's always on |
@aymanbagabas Try use kernel module
Offset 0x18 - KBBH |
@aymanbagabas also Honor Magicbook 2019 |
@sermart1234 Could you test this on a Honor Magicbook 2019? |
@keltkelt I need to peek through your laptop's ACPI tables. Could you please provide a
|
@sermart1234 I'm still surprised why You call the WMI interface method,
Now here
Now when you look at
I've also found an unmerged patch that might help in further debug this https://www.spinics.net/lists/platform-driver-x86/msg00525.html. The patch has gone to a v3 and is dated to 2010.
|
@aymanbagabas,
I think, something is constantly changing the |
@aymanbagabas, how I can call |
You gotta switch to Windows kernel-mode and setup On Linux, I use |
Hi, I would like to thank you for the initiative because the timeout pseudo-feature is really annoying. I tried to compile the module using the branch mentionned here #38 (comment) but no kbdlight interface appears under I have also tried sermart1234's repository (https://github.com/sermart1234/Huawei-WMI) but the kbdlight_timeout doesn't appear in interfaces. Could you please have a look and help me with this? I have attached the acpI files. |
Hi @Nonta72, As you can see in this discussion, the state of kbdlight and kbdlight_timeout is inconsistent across these devices, my device in particular doesn't have such functionality so I can't really test these things. @sermart1234 did a good job in implementing both functionalities but it's only been tested on his device AFAICT. |
It seems like it's indeed inconsistent |
No, it didn't. But the BIOS contains the kbdlight control methods, although they behave weirdly. Changing the backlight doesn't take effect immediately. It seems like you're right about devices released before 2020. If someone could make a PR for applying a quirk that disables kbdlight and kbdlight_timeout functionality for these devices in the feat/kbdlight branch then we could test it and verify that it works before submitting it to the Linux x86-platform mailing list. |
I still don't understand something, you have a Matebook from 2018 (the PRO version). I have the normal version from the same year. The design and components are pretty close (except the size I guess). Yet you have the option working with the driver. Which BIOS version are you on? And how did you exactly find the references to keyboard backlight? I checked all ACPI files (from DSDT to SSDT) and checked the EFI variables with no specific reference to keyboard backlight. |
After analyzing multiple ACPI files for different devices, I noticed that there is a common ACPI device that defines a unified interface Here's what it looks like from my ACPI tables: Method (WMAA, 3, Serialized)
{
Acquire (MUTW, 0xFFFF)
Name (WMRP, Package (0x02)
{
Buffer (0x04){},
Buffer (0x0100){}
})
Local0 = Arg2
CreateByteField (Local0, Zero, MFID)
CreateByteField (Local0, One, SFID)
Local1 = DerefOf (WMRP [One])
CreateByteField (Local1, Zero, STAT)
STAT = One
Switch (MFID)
{
Case (One)
{
Switch (SFID)
{
Case (One)
{
Local1 = GVER (Local0)
}
}
}
Case (0x02)
{
Switch (SFID)
{
Case (One)
...
Case (0x02)
...
Case (0x03)
...
Case (0x04)
...
Case (0x05)
...
Case (0x06)
{
Local1 = GLIV (Local0)
}
Case (0x07)
{
Local1 = SLIV (Local0)
}
Case (0x08)
...
}
...
Case (0x04)
{
Switch (SFID)
{
...
Case (0x06)
{
Local1 = GFRS (Local0)
}
Case (0x07)
{
Local1 = SFRS (Local0)
}
...
}
} You can see that it switches on the first 2 parameters and then calls another function with the same WMI function parameter. These functions are defined in the DSDT table. In this example, you can see how the FN_LOCK command work. I would imagine using Ghidra or IDA to reverse-engineer Huawei PC Manager and WinDbg in kernel-mode would lead you more in the right direction to figure out how everything is tied up together. I hope this helps explain how all this works. Let me know if you have any other questions. Different devices have different implementations for each function. You can refer to the WIKI for my collection of ACPI tables for different Huawei devices. |
That's an amazing work. I have a MACH-WX9 (2018) if you want me to run some tests or something like that. |
@aymanbagabas Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: HUAWEI
Product Name: NBLL-WXX9
Version: M1040
Serial Number: 6DSPM20720001666
UUID: 1b7bd74e-311e-48b1-b92e-18d7676f51af
Wake-up Type: Power Switch
SKU Number: C233
Family: MateBook D GLIV and SLIV in DSDT: Method (GLIV, 1, NotSerialized)
{
Name (BUFF, Buffer (0x0100) {})
Name (CONT, Zero)
Local0 = Arg0
CreateByteField (BUFF, Zero, STAT)
CreateByteField (BUFF, One, SURV)
CreateByteField (BUFF, 0x02, KBBL)
CONT = Zero
Acquire (\_SB.PCI0.LPC0.EC0.ECMT, 0x03E8)
\_SB.PCI0.LPC0.EC0.ECM3 (0xC4)
While (((CONT != 0x0A) && ((\_SB.PCI0.LPC0.EC0.ECXC & One) == Zero)))
{
CONT += One
Sleep (0x32)
}
If ((\_SB.PCI0.LPC0.EC0.ECXD == 0x04))
{
KBBL = Zero
STAT = Zero
}
ElseIf ((\_SB.PCI0.LPC0.EC0.ECXD == 0x08))
{
KBBL = 0x32
STAT = Zero
}
ElseIf ((\_SB.PCI0.LPC0.EC0.ECXD == 0x10))
{
KBBL = 0x64
STAT = Zero
}
Else
{
STAT = One
}
Release (\_SB.PCI0.LPC0.EC0.ECMT)
Return (BUFF) /* \GLIV.BUFF */
}
Method (SLIV, 1, NotSerialized)
{
Name (BUFF, Buffer (0x0100) {})
Local0 = Arg0
CreateByteField (Arg0, 0x02, KBBV)
CreateByteField (BUFF, Zero, STAT)
Acquire (\_SB.PCI0.LPC0.EC0.ECMT, 0x03E8)
If ((KBBV == Zero))
{
\_SB.PCI0.LPC0.EC0.ECM3 (0xC5)
\_SB.PCI0.LPC0.EC0.ECD3 (0x04)
STAT = Zero
}
ElseIf ((KBBV == 0x02))
{
\_SB.PCI0.LPC0.EC0.ECM3 (0xC5)
\_SB.PCI0.LPC0.EC0.ECD3 (0x08)
STAT = Zero
}
ElseIf ((KBBV == 0x04))
{
\_SB.PCI0.LPC0.EC0.ECM3 (0xC5)
\_SB.PCI0.LPC0.EC0.ECD3 (0x10)
STAT = Zero
}
Else
{
STAT = One
}
Release (\_SB.PCI0.LPC0.EC0.ECMT)
Return (BUFF) /* \SLIV.BUFF */
} I met the same situation as @nekr0z that I can set the timeout but cannot set the kbdlight. |
entry in ssdt7 Case (0x02)
{
...
Case (0x06)
{
Local0 = GLIV /* External reference */
Local1
}
Case (0x07)
{
Local0 = SLIV /* External reference */
Local1
}
...
} |
I guess the method is designed for certain categories. There might be no physics interfaces for keyboard backlight featuring with timeout to set brightless level. |
It seems like timer unit has occupied the registers of led unit, which could be used to set the brightless level. All above could be proved if get the pcb spec. |
Hello! Admittedly, I haven't read all the messages in this issue, but I have a Matebook D 16 (HVY-WXX9-PCB) with AMD Ryzen 5 4600H, running Arch Linux, with whatever latest kernel they are providing (6.2.13 as of now). This kernel seems to ship some version of huawei-wmi, but it doesn't really allow me to do much other than change screen brightness, lock fn, and turn micmute led on and off (speaking of which, for some reason it doesn't turn on and off when I mute and unmute mic, but I am still able to use /sys/devices/platform/huawei-wmi/leds/platform::micmute; I guess it's KDE's fault for not integrating the led with the mic mute, but I may be wrong). So I've used the huawei-wmi-dkms-kbdlight-git AUR package to install this module's version from the kbdlight branch of the repo. And I am happy to report that However, I still have two small issues:
|
hello everyone! I agree, the backlight timeout is very annoying. I have a Matebook 13 AMD 2020 (HN-WX9X) and after installing the package from aur huawei-wmi-dkms-kbdlight-git there is no kbdlight_timeout switch, only kbdlight which is equal: Thx! |
Did you |
Without this module, there are no these switches |
https://github.com/nonkerdoob/SmokelessCPU-Guides/blob/main/Guides/Linux/ACPI_WMI_FEATURE.md https://lwn.net/Articles/725725/ I wanted to use WMI from Windows (userspace), but I find https://blog.acedroidx.top/HuaweiBatteryControl/#%E6%9C%80%E7%BB%88%E6%88%90%E6%9E%9C |
I have matebook 16s, here is my dmidecode thanks! |
@lemonup, send acpidump please |
|
I'd like to help in troubleshooting. |
Hi, first of all thank you very much for this project, the effort and the great results, I came here because by default the keyboard backlight timeout it's about 15 seconds on my Matebook D14 2020, and currently I can't find a way to set the backlight always on, I don't have any knowledge about the kernel internals but I guess you can add this option on this project, this would be wonderful for people that work in dark conditions.
The text was updated successfully, but these errors were encountered: