Huawei WMI laptop extras linux driver
NOTE: Version v2.0 is the one in mainline kernel >= 5.0, this repository is used for testing and development purposes. v3.3 has been merged in kernel 5.5
This driver adds support for some of the missing features found on Huawei laptops running linux. It implements Windows Management Instrumentation (WMI) device mapping to kernel. Supported features are:
- Function hotkeys, implemented in v1.0
- Micmute LED, implemented in v2.0. Updated in v3.0 to work with newer laptops.
- Battery protection, implemented in v3.0. Updated in v3.3 to use battery charge API.
- Fn-lock, implemented v3.0.
Battery protection can accessed from either
Fn-lock can be accessed from
Check out matebook-applet for a GUI to control Fn-lock and battery protection.
Make sure you're using kernel >= 5.0. You can get this driver from here if you want to use DKMS modules for easy installation.
Use RPM package for Fedora
Install the RPM package provided here.
Use dkms tarball installation
VER to the desired module version.
- Add dkms tarball and install module
sudo dkms ldtarball --archive=huawei-wmi-VER-source-only.dkms.tar.gz # For autoinstallation sudo dkms autoinstall -m huawei-wmi/VER # For one-time installation sudo dkms install huawei-wmi/VER
Build from source
- Make sure you have your kernel headers. In Fedora that would be:
sudo dnf install kernel-headers kernel-devel
Should be similar in other distributions. 2. Clone and update / install the module.
git clone https://github.com/aymanbagabas/Huawei-WMI cd Huawei-WMI make # To update use: sudo cp huawei-wmi.ko /lib/modules/$(uname -r)/updates/ sudo depmod # To install use: sudo make install reboot
This method overwrites the exsiting version of
huawei-wmi that comes with
kernel 5.0. You have to redo it everytime the kernel gets updated.
NOTE: Ignore this if you're running
systemd-udev > 240.
One of the keys,
micmute, wouldn't work after inserting the module and that is
due to an issue with X.Org. The solution would be to remap it to using
/etc/udev/hwdb.d/ then update the hwdb tables:
sudo udevadm --debug hwdb --update; sudo udevadm trigger
Merge driver into upstreamMerged in Linux > 4.20. Commit log Getting device LEDs to workSee this and this
- Support more devices
- ACPI driver?
Fork, modify, and pull request.
- Thanks to Daniel Vogelbacher @cytrinox and Jan Baer @janbaer for testing the module on the Matebook X (2017).
- Big thanks to @nekr0z for testing this driver on his Matebook 13 (2019)
WRT-WX9and for his awesome project matebook-applet.
- Thanks to @wasakakero for testing this driver on the Matebook D 14-AMD