Since 16.04, I don't have 'when the lid is closed' options in power settings

Old OS/kernels: Ubuntu 15.10 with 4.4 kernels manually installed. New OS/kernels: Ubuntu 16.04 (no custom kernels, so 4.4 in place).

Since upgrading to 16.04 it doesn't suspend correctly. when I open the lid again later it reboots. Instead of showing the login screen it goes through BIOS and GRUB etc. Power settings shows how much battery I have left, shows Power saving options and under 'Suspend & Power Off' it has 'Automatic Suspend: Off'. It doesn't have settings for 'When the lid is closed'.

/etc/systemd/logind.conf looks like this:

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
HandleLidSwitch=suspend
HandleLidSwitchDocked=suspend
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#UserTasksMax=12288

So HandleLidSwitch=suspend is turned on.

EDIT:

Suspending 'works' so much that on lid close it suspends. However, it seems to tell the BIOS the wrong thing or something, because it doesn't actually suspend. I ran sudo pm-suspend which should suspend it, but when I then hit the power-switch again to get it out of suspend it started going through the bootcycle again.


Solution 1:

Tested on Ubuntu 21.04, the GUI option is available on gnome-tweak-tools:

sudo apt install gnome-tweak-tools
gnome-tweak-tools

under:

  • General
  • Suspend when laptop lid is closed

Asking at https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1384 why not just add it to the main settings.

enter image description here