Preserve keyboard backlight across repeated blanks - #10364
Open
catlee wants to merge 1 commit into
Open
Conversation
catlee
force-pushed
the
fix/keyboard-backlight-restore
branch
from
September 5, 2026 21:08
fc949e2 to
dfd112f
Compare
catlee
force-pushed
the
fix/keyboard-backlight-restore
branch
from
September 5, 2026 21:43
dfd112f to
5a5e252
Compare
catlee
marked this pull request as ready for review
September 5, 2026 22:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
My keyboard backlight turns off when Omarchy blanks the screen, which is expected. It was not turning back on when I woke the screen.
Omarchy used
brightnessctl -sto save the current level before turning the backlight off. The blank command can run more than once, so a second call saved0over the original level.restorethen brought the keyboard back to0.This change treats a runtime file as the snapshot for one blank and restore cycle. The first blank saves the current level, including
0. Later blank calls leave that snapshot alone. Restore applies it once and deletes it. Successful manual brightness changes also delete it, so they remain in effect.If the snapshot cannot be saved, the keyboard is not turned off. A failed manual brightness change also leaves the snapshot intact.
The behavioral test covers:
I also ran Bash syntax checks for the command and test.
Fixes #7650
Related to #6667