Hot-switching power modes (Fn+Q switch between power-saving, balanced, and beast modes in Windows)
Monitor fan speed and temperature through additional sensors
Adjust fan curves (available for some models)
Switch Fn lock via software; use F1-F12 keys' special functions without pressing Fn
Adjust battery fast charging, normal, and maintenance modes
GPU/CPU overclocking functions supported by Lenovo BIOS
Adjust Legion lighting
The official author has only tested and adapted this for some Legion computers, but it also works on my Yoga Pro 14s 2022. I suspect more Lenovo laptops can use this driver, so I am sharing this post. This post primarily shares how to enable this driver on unsupported laptops, at your own risk. If your laptop is on the project's supported list, follow the GitHub method.
**Dependencies Installation:**I am using Fedora, but for Debian/Ubuntu/Deepin, the command should be:
If your laptop is not on the supported list, you will see in the kernel log: legion_laptop not loaded for this device. Therefore, we need to add compile options in the LenovoLegionLinux/kernel_module/Makefile file as shown below:
sudo make forcereloadmodule_disableplatformprofile
This compile option passes the force and ignore platform options to the driver module, so after successful execution, all features will be enabled. However, this does not necessarily mean your computer can use them (for instance, my computer cannot manually adjust fan curves or control the lighting on the A side because it simply doesn't have these features).
If you see legion_laptop loaded for this device in the kernel log, it means the driver is loaded. At this point:
sudo cat /sys/kernel/debug/legion/fancurve
You should be able to see your fan curve.
Formal Installation
After testing and confirming no issues, formally install it:
make
sudo make install
Note: If your computer is unsupported, it still won't work after a reboot because the module parameters weren't passed. Therefore, create a legion-laptop.conf file in /etc/modprobe.d, and add:
Reboot. You will notice that adjusting system settings for balance/power-saving/performance will automatically switch the motherboard between balanced/power-saving/beast modes. For more advanced features, execute in the project's root directory:
[Experience Sharing] Experimentally Enabling Lenovo Computer Manager Functionality for Lenovo Computers (Xiaoxin, Yoga, Legion)
Project Address: LenovoLegionLinux on GitHub
Main Features:
The official author has only tested and adapted this for some Legion computers, but it also works on my Yoga Pro 14s 2022. I suspect more Lenovo laptops can use this driver, so I am sharing this post. This post primarily shares how to enable this driver on unsupported laptops, at your own risk. If your laptop is on the project's supported list, follow the GitHub method.
**Dependencies Installation:**I am using Fedora, but for Debian/Ubuntu/Deepin, the command should be:
sudo apt-get updatesudo apt-get install -y make gcc linux-headers-$(uname -r) build-essential git lm-sensors wget python3-pyqt5 python3-yaml python3-venv python3-pip python3-argcomplete# Install the following for installation with DKMSsudo apt-get install dkms openssl mokutilCompile and Test
git clonehttps://github.com/johnfanv2/LenovoLegionLinux.gitcd LenovoLegionLinux/kernel_modulemakesudo make reloadmodulesudo dmesg # Check kernel logsIf your laptop is not on the supported list, you will see in the kernel log:
legion_laptop not loaded for this device. Therefore, we need to add compile options in theLenovoLegionLinux/kernel_module/Makefilefile as shown below:forcereloadmodule_disableplatformprofile:rmmod legion-laptop.ko || trueinsmod legion-laptop.ko force=1 enable_platformprofile=0dmesg --ctimebash -c "./issue-warning.sh"Then execute:
sudo make forcereloadmodule_disableplatformprofileThis compile option passes the force and ignore platform options to the driver module, so after successful execution, all features will be enabled. However, this does not necessarily mean your computer can use them (for instance, my computer cannot manually adjust fan curves or control the lighting on the A side because it simply doesn't have these features).
If you see
legion_laptop loaded for this devicein the kernel log, it means the driver is loaded. At this point:sudo cat /sys/kernel/debug/legion/fancurveYou should be able to see your fan curve.
Formal Installation
After testing and confirming no issues, formally install it:
makesudo make installNote: If your computer is unsupported, it still won't work after a reboot because the module parameters weren't passed. Therefore, create a
legion-laptop.conffile in/etc/modprobe.d, and add:options legion-laptop force=1 enable_platformprofile=0Reboot. You will notice that adjusting system settings for balance/power-saving/performance will automatically switch the motherboard between balanced/power-saving/beast modes. For more advanced features, execute in the project's root directory:
sudo python/legion_linux/legion_linux/legion_gui.pyfancurve can adjust more advanced settings.
PS: If your computer works normally, please provide a report to the author in the project issues as per the format.