How can I keep my laptop on when closed?

I often find myself in situations where I need to keep my laptop running even when the lid is closed. This usually happens when I am downloading large files, running long processes, or using my laptop as a media server connected to an external monitor. It’s frustrating when the system goes into sleep mode each time I close the lid, interrupting whatever task I am working on. I understand there might be settings or methods that can help prevent the laptop from sleeping or shutting down when the lid is closed, but I am not sure how to adjust them properly. I want to ensure that my laptop remains on and fully functional while closed, without causing any potential issues. How can I achieve this?
7 Answers

As a Mac user connecting to an external monitor, I prefer this simple method:
1. Open System Preferences > Energy Saver.
2. Under the Power Adapter tab, drag the sleep slider to ‘Never’. This configuration keeps the laptop running while closed and connected to an external display, optimizing my workflow.

On my Linux system, I use this command-line method:
1. Open the terminal and edit sleep settings with sudo nano /etc/systemd/logind.conf
.
2. Locate #HandleLidSwitch=suspend
and change it to HandleLidSwitch=ignore
.
3. Save the file and restart the service using systemctl restart systemd-logind
. This provides fine-tuned control over the system’s behavior when the lid is closed.

For those who need to consider laptop cooling, I follow these steps:
1. Use a cooling pad beneath the laptop for improved heat dissipation.
2. Go to ‘System Preferences’ on a Mac, select ‘Energy Saver,’ then adjust the settings to prevent the laptop from sleeping when the lid is shut. By ensuring adequate cooling and adjusting the settings, I keep my laptop operational without overheating risks.

To ensure my laptop stays on when I close the lid, I navigate to the power settings. Here’s the procedure:
1. Open Control Panel > Hardware and Sound.
2. Click on Power Options, then select ‘Choose what closing the lid does.’
3. From the drop-down menu, I choose ‘Do nothing’ for both ‘On battery’ and ‘Plugged in.’
4. Finally, I save the changes. This adjustment stops the laptop from entering sleep mode when the lid is closed, allowing tasks to continue uninterrupted.

Using automation provides a convenient alternative. Here’s my approach:
1. Install a third-party app like InsomniaX
for Mac or Don't Sleep
for Windows.
2. Configure the app to disable sleep mode when the laptop lid is closed. Utilizing these applications offers greater flexibility and control over the laptop’s sleep behavior.

Here’s a detailed guide for keeping a Windows laptop on when closed:
1. Press the Windows key, type Control Panel
, and press Enter.
2. Click on Hardware and Sound, and then select Power Options.
3. On the left, click ‘Choose what closing the lid does.’
4. Change the ‘When I close the lid’ settings to ‘Do nothing’ for both battery and plugged in modes.
5. Hit the ‘Save changes’ button to apply the settings. These steps ensure that the laptop remains active even when the lid is closed.