>Isn’t the keyboard directly connected to the KVM, surely the KVM sees your key
>press before passing the keypress to your computers?
>In which case kmscon cannot block the numlock press.


That puzzles me, too. But with kmscon running, the KVM does not react to
the keystrokes and with fbcon it does react.






I was curious too, since I use a KVM, so queried Gemini:

Even though a hardware KVM sits physically between your keyboard and the PC, 
many KVM
 switches—especially those that use Scroll Lock, Caps Lock, or Num Lock 
sequences—do 
not just passively sniff upward USB packets. They rely on host-to-device USB 
HID SET_
REPORT commands (LED state updates) from the operating system to confirm the 
keystrok
e was registered and to advance their internal hotkey state machine.

1. Why it works in fbcon (Kernel Space)

• Direct Kernel TTY Handling: fbcon uses the legacy in-kernel virtual terminal 
(vt) keyboard driver.
• Automatic LED Sync: When you press Scroll Lock or Caps Lock in fbcon, the 
kernel's VT subsystem immediately updates its internal lock flags and sends a 
USB HID LED report (EV_LED) back down the USB bus to the emulated keyboard 
inside the KVM.
• KVM Confirmation: The KVM sees that outbound LED toggle packet from the host 
OS, confirms that the trigger key occurred, and switches ports on the second 
press.

2. Why it fails in kmscon (Userspace)

In Fedora 45, kmscon replaces fbcon as a userspace terminal emulator built on 
DRM/KMS and libxkbcommon:

• Mutes the Kernel VT: When kmscon takes over a virtual terminal, it puts the 
underlying kernel TTY into raw/off mode (K_OFF / KD_GRAPHICS) so the kernel 
stops interpreting keystrokes in the background.
• No Outbound LED Reports: kmscon reads raw evdev events via libxkbcommon, 
which tracks modifier states (like Caps Lock or Scroll Lock) purely in 
userspace memory. Unlike desktop environments (such as KDE Plasma or GNOME, 
which explicitly write EV_LED events back to /dev/input/event* via libinput), 
kmscon historically does not write LED state updates back to the evdev 
device—especially for Scroll Lock, which xkbcommon often ignores or does not 
map to a physical LED output by default.
• KVM State Machine Stalls: Because the KVM never receives the expected USB 
SET_REPORT LED acknowledgment back from Fedora while kmscon is active, the KVM 
assumes the keystroke was dropped or ignored and resets its hotkey listener.

(Note: A secondary quirk with some USB hub-based KVMs is USB autosuspend or HID 
boot-protocol fallback—if a KVM expects the host to keep polling or toggling 
HID reports, kmscon sitting idle in userspace without kernel VT LED activity 
can cause the KVM's hotkey parser to miss the sequence.)

How to Work Around It on Fedora 45

Depending on how you use your console and KVM, you have three practical options:

1. Change the KVM's Hotkey Trigger (Easiest):

If your KVM supports remapping its hotkey trigger from Scroll Lock to Ctrl + 
Ctrl or Alt + Alt, switch to that. Standard modifier keys (Ctrl, Alt) do not 
rely on host-to-device LED state round-trips, so the KVM detects them purely 
from the upward HID key-down/key-up packets regardless of whether kmscon, 
fbcon, or a Wayland desktop is running.

2. Keep One VT Dedicated to fbcon:

Fedora 45 lets you fall back to getty/fbcon on a specific virtual terminal 
while keeping kmscon on the rest. For example, to make tty5 (Ctrl+Alt+F5) use 
fbcon so your KVM hotkeys always work there:

sudo systemctl mask kmsconvt@tty5
sudo systemctl enable --now getty@tty5

3. Revert All VTs to fbcon:

If you rely heavily on text consoles and need consistent KVM switching across 
all of them, you can mask [email protected] and re-enable [email protected] 
globally.




-- 
_______________________________________________
users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to