I would like different behaviors on lid closing depending on AC is plugged (do nothing) or not (suspend). My laptop is a DELL Latitude under 64-bit Ubuntu 17.10. What I already tried:
- Using GNOME Tweaks. It works well to define the overall lid behavior, but it does not change with AC/battery status.
- Using dconf shows some interesting settings (
lid-close-ac-action
andlid-close-battery-action
), but they are always overriden by the above discussed GNOME Tweaks settings. - Manually editing (as root)
/etc/systemd/logind.conf
and commenting/uncommenting/changing the values ofHandleLidSwitch
,HandleLidSwitchDocked
andLidSwitchIgnoreInhibited
seem to have no effect whatsoever. - Choosing X or (default) Wayland does not seem to change anything either.
So what can I do? These settings used to work on previous Ubuntu versions, and forgetting to suspend while on battery leads to a fast drain of the battery within 24-48 hours...
Thanks in advance,