LINUXMIND.DEVTHE GNU/LINUX WORLD

The first Rust WMI driver in the kernel targets Clevo laptop backlights

Flat editorial illustration of a barebones laptop with five glowing keyboard rows and a firmware chip linked to a gear above it, on a cream background

Rust in the Linux kernel has mostly made news in glamorous places: filesystems, drivers for brand-new hardware, whole subsystems being rewritten. This week it turned up somewhere far more mundane. Nick Dowsett posted a four-patch series adding clevo-laptop, a minimal Rust platform driver for Clevo laptops, intended as the first in-tree user of the kernel’s Rust WMI abstractions.

What the driver actually does

Keep expectations modest: this is an MVP, not a replacement for the existing C-based WMI drivers. The series adds a driver skeleton with Kconfig, Makefile and MAINTAINERS plumbing, a type-safe EC WMI query interface, and registration plus backlight type detection that follows the business rules of tuxedo-drivers. Its single user-visible feature is 5-step white keyboard backlight control.

The numbers are small and telling: 387 lines in drivers/platform/x86/clevo-laptop.rs, 413 insertions across all four patches. It was tested on one machine, a Clevo/Metabox NL57AU. The point is not the feature set but the fact that the driver exercises the abstractions in practice — which is how new subsystem bindings in the kernel usually land.

Clevo is not a niche

Clevo is a Taiwanese contract manufacturer whose barebones get rebadged and sold under a long list of brands. If you bought a no-name performance laptop in the past twenty years, there is a decent chance it was a Clevo underneath, and its keyboard backlight, fan curve and hotkeys are all driven through firmware calls.

  • TUXEDO Computers
  • Metabox
  • Sager
  • XMG

That is the practical reason this driver matters beyond its author’s own machine: one piece of code covers firmware behaviour shared across several vendors’ catalogues. WMI is the channel for exactly that — the interface laptop makers expose for battery thresholds, backlight behaviour, fan profiles and hotkey handling, the things generic ACPI code does not cover.

Three abstractions have to land first

The driver cannot be merged on its own. It depends on infrastructure that is still under review:

  • the Rust WMI abstractions, posted the same day as an MVP by the same author;
  • basic Rust DMI matching abstractions, also posted on 22 November;
  • Markus Probst’s Rust LED classdev abstractions, at v28 after a long review cycle.

None of the three is in mainline today, and the cover letter is explicit that the WMI series implements the bare minimum needed to support this one driver: probe, registration and unregistration, a device ID table, and a safe wmidev_invoke_method that returns an owned RAII buffer. The LED abstractions have gone through 28 revisions, which gives you an idea of how long this kind of plumbing takes to settle.

What changes for you today

Nothing at all. The patches are sitting on the platform-driver-x86 mailing list for review, not merged, and no released kernel contains them. If your Clevo-based laptop already handles its backlight keys, keep doing what you are doing — the existing C-based driver is what runs your hardware. The realistic timeline puts this work, if it is accepted, behind the Linux 7.5 merge window that opens at the end of December, and only once the WMI, DMI and LED abstractions get in first.

Which is precisely why it is worth noting. Kernel Rust stopped being a demonstration when it started showing up in drivers this boring. Firmware glue is where most driver code actually lives, and a language that is a reasonable choice for it is a language with a future in the tree.




Leave a Reply

Your email address will not be published. Required fields are marked *