Closing the laptop lid automatically puts it into sleep mode or turns it off - this is standard behavior for most models. But what if you need to leave the device running unattended? For example, for downloading files, rendering videos, server tasks or remote access via RDP.
In this article we will look at all the ways to disable automatic shutdown: from basic settings Windows OS, macOS And Linux to hidden parameters BIOS/UEFI and hardware limitations. We will also tell you what risks of overheating and screen damage occur when working for a long time with the lid closed - and how to minimize them.
Why does the laptop turn off when closing the lid: technical reasons
Automatic shutdown when closing the lid is built into the firmware and operating system. This is made for:
- 🔋 Battery Saver — in sleep mode, energy consumption is reduced by 5–10 times.
- 🛡️ Screen protection - liquid crystal panels (LCD/OLED) is spoiled by a static image ("burn-in").
- 🔥 Prevent overheating — in a closed case, air circulation deteriorates, which leads to throttling (thermal throttling).
- 🚀 Quick restoration of work — sleep mode allows you to instantly continue tasks after opening the lid.
However, these security measures are not always convenient. For example, if you are using a laptop as a server for Minecraft or run a long render in Blender, a forced shutdown may interrupt the process. Fortunately, the behavior of the lid can be reconfigured.
⚠️ Attention: Prolonged operation with the lid closed can reduce battery life by 15–20% due to increased temperature. If you need to leave your laptop for a few hours, plug it in and use a cooling pad.
Settings in Windows 10 and 11: changing the action when closing the lid
In Windows, power management options are hidden in the Control Panel. Here's how to find them:
- Open
Start → Control Panel → Hardware and Sound → Power Options. - From the left menu select
What the power buttons do. - Click
Change settings that are currently unavailable(Administrator rights required). - In the section
Shutdown Optionsfind the itemAction when closing the lid. - For modes
On batteryAndFrom the networkselectDo nothing. - Save changes with the button
Save changes.
If item Do nothing is missing, it means your version of Windows or power management drivers do not support this option. In this case, try updating the chipset drivers via Device Manager or manufacturer's website (Lenovo, HP, Dell etc.).
Update your chipset and power management drivers|Connect your laptop to a network|Close any programs that may be blocking changes|Check if your model supports closed lid operation-->
On some laptops (eg ASUS ROG or MSI Gaming) there are proprietary utilities for power management. They can override system settings. Go to MyASUS, MSI Center or similar software and check the section Power or Hardware Settings.
macOS: How to disable sleep mode when closed
On MacBook (including models MacBook Pro, MacBook Air And iMac with an external display) the setting is implemented differently. By default, when you close the lid, the device goes into sleep mode, but there are workarounds:
Method 1: Using an external monitor
- 🖥️ Connect MacBook to external display via HDMI, USB-C or Thunderbolt.
- 🔄 Close the lid - the system will automatically switch to the external screen.
- ⚡ Make sure the laptop is connected to the network, otherwise it will fall asleep in 1-2 hours.
Method 2: Terminal Commands to Disable Sleep
If you need to MacBook worked without an external monitor, run in Terminal:
sudo pmset -a disablesleep 1
This command disables sleep mode when the lid is closed. To return to default behavior, enter:
sudo pmset -a disablesleep 0
⚠️ Attention: On MacBook with chips Apple M1/M2 Disabling sleep completely can lead to overheating due to passive cooling. Use this method only when plugged in and with external cooling.
- Windows (Lenovo, HP, Dell, etc.)
- MacBook (Apple)
- Linux (Ubuntu, Fedora, etc.)
- Other
Linux (Ubuntu, Fedora, Mint): editing configs manually
On Linux distributions, power management depends on the environment you are using (GNOME, KDE, XFCE) and demon systemd-logind. Let's consider a universal method:
Step 1: Checking Current Settings
Run the command:
cat /etc/systemd/logind.conf | grep HandleLidSwitch
If the parameter HandleLidSwitch missing or relevant suspend, it needs to be changed.
Step 2: Editing the Configuration File
Open the file with superuser rights:
sudo nano /etc/systemd/logind.conf
Find the line #HandleLidSwitch=suspend and replace it with:
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
Save changes (Ctrl+O) and restart the service:
sudo systemctl restart systemd-logind
For Ubuntu with GNOME You may also need to disable sleep mode in dconf-editor on the way org.gnome.settings-daemon.plugins.power (parameter lid-close-ac-action).
What to do if the settings are not applied?
If after editing logind.conf The laptop still turns off, check:
1. Presence of conflicting services (for example, tlp for power management).
2. BIOS settings (see next section).
3. Rights to the configuration file - it must belong to the user root.
BIOS/UEFI Settings: Hidden Lid Control Options
If the software methods do not work, the problem may be with the motherboard firmware. Go to BIOS/UEFI (usually by key F2, Del or Esc on boot) and find:
| Manufacturer | BIOS section | Parameter | Recommended value |
|---|---|---|---|
| Lenovo | Config → Power |
Lid Close Action |
Do Nothing |
| HP | System Configuration → Built-In Device Options |
Action Keys Mode |
Disabled (disables response to closing) |
| Dell | POST Behavior → AC Power Recovery |
Lid Switch |
Last State or Stay Off |
| ASUS | Advanced → APM Configuration |
Lid Open Resume |
Enabled (allows closing to be ignored) |
| Acer | Main → Power Management |
Lid Switch State |
Ignore |
If your BIOS doesn't have an explicit option for the lid, try disabling ACPI Suspend Mode or install ACPI Sleep State in S0 (full awakening). Be careful: incorrect settings may make the system unable to boot.
Before changing the BIOS, take a photo of the current settings on your phone. If the laptop does not boot after saving, reset the BIOS by removing the CMOS battery for 10 seconds (on desktop PCs) or using a jumper CLR_CMOS.
Risks and how to avoid them: overheating, battery, screen
Working with the lid closed creates three main problems:
1. Overheating
In a closed case, air circulation is disrupted, which leads to:
- 🌡️ Increase the temperature of the processor and video card by 15–30°C.
- ⚡ Throttling (thermal throttling) - forced reduction in productivity.
- 🔥 Risk of damage to thermal paste and peeling of chips (in the long term).
Solution: Use a cooling pad with active airflow and limit the load on the CPU/GPU (for example, through ThrottleStop or cpulimit on Linux).
2. Battery wear
At high temperatures (>40°C), lithium-ion batteries degrade 2-3 times faster. If you need to leave your laptop for a long time:
- 🔌 Connect it to the network and remove the battery (if physically possible).
- 📉 Limit the charge to 60–80% using utilities like Battery Limiter (for Lenovo) or
tlp(Linux).
3. Screen damage ("burn-in")
On OLED-panels (for example, in MacBook Pro 2021+ or Dell XPS 13) a static image can be “imprinted” into the matrix. To avoid this:
- 🖥️ Connect an external monitor and turn off the built-in display via
Win+P → Second screen only(Windows) orSystem Preferences → Displays(macOS). - 🔄 Turn on a screensaver with moving elements (for example, "Bubbles" in Windows).
If you need to leave your laptop with the lid closed for more than 4 hours, the best option is to connect an external monitor, remove the battery (if possible), and use a cooling pad.
Alternative solutions: remote access and automation
If resetting the lid doesn't help or you're concerned about overheating, consider alternative approaches:
1. Remote access via RDP/SSH
Set up a connection to your laptop via the network:
- 🖥️ Windows: Turn on
Settings → System → Remote Desktopand connect via Microsoft Remote Desktop. - 🐧 Linux: Install
xrdpor usessh -Xfor graphic applications. - 🍎 macOS: Activate
System Preferences → Sharing → Remote Control.
Once configured, simply close the lid and control your laptop from another device.
2. Scripts to simulate activity
If the system goes into sleep mode due to inactivity, create a script that will “trick” it:
- 🖱️ Windows: Use Mouse Jiggler or script on AutoHotkey, which moves the cursor by 1 pixel every minute.
- 🐍 Linux/macOS: Run in terminal:
while true; do xdotool mousemove 100 100; sleep 60; done
3. Task Scheduler
Set up your laptop to automatically wake up to perform tasks:
- ⏰ B Windows use
Task scheduler → Create task → Trigger "When idle". - 📅 B Linux add a task to
cronwith a flag@reboot.
FAQ: Frequently asked questions and problems
My laptop still turns off when I close the lid even though I changed the settings in Windows. What to do?
The problem may be:
- Power management drivers - update them via Device Manager (section
System devices). - Manufacturer's proprietary software (for example, Lenovo Vantage or HP Support Assistant) - check the power settings there.
- BIOS - some models (Acer Swift, MSI Modern) block changes in the behavior of the lid at the firmware level.
If all else fails, try rolling back the drivers or resetting the BIOS to factory settings.
Is it safe to leave your laptop with the lid closed all night?
No, it is unsafe for three reasons:
- Overheating - Even in low load mode, the temperature may exceed 60°C.
- Battery wear - at high temperatures, the capacity decreases by 1-2% per month.
- Risk of fire - if the cooling system is blocked (for example by dust), overheating to critical levels is possible.
If you need to leave your laptop overnight, use an external monitor and turn off the built-in display.
How to check the temperature of a laptop with the lid closed?
Use monitoring programs:
- Windows: HWMonitor, Core Temp, SpeedFan.
- macOS: iStat Menus or
sudo powermetrics --samplers smc | grep -i "CPU die temperature"inTerminal. - Linux:
sensors(install packagelm-sensors) or Psensor.
Critical temperatures:
- CPU: >90°C (risk of throttling).
- Video card: >85°C (at NVIDIA/AMD).
- Battery: >50°C (accelerated degradation).
Is it possible to configure different behavior of the cover from the battery and from the mains?
Yes, on Windows and Linux this is supported by default:
- B Windows in power settings (
What the power buttons do) there are separate parameters forOn batteryAndFrom the network. - B Linux in the file
/etc/systemd/logind.confuse parametersHandleLidSwitch(for battery) andHandleLidSwitchExternalPower(for network).
On MacBook such division is not available - the system always uses the same settings.
Why doesn't my laptop wake up when I open the lid after changing the settings?
Possible reasons:
- Video card driver conflict (especially on laptops with NVIDIA Optimus). Solution: update your drivers or roll back to standard ones.
- Malfunction
ACPI(Advanced Configuration and Power Interface). Check the logs viajournalctl -b | grep -i acpi(Linux) or Windows Event Log. - Hardware problem with the lid sensor. You can check it at
Device Manager(sectionSystem devices) or through the commandcat /proc/acpi/button/lid/LID/state(Linux).