I've been repeatedly bitten by accidently pressing alt+space when holding ctrl,
mostly when switching between GUI tty and console tty
Setting hw.acpi.suspend_state to NONE seems to be the right solution to disable the suspend feature.
While hw.acpi.suspend_state is documented in acpi(4), hw.acpi.suspend_state is not.
I propose the following change but am unsure whether it reflects the behaviour
Suspend state (S1-S5) to enter when ctrl-alt-space is pressed.
Default is S3 (suspend to RAM).
Is the default S3 correct? At least on my systems...
Are there other situations affected by this sysctl apart from ctrl-alt-space?
hw.acpi.power_button_state is documented, but hw.acpi.suspend_state is not.
I think a more accurate description is that 'hw.acpi.suspend_state' is what the system does in response to a request for a system suspend whether it be from zzz(8), a system-specific suspend key, or the system console's suspend key.
What you are running into I think is that the system console driver defines Ctrl-Alt-Space as a "soft" suspend key similar to the dedicated suspend key often found on laptop keyboards.
> system console driver defines Ctrl-Alt-Space
so if I were to configure that behaviour, where should I look for
the documentation of this feature? I looked up
and went for the system console specific manual pages:
influencing VT switching during suspend
- - - -
atkbd(4) vidcontrol(1), kbdcontrol(1):
do not mention "suspend"
It is certainly under-documented. I think the newer vt(4) console (slated to replace sc(4)) has a separate sysctl to enable/disable the suspend key. For syscons I think the only route you have to disable the suspend hotkey is to load a custom keymap that doesn't include it. :( (I think you would have to generate such a keymap yourself unfortunately.)
Actually, even vt(4) doesn't have a separate knob for this key (it does have sysctls for other special keys like panic/reboot/poweroff). I think we should add a knob for this special key to both vt(4) (kern.vt.kbd_suspend) and sc(4) (hw.syscons.kbd_suspend).