There seems some general confusion as to how hardware events are handled since systemd 231. Systemd /etc/systemd/logind.conf takes precedence over powerdevil settings.
So if for example you set laptop lid closing actions in systemsettings > power management, you might see that logind.conf overrrides those powersettings.
To change this use systemsettings > startup & shutdown > systemd
Go to the "conf" tab, select logind.conf from the drop down menu and make sure to set "HandleLidSwitch" to ignore, that way power settings will handle those again.
Or adjust your desired right there in the systemd KCM (double click the default "suspend" line to get the options menu).
Systemd 231 & close lid actions
25 days later
That explains why my laptop got suspended even if I tried to change it in PM settings
Thanx!