Feature
- Re-map Power key, Shutdown to Screen-off
- Hold power key to show power interactive menu
- Turn off Screen (Backlight and LCD, not blank)
- Turn off keyboard power
- CPU max freq set to min freq on screen-off
- Feature Customization
Tested on
- Ubuntu 22.04
- Bookworm(ak-rex’s) Lite with GNOME 47
Known issues
Details
In some cases, User input (mouse, keyboard) is required after pressing the power key in any S2Idle state.- fixed in v0.3Keyboard turn-off only works with QMK custom firmware.- fixed in v1.0 (not confirmed)Sometimes, sleep-power-control unable to detect the screen off of the desktop environment- fixed in v1.0The display mode does not recover when the screen is turned off and on, on specific distribution.- fixed in v1.2 (disable turn off drm feature in/etc/uconsole-sleep/config
)
Releases
Details
- v0.2
- initial release
- v0.3
Full Changelog: Comparing v0.2...v0.3 · qkdxorjs1002/uConsole-sleep · GitHub- Emit WakeUp Event after turn on screen
- Add DRM control to turn off screen (BL,LCD) (not blank)
- v1.0
Full Changelog: Comparing v0.3...v1.0 · qkdxorjs1002/uConsole-sleep · GitHub- Official keyboard firmware detection
- Apply timeout poll for desktop sleep mode detection
- Use the
detect
flag instead ofon
forcing LCD turned on.
- v1.1
Full Changelog: Comparing v1.0...v1.1 · qkdxorjs1002/uConsole-sleep · GitHub- Add feature hold power key to trigger KEY_POWER (interactive power menu)
- v1.2
Full Changelog: v1.1…v1.2- Feature customization
$ sudo nano /etc/uconsole-sleep/config $ sudo systemctl restart sleep-remap-powerkey.service $ sudo systemctl restart sleep-power-control.service
- Power saving CPU freq now follows a user-specified value, not available value.
- Feature customization
CAUTION - If you are installing for the first time, keep the ssh connection open as a fallback against malfunctions until you check the operation.
Source and package build script
Deb Package
Installation
$ sudo dpkg -i uconsole-sleep.deb
# Uninstall
$ sudo dpkg -r uconsole-sleep
Configuration
$ sudo nano /etc/uconsole-sleep/config
$ sudo systemctl restart sleep-remap-powerkey.service
$ sudo systemctl restart sleep-power-control.service
Build own package
# Dependency: python3, (venv)
$ sudo apt update
$ sudo apt install python3-full
$ wget https://raw.githubusercontent.com/qkdxorjs1002/uConsole-sleep/refs/heads/main/make_uconsole-sleep_package.sh
$ sudo chmod +x make_uconsole-sleep_package.sh
$ ./make_uconsole-sleep_package.sh