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 resume it by opening the lid. If it does not resume, try clicking the mouse or pressing a key. If that still does not work, press the power button.
Some computers are unable to suspend properly, normally because their hardware is not completely supported by the operating system (for example, the Linux drivers are incomplete). In this case, you may find that you are unable to resume your computer after you have 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.
These instructions will only work if you are using
If you do not want the computer to suspend when you close the lid, you can change the settings for that behavior. You will need to have an administrator password to change the setting.
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
Run the following command:
You will now see the contents of the file. Look for
HandleLidSwitch=
in the file. The line may be quoted out
with a #
at the start and may be followed by an argument. If
the line already exists, unquote it. Otherwise, add the line.
[Login]
HandleLidSwitch=lock
You can use lock for the screen to lock, ignore for nothing to happen, poweroff for the computer to switch off or suspend to suspend. For more information, see logind.conf help.
Once you finish editing the file, save your changes and quit the editor.
Run the following command to make your change work:
If you do not run that command, the change will only work after your computer is restarted.