What is ACPI?
ACPI is a standard that allows the operating system to communicate with hardware firmware for power management and device configuration. Lenovo laptops expose special ACPI methods that control:- Battery charge thresholds (conservation mode)
- Performance profiles (power saving, extreme performance, intelligent cooling)
- Rapid charge functionality
- Battery status and health information
ACPI is a firmware-level interface. This is why KVantage requires elevated privileges—it’s directly communicating with your laptop’s embedded controller.
The acpi_call Kernel Module
Linux doesn’t expose ACPI methods to userspace by default. Theacpi_call kernel module creates a special file at /proc/acpi/call that allows programs to invoke ACPI methods.
How it works
- KVantage backend (kvand) writes ACPI method calls to
/proc/acpi/call - The kernel module executes these calls against the firmware
- Results are read back from
/proc/acpi/call - The backend parses the response and returns it to the GUI
Why KVantage needs acpi_call
Unlike some system settings that can be controlled through sysfs or other interfaces, Lenovo’s battery and performance controls are only accessible through vendor-specific ACPI methods. There is no alternative interface. The backend implementation inKvandClient.kt:70 shows how commands are sent:
/proc/acpi/call.
Installing acpi_call
Theacpi_call module is not included in the Linux kernel by default. You must install it separately.
Arch Linux
Arch Linux
Install from the official repositories:Load the module:To load automatically at boot:
Fedora
Fedora
Install from RPM Fusion or build from source:Option 1: RPM Fusion (recommended)Wait a few minutes for the module to build, then:Option 2: Build from source
Ubuntu/Debian
Ubuntu/Debian
Option 1: Pre-built package (Ubuntu)Option 2: Build from sourceTo load at boot:
openSUSE
openSUSE
Build from source:To load at boot:
NixOS
NixOS
Add to your Rebuild your system:
configuration.nix:Verifying Installation
Check if the module is loaded
Check if /proc/acpi/call exists
Test basic ACPI access
To verify the module is functional (without making any changes):Lenovo Laptop Compatibility
Why only Lenovo?
Each laptop manufacturer uses different ACPI method names and parameters. For example:- Lenovo uses
\_SB.PCI0.LPC0.EC0.VPC0namespace for battery controls - Dell uses
\_SB.BAT0with different method names - HP uses
\_SB.WMIDfor their WMI interface - ASUS uses
\_SB.ATKDfor keyboard and system controls
System compatibility is limited to Lenovo laptops that expose the ACPI interface using the acpi_call kernel module.
What happens on non-Lenovo laptops?
- The
acpi_callmodule will load successfully /proc/acpi/callwill exist- KVantage will attempt to call Lenovo ACPI methods
- The firmware will return errors because those methods don’t exist
- KVantage features will not work
Verify you have a Lenovo laptop
ACPI Table Differences Between Models
Even among Lenovo laptops, not all models support all features:- ThinkPad series: Generally have the most complete ACPI support
- IdeaPad series: May have limited battery threshold options
- Budget models: May only support basic features
The only thing that is not yet implemented is the option to set a customized battery threshold. By now, it is hardcoded to the default value (which is 80%).This limitation exists because the developer’s laptop doesn’t expose custom threshold controls in its ACPI table.
Troubleshooting ACPI Issues
Module fails to load
Module fails to load
If If the directory doesn’t exist, install kernel headers:Then rebuild acpi_call.
modprobe acpi_call fails:Check for kernel header mismatch:Permission denied on /proc/acpi/call
Permission denied on /proc/acpi/call
This is expected. The file requires root access.KVantage handles this by:
- Running the GUI as your regular user
- Starting the backend daemon with elevated privileges (via sudo/polkit)
- The backend reads/writes
/proc/acpi/callon behalf of the GUI
ACPI calls return errors
ACPI calls return errors
If the module loads but ACPI calls fail:Verify Secure Boot status:Some systems with Secure Boot enabled may block unsigned kernel modules. You may need to:
- Sign the module with your own key
- Disable Secure Boot in BIOS
- Use a pre-signed version from your distro’s repos
Security Considerations
Theacpi_call module is powerful but potentially dangerous:
- It allows arbitrary ACPI method execution
- Malicious or incorrect calls could damage hardware
- It requires root access to prevent abuse
- Privilege separation: GUI runs as user, only backend runs as root (see
Main.kt:24) - Limited command set: The backend only accepts specific, safe commands
- Tested ACPI calls: All methods are tested on Lenovo hardware
- Read-only operations when possible: Status queries don’t modify firmware state
/proc/acpi/call so the GUI never directly touches it.