I am aware of the following SuperUser questions:

Neither of these have useful answers, and are also both quite old.

In the current version of Windows 10, is there a way to tell Windows to sleep only if the lid is closed and there are no external monitors attached?

In work, I like to close the lid and attach a couple of monitors, at home I just use the laptop as-is.

Sometimes I close the lid before I leave for home, forgetting it's actually still running, and take my laptop out of the bag when I get home to discover it is radioactive hot!

The laptop is a Dell XPS 9550, if that helps.


2 Answers 2


That functionality is not built into Windows.

However, it would be fairly easy to write a script to do so. In Poweshell you would use Get-WmiObject win32_desktopmonitor to see if a monitor is attached, then you can change the power plan accordingly.

  • Nice, surely somebody at some point has bundled this into a program, no?
    – JMK
    Sep 22, 2017 at 22:30
  • 2
    not that i know of, but it could be done. I dont think there really is much of a demand for it. It would be easier to remember to turn off your laptop :)
    – Keltari
    Sep 22, 2017 at 23:09
  • Ha, Fair point :)
    – JMK
    Sep 22, 2017 at 23:30

There seems to be a way, although it is not as convenient as it could/should be:

  1. Select your external monitor as your main monitor.
  2. Set your computer to sleep when the lid is closed.
  3. Now you can close the lid, your computer will go to sleep.
  4. But when you click a mouse button it will come back from sleep while the lid is closed.

(Source: reply from "none_ofyour_business")

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .