Comment 14 for bug 1803993

Balint Reczey (rbalint) wrote :

It looks like systemd is changing the mode (see argument=3) on VT1 on logouts.

#define K_RAW 0x00
#define K_XLATE 0x01
#define K_MEDIUMRAW 0x02
#define K_UNICODE 0x04
#define K_OFF 0x04
#define KDGKBMODE 0x4B44 /* gets current keyboard mode */
#define KDSKBMODE 0x4B45 /* sets current keyboard mode */

test@test-Standard-PC-i440FX-PIIX-1996:~$ sudo sysdig evt.type=ioctl | grep request=4B45
[sudo] password for test:
5657343 15:21:51.819076315 1 Xorg (1069) > ioctl fd=11(<f>/dev/tty1) request=4B45 argument=4
5657453 15:21:51.820019063 0 systemd-logind (575) > ioctl fd=22(<f>/dev/tty1) request=4B45 argument=3
5753055 15:21:52.771635876 0 systemd-logind (575) > ioctl fd=21(<f>/dev/tty1) request=4B45 argument=4
20723813 15:49:41.368621972 1 systemd (23717) > ioctl fd=3(<f>/dev/tty2) request=4B45 argument=3
22605710 15:53:04.107253025 1 systemd-logind (575) > ioctl fd=23(<f>/dev/tty3) request=4B45 argument=4
22612602 15:53:04.142057934 1 Xorg (24089) > ioctl fd=11(<f>/dev/tty3) request=4B45 argument=4
24077108 15:53:28.705600119 0 Xorg (24089) > ioctl fd=11(<f>/dev/tty3) request=4B45 argument=4
24077278 15:53:28.706353493 1 systemd-logind (575) > ioctl fd=24(<f>/dev/tty3) request=4B45 argument=3
24626343 15:53:58.336589416 0 systemd-logind (575) > ioctl fd=22(<f>/dev/tty1) request=4B45 argument=3
24804326 15:53:59.385872243 0 systemd-logind (575) > ioctl fd=21(<f>/dev/tty1) request=4B45 argument=4
25515114 15:54:12.915072995 1 systemd-logind (575) > ioctl fd=23(<f>/dev/tty3) request=4B45 argument=4
25520504 15:54:12.929480424 1 Xorg (25112) > ioctl fd=11(<f>/dev/tty3) request=4B45 argument=4
26921037 15:54:46.872029874 1 Xorg (25112) > ioctl fd=11(<f>/dev/tty3) request=4B45 argument=4
26921239 15:54:46.872654795 1 systemd-logind (575) > ioctl fd=24(<f>/dev/tty3) request=4B45 argument=3
27104852 15:54:53.870639078 1 systemd-logind (575) > ioctl fd=23(<f>/dev/tty3) request=4B45 argument=4
27112208 15:54:53.894217722 1 Xorg (25697) > ioctl fd=11(<f>/dev/tty3) request=4B45 argument=4
28677455 15:55:44.581119464 0 Xorg (25697) > ioctl fd=11(<f>/dev/tty3) request=4B45 argument=4
28678288 15:55:44.592966138 1 systemd-logind (575) > ioctl fd=24(<f>/dev/tty3) request=4B45 argument=3