Most people believe closing the laptop lid always puts the device to sleep—but this is not true. Whether your laptop sleeps when you close the lid depends entirely on your operating system’s power settings, and you can change it so it stays awake. You can prevent sleep mode when the lid closes by adjusting system settings in Windows, macOS, or Linux—no hardware modification needed.
You can stop your laptop from sleeping when the lid is closed by editing power or energy settings in your operating system—no extra hardware or software required.
The common misconception is that the lid switch physically forces sleep mode. In reality, the lid sensor only sends a signal; the operating system decides what to do with it, based on user-defined rules. Understanding this separates guesswork from control, and lets you choose actions like doing nothing, turning off the screen, or staying fully active.
A practical rule of thumb: if you need your laptop running—like for downloads, remote access, or media streaming—set the lid-close action to "Do nothing" or "Turn off display" instead of "Sleep". If security or battery life matters more, keep sleep enabled and use an external keyboard or mouse to wake it when needed.
Windows: Change Lid-Close Action in Power Settings
On Windows, lid behavior is controlled through the Power & Sleep settings and the more detailed Power Options. The steps differ slightly between Windows 10 and Windows 11, but the core path is identical.
Windows 11: Use Settings to Set Lid Behavior
- Open Settings (Windows key + I).
- Go to System > Power & battery.
- Scroll down and select Battery saver settings.
- Under "More battery settings", click "Additional power settings".
- In the Power Options window, click "Choose what closing the lid does" on the left.
- Select your preferred action (Do nothing, Sleep, Hibernate, or Shut down) for both "On battery" and "Plugged in".
- Click Save changes.
Make sure you edit both power states—your laptop might behave differently when running on battery versus being plugged in.
Windows 10: Use Control Panel for Power Plans
- Open Control Panel (type "Control Panel" in the Start menu).
- Go to Hardware and Sound > Power Options.
- Click "Choose what closing the lid does" on the left panel.
- Set actions for "When I close the lid" under both "On battery" and "Plugged in".
- Click Save changes at the bottom.
If you don’t see the lid options, you may need to enable them first. In the same window, click "Change settings that are currently unavailable" at the top, then uncheck "Turn on fast startup" if it’s enabled. This unlocks full control over lid behavior.
macOS: Lid Behavior Is Fixed, But You Can Work Around It
Apple macOS does not let you change the default lid-closed action—it always puts the Mac to sleep or closes the display, depending on the model. You cannot set it to "Do nothing" via System Settings.
Use an External Monitor to Keep the Mac Active
If you connect an external display, keyboard, and mouse to your Mac, closing the lid puts it into "clamshell mode". In this state, the built-in screen turns off, but the Mac stays awake and operates through the external display. This is the standard workaround for keeping the system running while the lid is closed.
Steps to use clamshell mode:
- Connect your Mac to power.
- Plug in an external monitor via HDMI, USB-C, or Thunderbolt.
- Connect an external keyboard and mouse (or trackpad).
- Close the lid—the Mac should stay on and display on the external screen.
If the Mac goes to sleep anyway, ensure the external display is detected first (press Command + F2 to toggle display mirroring), and that the Mac is receiving power. Some older MacBooks may not support clamshell mode without a wired keyboard, so use a USB-C or Lightning-connected keyboard if needed.
Linux: Edit Power Management Settings by Distribution
Linux behavior varies by desktop environment (GNOME, KDE, XFCE) and distribution (Ubuntu, Fedora, Arch), but all let you override the lid-close action through system configuration or GUI tools.
GNOME (Ubuntu, Fedora, Pop! OS): Use Settings or dconf Editor
- Open Settings > Power.
- Look for "Suspend & Power Button" or "Power Button" section.
- Find "Suspend when laptop lid is closed" and toggle it off.
If the toggle is missing or you need more control:
- Install dconf Editor (e.g.,
sudo apt install dconf-editoron Ubuntu). - Open dconf Editor and navigate to
org.gnome.settings-daemon.plugins.power. - Change
lid-close-ac-actionandlid-close-battery-actiontonothing.
KDE Plasma: Use System Settings
- Open System Settings > Power Management > Energy Saving.
- Go to the "Laptop Lid" tab.
- Set "On lid close" to "Do nothing" for both AC and battery power.
- Click Apply.
Some distributions require editing /etc/systemd/logind.conf directly. Uncomment and change #HandleLidSwitch=suspend to HandleLidSwitch=ignore, then restart the service with sudo systemctl restart systemd-logind.
When Lid-Close Behavior Matters Most
Changing lid behavior is useful in specific situations where uninterrupted operation is essential. It’s worth reviewing your settings if you run any of the following:
- Large file downloads or uploads—especially over 1 GB, which can take 30 minutes or longer.
- Remote desktop or SSH sessions—you’ll lose connection if the laptop sleeps.
- Media servers or home lab devices (e.g., a Raspberry Pi or NAS running on the laptop).
- Compilation tasks, VMs, or long-running scripts (e.g., building software, training models).
- Live streaming, recording, or backup to external drives.
For all these cases, keeping the laptop awake while the lid is closed avoids interruptions. If you’re unsure, test: start a download, close the lid, and check after 10 minutes whether the process continues.
What Happens if You Forget to Adjust the Setting?
Accidentally closing the lid during a critical task is common. If your laptop goes to sleep mid-task:
- Wake it by opening the lid, pressing a key, or clicking a mouse button.
- Check running processes—some applications resume automatically, others may need restarting.
- Prevent recurrence by setting the lid action to "Do nothing" or "Turn off display" before starting long tasks.
On Windows, a wake timer can help: in Power Options > Change plan settings > Change advanced power settings, set "Sleep > Allow wake timers" to "Enable" for important background tasks.
Security and Battery Considerations
Leaving your laptop awake with the lid closed has trade-offs. The screen turns off in most "Do nothing" configurations, but fans may run, and components stay active—this increases heat and power draw.
Battery impact:
- On battery, a laptop using "Do nothing" might drain 10–25% per hour, depending on workload and hardware.
- On AC power, heat buildup can shorten component life if vents are blocked or the laptop sits on soft surfaces like beds or couches.
For security, remember that a laptop left running with the lid closed is still accessible to anyone with physical access. If you’re in a public or shared space, use a screen-lock timeout (e.g., 5 minutes) and require a password on wake. In Windows, set this under Settings > Accounts > Sign-in options > Power button and lid; in macOS, go to System Settings > Lock Screen > Require password after sleep or screen saver.
Testing Your Lid-Close Action
After changing settings, verify the behavior before relying on it:
- Plug in a charging cable and open a browser tab with a video playing.
- Start a large file download (e.g., a 2 GB file from a known mirror).
- Close the lid and wait 15 minutes.
- Open the lid—check if the video is still playing and the download has progressed.
If the laptop slept, repeat the steps and confirm you edited both "On battery" and "Plugged in" settings. On Linux, ensure systemd changes were applied and the service restarted.
What If My Laptop Still Sleeps After Changes?
- Check for pending updates—some OS updates reset power settings.
- On Windows, run
powercfg -restoredefaultschemesin Command Prompt as admin, then reapply your custom settings. - On macOS, reset the System Management Controller (SMC): shut down, connect power, press Shift+Control+Option+Power for 10 seconds, then power on.
- On Linux, verify no third-party tools (e.g., TLP, powertop) override your settings.
Can I Use Keyboard Shortcuts Instead of Opening the Lid?
Yes—most laptops let you lock the screen or sleep manually with shortcuts, so you can keep the lid open when needed. Common options:
- Windows: Windows key + L (lock), Alt+F4 (close active app, then choose sleep).
- macOS: Control+Shift+Power (sleep), Control+Shift+Media Eject (sleep).
- Linux: Super+L (lock), or use a desktop-specific shortcut (e.g., KDE: System Settings > Shortcuts > Custom Shortcuts > Edit > New > Global Shortcut > Command/URL).
These give you precise control without relying on the lid sensor.
Does Using an External Monitor Affect Power Use?
Yes—running a laptop in clamshell mode (lid closed, external display active) typically draws more power than sleeping, but less than running the built-in screen. For example, a 15-inch laptop might use 15W with the lid closed and external display only, versus 8W in sleep mode and 25W with both screens on. Always monitor battery level during long tasks.
Can I Automatically Wake the Laptop Remotely?
Yes, using Wake on LAN (WoL) on Windows or Linux. It requires:
- Enabling WoL in BIOS/UEFI (look for "Wake on LAN" or "PME Event Wake").
- Configuring the OS to allow wake (e.g., in Windows Device Manager > Network adapter > Power Management > Allow this device to wake the computer).
- A second device on the same network to send the magic packet.
macOS does not support WoL over Wi-Fi—only Ethernet—and only in clamshell mode with the Mac awake.
Why Does My Laptop Wake Spontaneously With the Lid Closed?
Some devices wake due to scheduled tasks, network activity, or peripherals. To diagnose on Windows:
- Open Command Prompt as admin.
- Run
powercfg -lastwakeupto see what triggered the last wake. - Run
powercfg -devicequery wake_armedto list devices allowed to wake the PC. - In Device Manager, disable "Allow this device to wake the computer" for unnecessary devices (e.g., USB hubs, keyboards).
On Linux, check cat /proc/acpi/wakeup to identify wake sources.
Are There Risks to Keeping a Laptop Running with the Lid Closed?
Heat buildup is the main concern. If the laptop’s vents are blocked (e.g., by fabric, foam, or a closed drawer), internal temperatures can exceed safe limits over several hours. To mitigate:
- Place the laptop on a hard, flat surface with vents unobstructed.
- Avoid running intensive tasks for extended periods without cooling.
- Use a laptop cooling pad if the temperature exceeds 80°C (176°F) under load.
Normal office tasks (web browsing, downloads, light coding) rarely cause overheating, but video encoding or gaming with the lid closed should be avoided for more than 30 minutes.
How Do I Restore Default Lid Behavior?
To revert to the factory sleep-on-lid setting:
- Windows: In Power Options > Choose what closing the lid does, set both options to "Sleep" and save changes.
- macOS: No manual reset needed—default is already sleep on lid close.
- Linux: In GNOME Settings, toggle "Suspend when laptop lid is closed" back on, or set
HandleLidSwitch=suspendin/etc/systemd/logind.conf.
This ensures the laptop sleeps when the lid closes, conserving battery and improving security if left unattended.
What About Laptops with Detachablekeyboards?
For devices like Microsoft Surface or Yoga tablets, the lid sensor may detect keyboard detachment instead of lid closure. In these cases, the system often treats detachment as a wake event or ignores lid signals entirely. Check your device’s manual for sensor behavior, or test by detaching the keyboard and observing if sleep triggers. Most detachables default to staying awake when detached to support tablet mode.