Update X when laptop lip is closed

Noah Palmer noahpalmerversion1 at gmail.com
Sun Feb 16 06:34:06 UTC 2020


On Sat, Feb 15, 2020 at 11:08 PM Yuri Pankov <yuripv at yuripv.me> wrote:

> Noah Palmer wrote:
> > is there a way to automatically remove or add the display to X when the
> > laptop lid is opened or closed. I have been using a script to read
> > dev.acpi_lid.0.state, but is there better way? Also what is the proper
> way
> > to reply to someone while using a mailing list. Do you reply to the
> person
> > or freebsd-questions at freebsd.org.
>
> If you are polling the dev.acpi_lid.0.state value, see /etc/devd.conf
> for examples of ACPI events notification, so you could invoke the need
> actions when lid is open/closed.
>
Okay that seems to be the solution. I also have an issue that
dev.acpi_lid.0.state is incorrect if the lid was open at boot. you have to
close and open the lid for the value to be correct.



-- 
Noah Palmer


More information about the freebsd-questions mailing list