[Pkg-acpi-devel] Bug#766991: Bug#766991: Bug#766991: acpid: does not process events

Josh Triplett josh at joshtriplett.org
Sat Nov 8 16:08:04 UTC 2014

On Sat, Nov 08, 2014 at 04:43:41PM +0100, Michael Meskes wrote:
> On Wed, Nov 05, 2014 at 06:36:47AM -0800, Josh Triplett wrote:
> > If acpid needs to run to manage scripts in /etc/acpi/events/, then in
> > addition to the acpid.socket file, you should also ship an acpid.path
> > file, containing:
> > 
> > [Path]
> > ConditionDirectoryNotEmpty=/etc/acpi/events/
> > 
> > [Install]
> > WantedBy=paths.target
> > 
> > That will then cause systemd to automatically activate acpid.service
> > whenever /etc/acpi/events/ becomes non-empty, in addition to
> > acpid.socket which will activate acpid.service whenever anything
> > connects to the acpid socket.
> Interesting, I didn't know this feature so far. However, I don't think this
> makes sense because acpid comes with a set of pre-defined events in
> /etc/apci/events or in other words, the only way to get it empty is to remove
> those by hand.

acpid does not contain any files in /etc/acpi/events/ by default.  (Just
checked in the latest version of acpid, 1:2.0.23-1.)

Perhaps you have acpi-support-base or acpi-support installed, both of
which install event scripts?  If you do, then it makes sense for acpid
to start by default.  However, I would recommend instead that you remove
acpi-support-base and acpi-support, even if you keep acpid installed for
your own scripts.  (And if you don't have your own scripts in
/etc/acpi/events/, I'd recommend removing acpid entirely.)

These days, miscellaneous laptop keys (as handled by acpi-support)
almost always get handled correctly by the kernel and userspace.  and to
the extent they don't, we can and should fix that.  The power button
gets handled by both systemd and various desktop environments, making
acpi-support-base unnecessary as well; powerbtn.sh in acpi-support-base
specifically avoids doing anything if running either a desktop
environment or logind.

Formerly, it made sense to install acpi-support-base on headless or
text-console-only systems so the power button worked, but systemd
handles that now, so you only need acpid and acpi-support-base for a
headless/console-only system running sysvinit or similar.  The power
button doesn't need to go via ACPI events anymore, as the kernel
provides an input device.  And now, normal keyboards that have
power/sleep/etc buttons work too.

So, I do think it makes sense for acpid to automatically run if and only
if 1) scripts exist in /etc/acpi/events/ or 2) someone connects to the
acpid socket.

- Josh Triplett

More information about the Pkg-acpi-devel mailing list