Can I tell Windows 10 - 'If I close the lid on my laptop, go to sleep IF I don't have an external monitor attached'?

7

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.

Thanks

JMK

Posted 2017-09-22T21:50:54.160

Reputation: 2 839

Answers

7

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.

Keltari

Posted 2017-09-22T21:50:54.160

Reputation: 57 019

Nice, surely somebody at some point has bundled this into a program, no? – JMK – 2017-09-22T22:30:26.760

2not 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 – 2017-09-22T23:09:32.477

Ha, Fair point :) – JMK – 2017-09-22T23:30:22.157

0

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")

janpio

Posted 2017-09-22T21:50:54.160

Reputation: 975