Message: previous - next
Month: May 2018

Re: [trinity-devel] ACPIAC k(t)control module in TDE?

From: "David C. Rankin" <drankinatty@...>
Date: Tue, 15 May 2018 19:51:22 -0500
On 05/14/2018 03:09 PM, David C. Rankin wrote:
> Tim, all,
>   This is a tangential question on whether TDE has included an acpiac
> configuration module for specifying event-handling for say laptop power-button
> (suspend or off) as well as lid closed, etc.
>   This is prompted by the trend away from acpi (with the configuration for
> event handling in /etc/acpi/ to acpiac which has a dearth of
> documentation and limited user-information. Evidently, plasma, gnome and xfce
> have configuration widgets for it. K3 has none (aside from the monitor DPMS
> control -- which isn't related). If TDE has an implementation, I'd love to see
> the commit and see how you did it, and where you put the interface. If TDE
> doesn't have an interface yet, well throw it on the wishlist heap -- as it
> looks like we will all have to deal with this power-interface in the near
> future -- it's code feeds into the kernel -- so it's coming.
>   Short list of info links:
> what it is:
> or the
> API/Programming Reference:
> OS-Dev wisdom:


  Thankfully this isn't as bad as first thought. systemd provides an interface
through /etc/systemd/login.conf that allows you to control settings for
PowerKey, LidSwitch, etc..., e.g.

#HandlePowerKey=poweroff         <== PowerKey power button config
#HandleLidSwitch=suspend         <== LidSwitch lid behavior config

So rather than need to access the acpica API via C/C++, a basic config tool
can simple manipulate the settings in /etc/systemd/login.conf (though for
user-config, there may need to be something in ~/.config or ~/.local -- I
haven't checked whether systemd provides user-override control (though I doubt
it here since login.conf is a systemd system-wide config)

Note: a systemctl daemon-reload and logout/login isn't sufficient for the
change to be seen, a reboot is needed (this is where an interface with the
API, or using one of the acpica utilities may allow a direct change of the
current acpi state.

Heap this on the (may need to get to in the future) pile...

David C. Rankin, J.D.,P.E.