Laptops go to sleep when you close the lid, in order to save power.
Dokumentationsprojekt för GNOME
gnome-doc-list@gnome.org

# Why does my computer turn off when I close the lid?

When you close the lid of your laptop, your computer will suspend in order to save power. This means that the computer is not actually turned off - it has just gone to sleep. You can wake it up by opening the lid. If it doesn't wake up, try clicking the mouse or pressing a key. If that still doesn't work, press the power button.

Some computers are unable to suspend properly, normally because their hardware isn't completely supported by the operating system (e.g. the Linux drivers are incomplete). In this case, you may find that you are unable to wake up your computer after you've closed the lid. You can try to fix the problem with suspend, or you can prevent the computer from trying to suspend when you close the lid.

# Stop the computer from suspending when the lid is closed

If you don't want the computer to suspend when you close the lid, you can change the settings for that behavior. To set the computer to blank the screen, rather than suspend, when the lid is closed:

Be very careful if you change this setting. Some laptops can overheat if they are left running with the lid closed, especially if they are in a confined place like a backpack.

Open the Terminal application from the Activities overview.

To change the setting used when running on battery power, type this command and press Enter:

    gsettings set org.gnome.settings-daemon.plugin.power lid-close-battery-action blank

To change the setting used when running on AC power, type this command and press Enter:

    gsettings set org.gnome.settings-daemon.plugin.power lid-close-ac-action blank

There are other settings available besides "blank," such as "nothing," which causes the computer to do nothing.