Prevent laptop from going to sleep when I close the lid, but only if I'm connected to an external display

11

3

When I'm connected to an external display, I would like to close the laptop without it going to sleep. When I'm not connected to an external display, I would like to have closing the lid put the laptop to sleep. I know I can achieve this by manually switching the power settings, but I'd like something automatic. I'm running Windows 7 (Home Premium 64bit) on an HP Pavilion dm3-1030us. Thanks.

blauser

Posted 2010-07-23T17:53:34.230

Reputation: 111

Question was closed 2019-12-11T03:22:05.770

Answers

0

Write a script or service, that detects if an external display is connected. If it is, have the script/service turn on sleep setting. If it is not, have the script/service turn off sleep setting again.

Other than that I am not aware of a solution.

S3k

Posted 2010-07-23T17:53:34.230

Reputation: 1

-1

Go to control panel then power settings the option should be in there

Postal

Posted 2010-07-23T17:53:34.230

Reputation: 57

2I've already checked there. It only differentiates between plugged in and on battery. There is nothing about being connected to an external display. – blauser – 2010-10-08T15:27:27.663

1why dont you set up 2 power plans? its not automatic but its the best you can do – Postal – 2010-10-11T08:34:01.493