Skip to content

gdm-session-worker: Avoid handling switches for VTs that aren't ours

msizanoen1 requested to merge msizanoen1/gdm:fix-vt-ownership into main

The kernel will reset the VT state (including keyboard mode) if the process designated as the VT switch handler no longer exists when it tries to send the switch request signal. This may cause the keyboard mode of the foreground VT to be erronously set to non-RAW if a session was terminated in the background while another session is in the foreground, making it possible to terminate a graphics session by pressing Ctrl-C.

Fix this by only calling handle_terminal_vt_switches on VTs that we own or when otherwise absolutely necessary to fix a VT set to VT_AUTO+KD_GRAPHICS.

Merge request reports