Disable/enable ACPI wakeup devices
$ git clone https://github.com/hbriese/acpi_wakeup.git
$ sudo acpi_wakeup/install.sh
$ acpi_wakeup -l
Device names (or sysfs nodes) that you want ACPI wakeups enabled for. Supports regular expressions.
Edit /etc/acpi_wakeup.conf with each device on a new line.
e.g. Keep awake PBTN (power button), LID devices (e.g. LID...), and a particular PCI devices.
> /etc/acpi_wakeup.conf
# Comments after a hash
PBTN
LID[\d]*
pci:0000:00:14.0
Default devices enabled: PBTN LID[\d]*
It is recommended to specify devices by their sysfs node (e.g. pci:...) if the device name is not unique.
Overrides devices in /etc/wakeup-devices.conf
$ acpi_wakeup -s -d DEVICE DEVICE ...
e.g.
$ acpi_wakeup -s -d PBTN LID[\d]* pci:0000:00:14.0
Use --devices (-d) without any options to disable all wakeup devices.
$ acpi_wakeup -s -d
Automatically executed on start by systemd.
Use with other options for them to have an affect.
$ acpi_wakeup -s