johnfanv2/LenovoLegionLinux 是一个托管在 GitHub 上的开源项目,主要使用 C 编写,采用 GNU General Public License v2.0 许可证,目前获得 3.5k 个 Star、151 次 Fork。
仓库全名
johnfanv2/LenovoLegionLinux
开源许可证
GNU General Public License v2.0
Star 数
3.5k
Fork 数
151
未关闭 Issue
7
README 摘要
Lenovo Legion Linux Support Other language versions of this README file: 简体中文版简介 This project is not affiliated with Lenovo in any way Lenovo Legion Linux (LLL) brings additional drivers and tools for Lenovo Legion series laptops to Linux. It is the alternative to Lenovo Vantage or Legion Zone (both Windows only). It allows you to control features like the fan curve, power mode, power limits, rapid charging, and…
This project is not affiliated with Lenovo in any way
Lenovo Legion Linux (LLL) brings additional drivers and tools for Lenovo Legion series laptops to Linux. It
is the alternative to Lenovo Vantage or Legion Zone (both Windows only).
It allows you to control features like the fan curve, power mode, power limits, rapid charging, and more. This has been achieved through reverse engineering and disassembling the ACPI firmware, as well as the firmware and memory of the embedded controller (EC).
:star: Please star this repository if this is useful or might be useful in the future.
:star2: My goal is to merge the driver into the main Linux kernel so it comes automatically with Linux and no recompilation is required after a Linux update
:boom: Starring shows that this is useful to me and the Linux community so hopefully a merge into the Kernel is possible.
:rocket: Features
Light on RAM and CPU and without telemetry
Fully controllable using scripts or from the command-line
Simple GUI replacement for Lenovo Vantage: Fan curve, FN Lock, Win Key, Touchpad Power, Camera Power, Battery Conservation, Rapid Charging, Charge output from always on USB, Display Overdrive (only shown when the firmware reports that the panel supports it; not on OLED panels such as the Legion Pro 7 16IAX10H’s), Y-Logo LED Light, IO-Port LED Light, Hybrid Mode (GSync), CPU and GPU Overclock:
Toggle Fn lock; Use special function on F1-F12 keys without pressing the Fn key
Enable or disable touchpad
Set a fully featured custom fan curve with up to 10 points:
Set temperature points for when the fan speed (level) should change
Use CPU, GPU and IC temperature to control the fan all at the same time
Set the fan speed (RPM) at each level
Even allows speed below 1600 RPM
Set minimum temperature for each level that must be fallen below before slowing down the fans again
Set acceleration and deceleration for each the fan when the fan speed should increase or decrease
Save and load presets for different modes
Lock and unlock the fan controller and fan speed
Lift the firmware-imposed fan ceiling on supported models (fan_unlock sysfs / legion_cli fan-unlock-{enable,disable,status}). On the Legion Pro 7 16IRX8H (BIOS KWCN54WW) this raises the cap from ~4400 RPM to ~7100 RPM. Discovered via WMAA(0, 0x0D, 0x01) — see issue #429. The sysfs node is gated behind a has_fan_unlock model/BIOS allowlist and only exposed on validated firmwares (currently KWCN54WW).
Instant Boot: power the laptop on when an AC adapter (instant_boot_ac) or a USB-PD charger (instant_boot_usb_pd) is connected (legion_cli instant-boot-{ac,usb-pd}-{enable,disable,status}, GUI “Other Options”). Exposed only where the DSDT implements the WMI feature ids 0x03010001/0x03010002 (has_instant_boot, currently the Legion Pro 7 16IAX10H / Q7CN and 16AFR10H / SMCN, and the Legion 5 15IRX10 / QNCN).
Switch power mode (quiet, balanced, performance) using software
Now you can do it using software in your system settings
Changing with Fn+Q is also possible
Depending on your desktop environment, you could automatically switch to quiet mode if you are on battery or performance mode when on AC power (e.g. KDE’s Energy Saving settings)
Monitor fan speeds and temperatures (CPU, GPU, IC) using the now available sensors
Enable or disable automatic switching to a “Mini Fan Curve” if temperatures are low for a long time
SmartFan — lightweight shell-based fan daemon for Legion 7 Gen 10+ using acpi_call (no full kernel module needed). 4 modes, smooth ramping, LED sync, TUI switcher. See extra/smartfan/
:mega: Overview
it comes with a driver (kernel module) that implements the Linux standard interfaces (sysfs, debugfs, hwmon)
using standard Linux interfaces makes it is compatible with the command line/file interface or standard GUI tools like psensor
compared to vendor tools for Windows, it even allows to set the fan curve. This allows to keep the fans
slowly and quietly running instead of constantly switching between fans off and loud fans. Perfect for quiet office work. :office:
git clone https://github.com/johnfanv2/LenovoLegionLinux.git
cd LenovoLegionLinux/kernel_module
make
sudo make reloadmodule
Install the build dependencies for your distribution first, then run the
initial usage tests before installing permanently
or via DKMS. See the installation guide for
dependencies per distribution, DKMS, Secure Boot and uninstalling.
:pushpin: Supported Models
Lenovo Legion models from 2020 up to the latest 2025 models probably work, and
several LOQ models are supported as well. If your BIOS version has the same
leading letters as a confirmed model, e.g. EFCN (like EFCN54WW), it will
probably work. See Compatible Models for the
confirmed models and their supported features; the complete list is the DMI
allowlist in kernel_module/legion-laptop.c.
If you want to confirm that your model works or if it does not work, please
raise an issue.
Basis of this work, contributors and tools based on LLL
:handshake: Contributing
Pull requests are very welcome! Filing an issue alone is helpful, but there is only so much developers can do without access to your hardware — especially for “does not work on my model” reports. If you can, please try to fix it yourself:
Clone the repo and modify the code locally (e.g. add your model to the DMI allowlist in kernel_module/legion-laptop.c). AI coding assistants work well for this — the repo ships an AGENTS.md with build and test instructions written for them.
Test it on your own laptop until everything works (see the verification commands in AGENTS.md and the initial usage tests).
Open a pull request that references your issue.
Most of the model support in this project was contributed exactly this way. Also see CONTRIBUTING.md.
:warning: Disclaimer
the tool comes with no warranty. Use at your own risk.
this project is not affiliated with Lenovo in any way.
this is a small hobby project; please be patient and read through this README and the documentation carefully before you ask for support
if your Lenovo Legion laptop is not supported and you are ready to perform some tests please notify me
this is a Linux only tool and will probably not run in WSL; for Windows use one of the available Windows tools
Reference to any Lenovo products, services, processes, or other information and/or use of Lenovo Trademarks does not constitute or imply endorsement, sponsorship, or recommendation thereof by Lenovo.
The use of Lenovo®, Lenovo Legion™, Yoga®, IdeaPad® or other trademarks within this website and associated tools and libraries is only to provide a recognisable identifier to users to enable them to associate that these tools will work with Lenovo laptops.
评论