{"id":15003687,"url":"https://github.com/aymanbagabas/huawei-wmi","last_synced_at":"2025-10-09T18:04:07.792Z","repository":{"id":33265341,"uuid":"153878387","full_name":"aymanbagabas/Huawei-WMI","owner":"aymanbagabas","description":"Huawei WMI laptop extras linux driver","archived":false,"fork":false,"pushed_at":"2025-08-05T18:18:09.000Z","size":164,"stargazers_count":248,"open_issues_count":16,"forks_count":16,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-09-05T18:43:51.236Z","etag":null,"topics":["driver","huawei","huawei-wmi","linux","linux-kernel"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aymanbagabas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["aymanbagabas"],"patreon":"aymanbagabas","custom":["https://www.paypal.me/aymanbagabas","https://www.buymeacoffee.com/aymanbagabas"]}},"created_at":"2018-10-20T06:56:54.000Z","updated_at":"2025-08-24T14:43:29.000Z","dependencies_parsed_at":"2024-01-13T00:36:58.581Z","dependency_job_id":"c275a736-de74-43e5-9697-b098fcd36fe9","html_url":"https://github.com/aymanbagabas/Huawei-WMI","commit_stats":{"total_commits":99,"total_committers":7,"mean_commits":"14.142857142857142","dds":0.07070707070707072,"last_synced_commit":"ca63d957f3fff7af811c325b391e0f9046565b8e"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/aymanbagabas/Huawei-WMI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aymanbagabas%2FHuawei-WMI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aymanbagabas%2FHuawei-WMI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aymanbagabas%2FHuawei-WMI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aymanbagabas%2FHuawei-WMI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aymanbagabas","download_url":"https://codeload.github.com/aymanbagabas/Huawei-WMI/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aymanbagabas%2FHuawei-WMI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001911,"owners_count":26083225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["driver","huawei","huawei-wmi","linux","linux-kernel"],"created_at":"2024-09-24T19:00:22.455Z","updated_at":"2025-10-09T18:04:07.761Z","avatar_url":"https://github.com/aymanbagabas.png","language":"C","funding_links":["https://github.com/sponsors/aymanbagabas","https://patreon.com/aymanbagabas","https://www.paypal.me/aymanbagabas","https://www.buymeacoffee.com/aymanbagabas","https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=7TMEEVMB4S4G8\u0026currency_code=USD\u0026source=url"],"categories":[],"sub_categories":[],"readme":"# Huawei WMI laptop extras linux driver\n\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=7TMEEVMB4S4G8\u0026currency_code=USD\u0026source=url)\n[![Donate](https://img.shields.io/badge/Donate-Buy%20Me%20A%20Coffee-green)](https://www.buymeacoffee.com/aymanbagabas)\n\n**NOTE: Version v2.0 is the one in mainline kernel \u003e= 5.0, this repository is used for\ntesting and development purposes. v3.3 has been merged in kernel 5.5**\n\nThis driver adds support for some of the missing features found on Huawei\nlaptops running linux. It implements Windows Management Instrumentation (WMI)\ndevice mapping to kernel. Supported features are:\n\n* Function hotkeys, implemented in v1.0\n* Micmute LED, implemented in v2.0. Updated in v3.0 to work with newer laptops.\n* Battery protection, implemented in v3.0. Updated in v3.3 to use battery charge API.\n* Fn-lock, implemented v3.0.\n\nBattery protection can accessed from either `/sys/class/power_supply/BAT0/charge_control_{start,end}_threshold` or `/sys/devices/platform/huawei-wmi/charge_control_thresholds`\n\nFn-lock can be accessed from `/sys/devices/platform/huawei-wmi/fn_lock_state`\n\nThis driver requires kernel \u003e= 5.1. If you're on kernel \u003c= 5.0, please refer to\ntag [v1.0](https://github.com/aymanbagabas/Huawei-WMI/tree/v1.0) for kernel \u003c 5.0 or tag [v3.2](https://github.com/aymanbagabas/Huawei-WMI/tree/v3.2) if you're running version 5.0.\n\nCheck out [matebook-applet](https://github.com/nekr0z/matebook-applet) for a GUI\nto control Fn-lock and battery protection.\n\n## Installation\n\nMake sure you're using kernel \u003e= 5.0.\nYou can get this driver from\n[here](https://github.com/aymanbagabas/Huawei-WMI/releases) if you want to use\nDKMS modules for easy installation.\n\n### Use RPM package for Fedora\n\nInstall the RPM package provided [here](https://github.com/aymanbagabas/Huawei-WMI/releases).\n\n### Use dkms tarball installation\n\nNote: change `VER` to the desired module version.\n\n1. Grab `huawei-wmi-VER-source-only.dkms.tar.gz` from [here](https://github.com/aymanbagabas/Huawei-WMI/releases)\n2. Add dkms tarball and install module\n\n```sh\nsudo dkms ldtarball --archive=huawei-wmi-VER-source-only.dkms.tar.gz\nsudo dkms install huawei-wmi/VER\n```\n3. Reboot\n\n### Build from source\n\n1. Make sure you have your kernel headers. In Fedora that would be:\n\n```sh\nsudo dnf install kernel-headers kernel-devel\n```\n\nShould be similar in other distributions.\n2. Clone and *update* / *install* the module.\n\n```sh\ngit clone https://github.com/aymanbagabas/Huawei-WMI\ncd Huawei-WMI\nmake\n# To update use:\nsudo cp huawei-wmi.ko /lib/modules/$(uname -r)/updates/\nsudo depmod\n# To install use:\nsudo make install\nreboot\n```\n\nThis method overwrites the exsiting version of `huawei-wmi` that comes with\nkernel 5.0. You have to redo it everytime the kernel gets updated.\n\n## Keyboard\n\n**NOTE: Ignore this if you're running `systemd-udev` \u003e 240.**\n\nOne of the keys, `micmute`, wouldn't work after inserting the module and that is\ndue to an issue with X.Org. The solution would be to remap it to using `udev`\nhwdb tables.\nCopy `99-Huawei.hwdb` to `/etc/udev/hwdb.d/` then update the hwdb tables:\n\n```sh\nsudo udevadm --debug hwdb --update; sudo udevadm trigger\n```\n\n## TODO\n\n* ~~Merge driver into upstream~~ Merged in Linux \u003e 4.20. [Commit log](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/drivers/platform/x86/huawei-wmi.c)\n* ~~Getting device LEDs to work~~ See\n[this](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/sound/pci/hda/patch_realtek.c?id=e2744fd7097dd06b751b15395256ec7b7bb62124) and [this](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/sound/pci/hda/patch_realtek.c?id=0fbf21c3b36a9921467aa7525d2768b07f9f8fbb)\n* Support more devices\n* ACPI driver?\n\n## Contribution\n\nFork, modify, and pull request.\n\n## Credits\n\n* Thanks to Daniel Vogelbacher [@cytrinox](https://github.com/cytrinox) and Jan\nBaer [@janbaer](https://github.com/janbaer) for testing the module on the\nMatebook X (2017).\n* Big thanks to [@nekr0z](https://github.com/nekr0z) for testing this driver on his Matebook 13 (2019)\n`WRT-WX9` and for his awesome project [matebook-applet](https://github.com/nekr0z/matebook-applet).\n* Thanks to [@wasakakero](https://github.com/wasakakero) for testing this driver on the Matebook D 14-AMD `KPL-W0X`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faymanbagabas%2Fhuawei-wmi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faymanbagabas%2Fhuawei-wmi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faymanbagabas%2Fhuawei-wmi/lists"}