A GNOME Shell extension that displays power/performance mode status in the panel. Originally designed for Lenovo IdeaPad Gaming 3 15ACH6, but works with any laptop that can use a terminal command to fetch the power mode.
This GNOME extension:
- Executes a configurable command to read the current power mode
- Matches the output against user-defined mode configurations
- Displays the corresponding icon and text in the GNOME panel
You can check the Internet to find your specific ACPI calls or power mode fetch functions that work for your specific laptop model. In my experience they were listed in the Arch Wiki: Lenovo IdeaPad Gaming 3
It can realistically just work with anything or any solution, you just have to get the power mode as a string and you can customize the output to match with the power mode text you want in the extension.
The extension uses pkexec to read /proc/acpi/call which normally requires authentication. To allow passwordless access:
sudo cp 50-acpi-call.rules /etc/polkit-1/rules.d/
rebootSecurity Note: This rule allows commands to access /proc/acpi/call without root password. I don't know what implications this might have to your system.
From source:
cp -r IP3_PowerStatus_GNOME ~/.local/share/gnome-shell/extensions/Compile schemas:
glib-compile-schemas ~/.local/share/gnome-shell/extensions/ip3powerstatus@btnrv/schemas/gnome-extensions enable ip3powerstatus@btnrv- Wayland: Log out and log back in (or just reboot)
- X11: Press
Alt+F2, typerestart, press Enter
Open extension preferences to configure:
- Fetch Command: The shell command to read power mode (runs with pkexec)
- Modes: Define output values, display names, icons, and colors
- Appearance: Icon/text visibility, sizes, spacing, colors, positioning
Lenovo IdeaPad Gaming 3:
Fetch Command: echo "\_SB.PCI0.LPC0.EC0.GZ44" > /proc/acpi/call && cat /proc/acpi/call
Modes:
- Output: 0x0, Name: Intelligent Cooling
- Output: 0x1, Name: Extreme Performance
- Output: 0x2, Name: Battery Saving
"Unknown" mode displayed:
- Run your fetch command manually to see the output
- Ensure the output matches one of your configured mode outputs exactly
Permission denied:
- Ensure polkit rule is installed and polkit service restarted
- Verify your user is in the
wheelgroup:groups $USER
acpi_call not found:
- Install the acpi_call module for your kernel
- Load the module:
sudo modprobe acpi_call
Information in LICENSE file of this repository