Skip to content

fix: no longer input locks when TTY is switched before full compositor#3593

Open
Atan-D-RP4 wants to merge 1 commit intoniri-wm:mainfrom
Atan-D-RP4:fix/tty-switch-freeze
Open

fix: no longer input locks when TTY is switched before full compositor#3593
Atan-D-RP4 wants to merge 1 commit intoniri-wm:mainfrom
Atan-D-RP4:fix/tty-switch-freeze

Conversation

@Atan-D-RP4
Copy link

This fixes the case of starting Niri from a separate TTY (via Tmux or a TTY switch before full startup) and then switching to that Niri session causing an input lock.

I hack on Niri mostly in separate TTY and this behavior was a super annoying blocker. Resolving it required either restarting my computer (since all input was blocked) or sshing into my machine and killing that Niri session.

@YaLTeR
Copy link
Member

YaLTeR commented Mar 11, 2026

Do other compositors do something similar?

@Atan-D-RP4
Copy link
Author

I can only confirm that Hyprland has the same problem, from my own experience and testing for this.

From what I can tell, both Mutter and Kwin use systemd-logind to manage inactive VT and defer input processing until it sends active session signal to them.

@YaLTeR
Copy link
Member

YaLTeR commented Mar 11, 2026

From what I can tell, both Mutter and Kwin use systemd-logind to manage inactive VT and defer input processing until it sends active session signal to them.

That's also what niri does

@YaLTeR
Copy link
Member

YaLTeR commented Mar 11, 2026

Maybe it doesn't do so at startup? Does mutter also call libinput suspend at startup?

@Atan-D-RP4
Copy link
Author

Atan-D-RP4 commented Mar 11, 2026

Maybe it doesn't do so at startup? Does mutter also call libinput suspend at startup?

I checked and no it does not. Which might be why it also has this same issue, from my testing.
I can't even fully switch to Kwin's session before my entire screen is locked, with only a frozen TTY visible to me.

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