Skip to content

fix(keyboard): apply numlock state on startup and after resume#459

Open
H09-0 wants to merge 2 commits into
linuxmint:masterfrom
H09-0:fix/numlock-resume
Open

fix(keyboard): apply numlock state on startup and after resume#459
H09-0 wants to merge 2 commits into
linuxmint:masterfrom
H09-0:fix/numlock-resume

Conversation

@H09-0
Copy link
Copy Markdown

@H09-0 H09-0 commented May 25, 2026

Summary

The numlock LED state is not restored after resuming from suspend. While there are GSettings keys to store and remember the numlock state (remember-numlock-state, numlock-state), no code in cinnamon-settings-daemon actually reads or applies them.

Changes

  • apply_numlock() – reads remember-numlock-state and numlock-state from GSettings and applies the LED state via XkbLockModifiers. No-ops on Wayland, when remember-numlock-state is false, or when the stored state is unknown.
  • logind proxy – connects to org.freedesktop.login1.Manager and listens for PrepareForSleep(false) to re-apply the numlock state after resume.
  • Startup pathapply_numlock() is called from apply_all_settings() so the stored state is applied when the keyboard plugin starts.

A minimal, focused fix: no new schema keys, no dynamic state tracking, no key listeners.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant