-
-
Save vzaliva/0adba7bc40e2f31a0b5f802af2a63267 to your computer and use it in GitHub Desktop.
| #!/bin/bash | |
| # Vadim Zaliva [email protected] | |
| # based on https://gist.github.com/hadess/6847281 | |
| if [[ $EUID -ne 0 ]]; then | |
| echo "This script must be run as root" 1>&2 | |
| exit 1 | |
| fi | |
| usage() { | |
| echo "This script controll keyboard backlight on IBM ThinkPad X-series" | |
| echo "Usage: ThinkLight [0|1|2]" | |
| echo " 0 - off" | |
| echo " 1 - medium" | |
| echo " 2 - full" | |
| } | |
| if [ "$#" -ne 1 ];then | |
| usage | |
| exit 1 | |
| fi | |
| case "$1" in | |
| 0) | |
| b="\x03" | |
| ;; | |
| 1) | |
| b="\x43" | |
| ;; | |
| 2) | |
| b="\x83" | |
| ;; | |
| *) | |
| usage | |
| exit 1 | |
| esac | |
| sudo modprobe -r ec_sys | |
| sudo modprobe ec_sys write_support=1 | |
| echo -n -e "$b" | sudo dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=13 count=1 conv=notrunc 2> /dev/null |
Fn+SPACE also Not work!, Thanks for your response
@vzaliva are you know where I can find some solution for this problem
@omamkaz sorry, I do not know. I think Fn+SPACE was supported in firmware. Try to boot windows and see if it works there. Perhaps you have a hardware problem.
@omamkaz sorry, I do not know. I think Fn+SPACE was supported in firmware. Try to boot windows and see if it works there. Perhaps you have a hardware problem.
Ok, Thanks
Thanks for the many insights!
Kinda works on my ThinkBook 14 G2 ITL (20VD00CNRA)
address is 3 dec and values are 0x1c, 0x1d and 0x1e for off, low, hi, respectively.
echo -n -e "\x1c" | sudo dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=3 count=1 conv=notrunc
Thanks for the many insights! Kinda works on my ThinkBook 14 G2 ITL (20VD00CNRA) address is 3 dec and values are 0x1c, 0x1d and 0x1e for off, low, hi, respectively.
echo -n -e "\x1c" | sudo dd of="/sys/kernel/debug/ec/ec0/io" bs=1 seek=3 count=1 conv=notrunc
How do you determine if your addresses and values are different and what they actually are?
@omamkaz Sorry I do not have this model to test and help. For what it's worth it does not work on my Carbon X1 either.
But you can use Fn+SPACE keyboard sequence.