4 ms·
One project I made for myself was to to wtite a kernel module that could control the led backlight of my laptop keyboard. I had to first reverse engineer the w
by kuter 3y ago
One project I made for myself was to to wtite a kernel module that could control the led backlight of my laptop keyboard.
I had to first reverse engineer the windows utility that was written in c# and found out that it used wmi commands. After reading the kernel code for a while I realized there where already some code that implemented HP WMI commands.
Using that as a foundation it was quite easy to write my own kernel module that could change the led colors. Then I tried to integrate it with the linux kernel's led API. Since the LEDs where RGB it was a little different to integrate but I managed to find some examples in some playstation joystick driver code.
This project was a lot of fun, but I would say that you should be careful not to break your hardware. I have broken devices even from the user space by pushing it beyond it's limits.
- lloydatkinson 3y agoThat's cool! Did you publish the module somewhere? Could it be in mainline?
- kuter 3y agoThis is kinda funny but I was going to try to get it merged to mainline but then realized there was already a similar patch waiting on review. This my code, large part of it is based on other HP WMI stuff https://github.com/kuterd/hp_omen_led_controler https://github.com/kuterd/hp_omen_led_controler