Fork of clevo-xsm-wmi driver for compatibility with current kernels
2024-12-22The biggest problem with out-of-tree kernel modules is that, well, they are out-of-tree... They tend to break on kernel API changess. For instance, my laptop requires a driver that is not upstreamed to disable or change keyboard backlight color, and to read Fan speed info.
Now, in the past I used the driver clevo-xsm-wmi. This one was maintained by tuxedo computers, but was in fact also useful for many clevo laptops, even when not purchased from tuxedo (such as my rebranded Clevo N850HJ).
Eventually, the driver started breaking with new kernel updates and you had to hope some kind soul would investigate and offer a fix on the issue tracker. After applying a fix, it would work usually for many releases to come. Recently though, the breaks started to reappear and more frequently so. For instance, the driver no longer built on 6.11 and after fixing that, broke again on 6.12
Ultimately, I found the driver actually has been abandoned for quite some time now. It was replaced by tuxedo-keyboard. But, as it turns out, it's also abandoned these days. Now, the replacement is tuxedo-drivers. However, it appears tuxedo no longer wants to support laptops other than their own (kinda understandable). Some competitor has a fork that gets rid of these compatibility checks though.
Anyway, apart from messing wih compatibility checks, the driver also requires enabling new kernel options in my kernel config. While the latter wouldn't kill me, it's also unclear whether the CPU fan info code would be compatible with my laptop (a quick glance says no).
I decided it was time to hack so I forked clevo-xsm-wmi and got it running on 6.12 (after peeking in tuxedo drivers and upstream for some related functions). The goal is to keep it working on current and future kernels, for as long as I will keep using this 7 years old laptop...
Repo: clevo-xsm-wmi-preserved
For comments/remarks: Contact me