A KDE Plasma Widget (Applet) for viewing and changing ACPI platform profiles on Linux systems, particularly useful for Lenovo laptops with Fn+Q functionality.
This Plasma applet provides an easy way to:
- View the current platform profile at a glance
- Switch between available platform profiles with a single click
- Monitor profile changes made via Fn+Q keyboard shortcut (on supported devices)
Platform profiles control the performance and power behavior of your system through ACPI (Advanced Configuration and Power Interface). Common profiles include:
- Performance: Maximum performance, higher power consumption
- Balanced: Balance between performance and power efficiency
- Low-Power/Quiet: Power saving mode with reduced performance
- Quick Access: Panel icon shows current profile at a glance
- Easy Switching: Click to open popup and select desired profile
- Visual Feedback: Color-coded profiles and icons
- Fn+Q Compatible: Automatically detects profile changes from keyboard shortcuts
- Secure: Uses pkexec for authenticated profile changes
- Real-time Updates: Monitors profile changes every 5 seconds
- Linux system with ACPI platform profile support
/sys/firmware/acpi/platform_profilefile must exist/sys/firmware/acpi/platform_profile_choicesfile must exist
- KDE Plasma 6.x (primary support)
- Qt 6.x
pkexec(for changing profiles with root privileges)kpackagetool6(for installation)
Note: This version is designed for Plasma 6. For Plasma 5 support, please use an older release.
To check if your system supports platform profiles:
# Check if platform profile files exist
ls -l /sys/firmware/acpi/platform_profile*
# View current profile
cat /sys/firmware/acpi/platform_profile
# View available profiles
cat /sys/firmware/acpi/platform_profile_choices-
Clone this repository:
git clone https://github.com/Scott-Nx/Platform-Profile_Applet.git cd Platform-Profile_Applet -
Run the installation script:
./install.sh
-
Add the widget to your panel:
- Right-click on your KDE panel
- Select "Add Widgets..."
- Search for "Platform Profile"
- Drag it to your panel or desktop
If you prefer to install manually:
# For Plasma 6
kpackagetool6 -t Plasma/Applet -i package
# For Plasma 5
kpackagetool5 -t Plasma/Applet -i packageTo update the applet:
git pull
./install.shThe installation script will automatically remove the old version before installing the new one.
Run the uninstallation script:
./uninstall.shOr manually:
# For Plasma 6
kpackagetool6 -t Plasma/Applet -r org.kde.plasma.platformprofile
# For Plasma 5
kpackagetool5 -t Plasma/Applet -r org.kde.plasma.platformprofileClick the panel icon to open the popup interface, which shows:
- Current profile name (color-coded)
- Buttons for all available profiles
- Active profile marked with a checkmark (✓)
- Click the panel icon to open the popup
- Click on the desired profile button
- Authenticate with your password when prompted (pkexec)
- The profile will change and the interface updates automatically
Cause: The system doesn't support ACPI platform profiles or files are not accessible.
Solutions:
- Verify files exist:
ls -l /sys/firmware/acpi/platform_profile* - Check your hardware supports this feature (common on Lenovo laptops)
- Ensure ACPI is enabled in BIOS/UEFI
Cause: Missing or misconfigured pkexec.
Solutions:
- Install PolicyKit:
- Debian/Ubuntu:
sudo apt install policykit-1 - Fedora:
sudo dnf install polkit - Arch:
sudo pacman -S polkit
- Debian/Ubuntu:
Cause: Installation failed or Plasma needs restart.
Solutions:
- Restart Plasma:
plasmashell --replace & - Or log out and log back in
- Verify installation:
kpackagetool5 -t Plasma/Applet -s org.kde.plasma.platformprofile
Cause: Delayed update or permission issues.
Solutions:
- Wait a few seconds (updates every 5 seconds)
- Check manually:
cat /sys/firmware/acpi/platform_profile - Verify file permissions on platform_profile files
To test the applet without installing:
plasmoidviewer -a package
### Debugging
Enable debug output:
```bash
# View Plasma logs
journalctl -f | grep plasmaThis applet works on any Linux system that supports ACPI platform profiles. It's particularly useful for:
- Lenovo ThinkPad laptops with Fn+Q
- Lenovo ThinkBook laptops with Fn+Q
- Lenovo IdeaPad laptops
- Other laptops with ACPI platform profile support
Contributions are welcome! Please feel free to submit issues or pull requests.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
- KDE Plasma team for the excellent widget framework
- Lenovo for implementing ACPI platform profile support
- Linux kernel developers for ACPI subsystem