[systemd-devel] CtrlAltDelBurstAction

Lennart Poettering lennart at poettering.net
Mon Aug 6 08:36:58 UTC 2018


On So, 05.08.18 19:29, Mantas Mikulėnas (grawity at gmail.com) wrote:

> On Sun, Aug 5, 2018 at 6:21 PM Reindl Harald <h.reindl at thelounge.net> wrote:
> 
> > CtrlAltDelBurstAction=
> > Defines what action will be performed if user presses Ctrl-Alt-Delete
> > more than 7 times in 2s. Can be set to "reboot-force", "poweroff-force",
> > "reboot-immediate", "poweroff-immediate" or disabled with "none".
> > Defaults to "reboot-force"
> >
> > [root at srv-rhsoft:~]$ 7~7~
> >
> > 7~7~7~7~7~7~7~7~5~7~5~5~5~5~5~5~5~7~5~5~7~5~5~5~5~5~5~7~7~7~7~7~5~7~7~5~5~7~5~7~7~7~3~3~5~5~7~5~7~7~
> >
> > i guess the number appearing in my console is the required key hits
> >
> 
> Those are ANSI-style escape codes that your shell doesn't know how to
> interpret and gives up midway. Specifically, \e[3~ is Delete, \e[5~ is
> PageUp, \e[7~ is... not even in the default Linux keymap at all, although
> it's the Home key in urxvt.
> 
> when i keep holding CTRL+ALT and repeatly press DEL it keeps at seven
> > and for the whole keyboard-combination from scratch i am not phyiscally
> > made the way it needs to get recognized
> >
> 
> As far as I know, systemd does not read any keypresses to begin with. For
> Ctrl-Alt-Del to work, your console has to be in xlate (non-raw) mode, the
> console keymap has to map the scancode to "Boot", which causes the kernel
> to send SIGINT to pid 1, and that's the "Ctrl-Alt-Del was pressed"
> indication that all inits use.
> 
> So if you're sitting at the actual console, then use Alt-SysRq-R to fix the
> keyboard mode, and make sure a non-garbage console keymap is loaded.
> 
> And if you're doing this over serial, that doesn't appear to understand
> Ctrl-Alt-Del at all. According to internets, the serial "break" signal is
> supposed to do possibly the same thing, or at least something similar (like
> Alt-SysRq).

Yupp, Mantas is right: it's *not* systemd which generates that
output. We get a direct signal from the kernel's keyboard layer when
Ctrl-Alt-Del is pressed and we only react to that. The above looks
like some borkedness between oyur X server's key handling and the
kernel console's key handling. systemd is not involved in that output.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list