On a laptop, is it possible to define power behavior when shutting the lid?


#1

Looked through the entire control panel and couldn’t find any option for power management. The device has the ability to wake itself up when I open the lid, so I was hoping maybe there’s a way to suspend on lid-shutting too.


#2

sysctl hw.acpi.lid_switch_state=S3

That might work… No promises though.


#3

Where should I place this command in? Rc.conf?

I just boot up ghostbsd and saw that it has power management gui. It seems ghostbsd and trident each has features I want, and I have to choose between the features I need the most.


#4

enter it in a command line as root… Just to see if it works. This will not survive a reboot if it doesn’t work… Reboot your computer, and no harm done. As if it never even happened.

If it does work we can add it to /etc/sysctl.conf to make it permanent. But I’m only guessing Trident might require that in a different place.


#5

Yes it works.
sysctl.conf file doesn’t seem to exist though. I am also hoping to disable auto wakeup on lid open


#6

taken from telegram

Ken Moore, [13.03.19 12:58]
yes, there is one that is empty by default

Ken Moore, [13.03.19 12:58]
we ship a systctl.d/trident.conf file which includes our default system options - and those are applied on top of the default system config from TrueOS

Ken Moore, [13.03.19 12:59]
the /etc/sysctl.conf file is used for user-overrides - so it is blank by default


#7

In that case this command should make it permanent then.

echo 'hw.acpi.lid_switch_state=S3' >> /etc/sysctl.conf

reboot


#8

I think it should be
echo ‘hw.acpi.lid_switch_state=S3’ >> /etc/sysctl.conf

I put these settings to the /etc/sysctl.d directory:
#/etc/sysctl.d/my_suspend_resume.conf
#suspend/resume
hw.acpi.reset_video=1
hw.acpi.lid_switch_state=S3
hw.acpi.sleep_button_state=S3

Unfortunately the sleep_button does not work for me, lid_switch works, but not in the same way as ‘suspend’ from the menu does. I would really like to know ‘why’.


#9

Is it possible to disable auto wakeup on lid open?

Will Lumina desktop get a desktop power manager in the foreseeable future?


#10

That would be nice.