The bug
The Linux kernel's kbd handler is bound to every keyboard regardless of udev ID_SEAT tagging, and routes keystrokes to whichever VT is currently the system-wide foreground. When seat0 shows a text VT (e.g. agetty on tty1), keystrokes from seat1's keyboard land on it. seat1 -> seat0 leaks; seat0 -> seat1 doesn't.
This is universal Linux multiseat behavior, not an atrium bug, but we should do something about it!
A proper upstream fix would be to preserve EVIOCGRAB across VT-side activity in the kernel.
Why the obvious fixes don't work on their own
- libinput already does
EVIOCGRAB. It works initially -- but the grab is silently invalidated by certain seat0 VT-side operations (agetty respawn, terminal reset). Userspace can't reliably keep it held. This is an upstream kernel bug.
KDSKBMODE K_OFF on text VTs is wiped the next time agetty respawns on that VT, since agetty sets its own keyboard mode.
/sys/class/input/inputN/inhibited detaches both kbd and evdev, killing the legitimate compositor input too.
Possible mitigations
- Disable text logins on managed seats (mask
getty@tty1, autovt@tty[2-6]). Removes the leak destination.
K_OFF on atrium-managed VTs at startup, and reassert in the SIGCHLD handler.
VT_LOCKSWITCH, opt-in via lock-vt-switching config (requires unlock/switch/relock plumbing for atrium's own VT activations).
The bug
The Linux kernel's
kbdhandler is bound to every keyboard regardless of udevID_SEATtagging, and routes keystrokes to whichever VT is currently the system-wide foreground. When seat0 shows a text VT (e.g.agettyon tty1), keystrokes from seat1's keyboard land on it. seat1 -> seat0 leaks; seat0 -> seat1 doesn't.This is universal Linux multiseat behavior, not an atrium bug, but we should do something about it!
A proper upstream fix would be to preserve
EVIOCGRABacross VT-side activity in the kernel.Why the obvious fixes don't work on their own
EVIOCGRAB. It works initially -- but the grab is silently invalidated by certain seat0 VT-side operations (agetty respawn, terminal reset). Userspace can't reliably keep it held. This is an upstream kernel bug.KDSKBMODE K_OFFon text VTs is wiped the next timeagettyrespawns on that VT, since agetty sets its own keyboard mode./sys/class/input/inputN/inhibiteddetaches bothkbdandevdev, killing the legitimate compositor input too.Possible mitigations
getty@tty1,autovt@tty[2-6]). Removes the leak destination.K_OFFon atrium-managed VTs at startup, and reassert in the SIGCHLD handler.VT_LOCKSWITCH, opt-in vialock-vt-switchingconfig (requires unlock/switch/relock plumbing for atrium's own VT activations).