Go to System Settings and then click on Power. In the power setting, make sure that option for 'When the lid is closed' is set to Suspend. If you had a different setting here, you should check if you are able to suspend Ubuntu by closing the lid.
- How do I keep my laptop from sleeping when I close Linux?
- How do I make my laptop sleep Ubuntu?
- What do you do when your laptop lid is closed?
How do I keep my laptop from sleeping when I close Linux?
Open the /etc/systemd/logind.
Find the line #HandleLidSwitch=suspend. Remove the # character at the beginning of the line. Change the line to either of the desired settings below: HandleLidSwitch=poweroff to shutdown computer when lid is closed.
How do I make my laptop sleep Ubuntu?
Set up automatic suspend
- Open the Activities overview and start typing Power.
- Click Power to open the panel.
- In the Suspend & Power Button section, click Automatic suspend.
- Choose On Battery Power or Plugged In, set the switch to on, and select a Delay. Both options can be configured.
What do you do when your laptop lid is closed?
Choose What Closing the Lid Does
Open the Start menu and search for Control Panel. Navigate to Hardware and Sound > Power Options > Choose what closing the lid does. You can also type "Lid" into the Start menu to immediately find this menu.