Skip to content

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

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

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

Conversation

@H09-0

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

Copy link
Copy Markdown

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 path – apply_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.

@mtwebster

Copy link
Copy Markdown
Member

This was deliberately removed in a2a6017. Muffin handles this. Unfortunately it's only been restoring at resume for Wayland sessions until now:

linuxmint/muffin@6cd3046

@mtwebster mtwebster closed this Sep 18, 2026
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.

2 participants