main/acpid: suspend on lid close broken when HID with battery is plugged
The default handler for the "lid close" event is "Suspend to RAM if AC adapter is not connected" (handler.sh)
It does so by looking at /sys/class/power_supply/*/online
(power-supply-ac)
Example on my laptop
$ for o in /sys/class/power_supply/*/online; do echo $o: $(cat $o); done
/sys/class/power_supply/ADP1/online: 1
/sys/class/power_supply/hid-0018:04F3:2CA5.0001-battery/online: 1
The second entry is an active stylus integrated to the laptop.
Its presence means power-supply-ac
returns 0
and the laptop never suspends when the lid is closed.
I expect the same behavior a wireless mouse, though I have no hardware to test this.