Xorg ignoring Ctrl-Alt-Backspace even though all options correctly set

I run X windows without a display manager under NixOS-20.03, using startx. I want to enable the ability to Ctrl-Alt-Backpsace to kill the X server as I am having trouble with system hangs (I suspect google-chrome is the culprit), which otherwise result in me having to hit the power switch (luckily ZFS has so far survived this bad treatment).

The relevant part of my configuration.nix looks like:

  services.xserver = {
      enable = true;
      layout = "gb";
      wacom.enable = true;
      displayManager.startx.enable = true;
      windowManager.wmii.enable = true;
      displayManager.defaultSession = "none+wmii";
      xkbOptions = "terminate:ctrl_alt_bksp";

Running setxkbmap -print -verbose 10 I get…

Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /nix/store/ja2jzn4gz5wvg50wm3g5cxywpril72cz-setxkbmap-1.3.2/share/X11/xkb/rules/evdev...
Applied rules from evdev:
rules:      evdev
model:      pc104
layout:     gb
options:    terminate:ctrl_alt_bksp
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+gb+inet(evdev)+terminate(ctrl_alt_bksp)
geometry:   pc(pc104)
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+gb+inet(evdev)+terminate(ctrl_alt_bksp)"    };
        xkb_geometry  { include "pc(pc104)"     };

confirming that the settings are taking effect.

Using xev -event keyboard I can confirm that my Ctrl key comes up as Control_L, my Alt key comes up as Alt_L and my Backspace key comes up as BackSpace.

I can also confirm that /nix/store/bkbmqadynbfh10q1drl9fcndxfhqzg89-xkeyboard-config-2.27/share/X11/xkb/symbols/terminate contains

default  partial modifier_keys
xkb_symbols "ctrl_alt_bksp" {
    key <BKSP> {
        symbols[Group1] = [ NoSymbol, NoSymbol, NoSymbol, NoSymbol, Terminate_Server ]

so that Ctrl+Alt+Backspace should result in Terminate_Server being executed.

But despite all this Ctrl-Alt-Backspace has no effect on my system, and is in fact passed through to underlying applications (e.g. in xterm it results in printing ÿ).

What am I missing?? I am almost at the point of giving up and trying to set up actkbd to allow Ctrl-Alt-Del to trigger a system reboot even from within a graphical session as an alternative escape hatch when things hang (although perhaps that too won’t work…).

All help greatly appreciated!

Sorry that I can’t assist on your specific problem.

Perhaps it’s also related to the WindowManager that you’re using.

But I do have a suggestion for your hangs: I don’t know whether you’ve tried switching to some console


should switch to you 1st console and you would be able to track the problem in an extra session.

At least my standard installation has 6 consoles + X (keys F1 to F7)

Unfortunately that’s not fast enough. When it happens I have less than a second to kill X before the computer freezes up entirely — not enough time to log in at another console, log in, and do a killall :frowning: Even CTRL + ALT + F2 followed by CTRL + ALT + DELETE doesn’t seem to be something I can do fast enough.

But thanks for trying to help!

Regarding the actual problem, I suspect it’s a kernel/hadrware interaction issue but Chrome seems to be the thing most likely to trigger it. For a while I had it under Debian Jessie, but then a particular kernel upgrade caused it to (almost) stop. When Jessie went past its support date I took the opportunity to switch to NixOS. Unfortunately the latest kernels seem to disagree with my hardware again (and also have introduced a known bug with NILFS2 which means I had to switch to ZFS).