A small, open-source Python tool that applies consistent power-saving settings to the GNOME desktop environment on Ubuntu Linux 24.04, designed specifically for the Framework Laptop 13.
The project is split into two independent parts:
-
Back-End (CLI / Service)
- Applies and reports GNOME/system power settings
- Contains all power-management logic
- Runs as a standalone script or as a login-time service
- No GUI dependencies
-
Front-End (GUI)
- Simple Tkinter or GTK interface
- Only calls the back-end
- Never modifies system settings directly
This separation keeps the core logic testable, predictable, and easy to automate.
- Read current GNOME power-related settings
- Apply a predefined “Power Saving” profile
- Clear logging of all changes
- Idempotent operation (safe to run repeatedly)
- Optional autostart at session login
- Lightweight interface (Tkinter or GTK)
- Shows active profile or status
- Lets users apply profiles with one click
- Pure wrapper around the back-end
Ubuntu GNOME provides many power-related settings, but they are spread across:
gsettingspower-profiles-daemon- GNOME session settings
- Display and suspend timeouts
This project consolidates a reasonable, laptop-focused power-saving configuration into one tool that can be run on demand or automatically at login.
.
├── backend/
│ ├── cli.py # Command-line interface
│ ├── core.py # Logic for reading/applying settings
│ └── profiles.py # Definitions of power-saving profiles
├── frontend/
│ └── gui.py # Tkinter or GTK front-end
├── tests/
├── LICENSE
└── README.md
- Hardware: Framework Laptop 13
- OS: Ubuntu Linux (LTS recommended)
- Desktop: GNOME (Wayland or Xorg)
- User permissions: Regular user; only use
sudowhen absolutely required
The tool should also work on other GNOME-based systems, but Framework 13 on Ubuntu is the reference configuration.
This project follows several principles:
- Clean, concise Python (PEP8)
- Small, understandable modules
- No unnecessary dependencies
- Back-end remains GUI-independent
- GUI remains logic-free
- All changes are explained and double-checked before implementation
Released under the GNU GPLv3.
See LICENSE for details.
The project is in early design and implementation stages.
Back-end CLI design is the first focus before GUI development.
- List available refresh modes for the built-in/primary display:
python3 backend/apply_refresh_profile.py --list - List for a specific connector (e.g., laptop panel):
python3 backend/apply_refresh_profile.py --list --connector eDP-1 - Apply minimum refresh profile:
python3 backend/apply_refresh_profile.py min - Apply maximum refresh profile on a specific connector:
python3 backend/apply_refresh_profile.py max --connector eDP-1 - Apply max with a ceiling (e.g., cap at 96 Hz):
python3 backend/apply_refresh_profile.py max --connector eDP-1 --max-cap 96 - By default min/max apply to all connected displays; use
--connectorto limit to one. - Apply an exact mode id:
python3 backend/apply_refresh_profile.py --mode-id [email protected] --connector eDP-1 - Reapply current modes without changing selections (useful to nudge Mutter):
python3 backend/apply_refresh_profile.py --reapply-current - Profiles also set GNOME animations: min disables them; max enables them.
- Profiles can enable/disable extensions (e.g., min disables, max enables
[email protected]by default).
Contributions and suggestions are welcome once the initial architecture is in place.
Please open issues for discussions or proposed improvements.