From cb1595eef5fa51071e63882a7cef823381772af2 Mon Sep 17 00:00:00 2001 From: natano <> Date: Thu, 2 Mar 2017 10:38:09 +0000 Subject: [PATCH] Add a new sysctl machdep.lidaction. The sysctl works as follows: machdep.lidaction=0 # do nothing machdep.lidaction=1 # suspend machdep.lidaction=2 # hibernate lidsuspend is just an alias for lidaction, so if you change one, the other one will have the same value. The plan is to remove machdep.lidsuspend eventually when people have upgraded their /ets/sysctl.conf. discussed with deraadt, who came up with the new MIB name no objections mlarkin ok stsp halex jcs --- src/etc/etc.amd64/sysctl.conf | 2 +- src/etc/etc.i386/sysctl.conf | 2 +- src/etc/etc.loongson/sysctl.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/etc/etc.amd64/sysctl.conf b/src/etc/etc.amd64/sysctl.conf index ba90bf71..b1b64952 100644 --- a/src/etc/etc.amd64/sysctl.conf +++ b/src/etc/etc.amd64/sysctl.conf @@ -1,3 +1,3 @@ #machdep.allowaperture=2 # See xf86(4) #machdep.kbdreset=1 # permit console CTRL-ALT-DEL to do a nice halt -#machdep.lidsuspend=0 # do not suspend laptop upon lid closing +#machdep.lidaction=0 # 1=suspend, 2=hibernate laptop upon lid closing diff --git a/src/etc/etc.i386/sysctl.conf b/src/etc/etc.i386/sysctl.conf index 48f492dc..9e8d3252 100644 --- a/src/etc/etc.i386/sysctl.conf +++ b/src/etc/etc.i386/sysctl.conf @@ -1,4 +1,4 @@ #machdep.allowaperture=2 # See xf86(4) #machdep.apmhalt=1 # 1=powerdown hack, try if halt -p doesn't work #machdep.kbdreset=1 # permit console CTRL-ALT-DEL to do a nice halt -#machdep.lidsuspend=0 # do not suspend laptop upon lid closing +#machdep.lidaction=0 # 1=suspend, 2=hibernate laptop upon lid closing diff --git a/src/etc/etc.loongson/sysctl.conf b/src/etc/etc.loongson/sysctl.conf index e6491005..a3f6e594 100644 --- a/src/etc/etc.loongson/sysctl.conf +++ b/src/etc/etc.loongson/sysctl.conf @@ -1 +1 @@ -#machdep.lidsuspend=0 # do not suspend laptop upon lid closing +#machdep.lidaction=0 # 1=suspend, 2=hibernate laptop upon lid closing