Index | Thread | Search

From:
Mark Kettenis <mark.kettenis@xs4all.nl>
Subject:
Re: gpiokeys: avoid repeated suspend on lid events
To:
"Theo de Raadt" <deraadt@openbsd.org>
Cc:
kirill@korins.ky, tech@openbsd.org
Date:
Mon, 05 Oct 2026 22:37:00 +0200

Download raw body.

Thread
> From: "Theo de Raadt" <deraadt@openbsd.org>
> Date: Mon, 05 Oct 2026 14:08:44 -0600
> 
> Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
> 
> > I'm not sure this is the right place to fix this.  Although ACPI does
> > something similar in acpibtn(4).  I wonder if it would it make sense
> > to check in request_sleep() instead?
> 
> Maybe.
> 
> Do you propose that acpi_apm.c should also have the same check?
> 
> I suspect thinking about it that way may need to an even better
> proposal :)

I'm not sure.  The current code in acpibtn.c short-circuits early on
and removing that means it will run a lot more AML.  I haven't fully
thought through the consequences of that.

Also note that the code in acpibtn.c doesn't have the check for
SLEEP_SUSPEND.  So even if we keep the resuming() check in gpiokeys, I
wonder iuf we really need the SLEEP_SUSPEND check as well.