Bug 205829

Summary: documenting disabling ctrl-alt-space suspend feature in acpi(4)
Product: Documentation Reporter: DW <dweber>
Component: Manual PagesAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Many People CC: doc, jhb
Priority: ---    
Version: Latest   
Hardware: amd64   
OS: Any   

Description DW 2016-01-03 11:06:38 UTC
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
accurately:

hw.acpi.suspend_state
	     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?
Comment 1 DW 2016-01-03 11:09:38 UTC
Small typo: 
     hw.acpi.power_button_state is documented, but hw.acpi.suspend_state is not.
Comment 2 John Baldwin freebsd_committer freebsd_triage 2016-01-05 15:47:41 UTC
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.
Comment 3 DW 2016-01-11 10:28:25 UTC
> 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

https://www.freebsd.org/doc/handbook/consoles.html

and went for the system console specific manual pages:

syscons(4):

There is

hw.syscons.sc_no_suspend_vtswitch

influencing VT switching during suspend

- - - - 

atkbd(4) vidcontrol(1), kbdcontrol(1):

do not mention "suspend"
Comment 4 John Baldwin freebsd_committer freebsd_triage 2016-01-11 17:26:42 UTC
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).