Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Huawei WMI laptop extras linux driver

License

NotificationsYou must be signed in to change notification settings

aymanbagabas/Huawei-WMI

Repository files navigation

DonateDonate

NOTE: Version v2.0 is the one in mainline kernel >= 5.0, this repository is used fortesting and development purposes. v3.3 has been merged in kernel 5.5

This driver adds support for some of the missing features found on Huaweilaptops 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/sys/class/power_supply/BAT0/charge_control_{start,end}_threshold or/sys/devices/platform/huawei-wmi/charge_control_thresholds

Fn-lock can be accessed from/sys/devices/platform/huawei-wmi/fn_lock_state

This driver requires kernel >= 5.1. If you're on kernel <= 5.0, please refer totagv1.0 for kernel < 5.0 or tagv3.2 if you're running version 5.0.

Check outmatebook-applet for a GUIto control Fn-lock and battery protection.

Installation

Make sure you're using kernel >= 5.0.You can get this driver fromhere if you want to useDKMS modules for easy installation.

Use RPM package for Fedora

Install the RPM package providedhere.

Use dkms tarball installation

Note: changeVER to the desired module version.

  1. Grabhuawei-wmi-VER-source-only.dkms.tar.gz fromhere
  2. Add dkms tarball and install module
sudo dkms ldtarball --archive=huawei-wmi-VER-source-only.dkms.tar.gzsudo dkms install huawei-wmi/VER
  1. Reboot

Build from source

  1. 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 andupdate /install the module.

git clone https://github.com/aymanbagabas/Huawei-WMIcd Huawei-WMImake# To update use:sudo cp huawei-wmi.ko /lib/modules/$(uname -r)/updates/sudo depmod# To install use:sudo make installreboot

This method overwrites the exsiting version ofhuawei-wmi that comes withkernel 5.0. You have to redo it everytime the kernel gets updated.

Keyboard

NOTE: Ignore this if you're runningsystemd-udev > 240.

One of the keys,micmute, wouldn't work after inserting the module and that isdue to an issue with X.Org. The solution would be to remap it to usingudevhwdb tables.Copy99-Huawei.hwdb to/etc/udev/hwdb.d/ then update the hwdb tables:

sudo udevadm --debug hwdb --update; sudo udevadm trigger

TODO

  • Merge driver into upstream Merged in Linux > 4.20.Commit log
  • Getting device LEDs to work Seethis andthis
  • Support more devices
  • ACPI driver?

Contribution

Fork, modify, and pull request.

Credits

  • Thanks to Daniel Vogelbacher@cytrinox and JanBaer@janbaer for testing the module on theMatebook X (2017).
  • Big thanks to@nekr0z for testing this driver on his Matebook 13 (2019)WRT-WX9 and for his awesome projectmatebook-applet.
  • Thanks to@wasakakero for testing this driver on the Matebook D 14-AMDKPL-W0X.

[8]ページ先頭

©2009-2025 Movatter.jp