V
V
Viktor Familyevich2018-09-14 19:03:06
Electronics
Viktor Familyevich, 2018-09-14 19:03:06

How to prevent the laptop from falling asleep when the lid is closed if a second monitor is connected?

And if the second monitor is not connected, then it goes into sleep mode.
OS Windows 10

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
VoidVolker, 2018-09-15
@Wintego

We create two power plans - for one and for two monitors, where we configure the behavior of the laptop lid and so on. Then, in the command line, we execute the command:
It will give a list of plans with their GUIDs. Next , download nnCron , set it as an application, add it to autorun. Add the following task to the crontab (indicating the GUID of your plans there):

#( Задача_103415092018
SingleInstance
WINAPI: GetSystemMetrics user32.dll
0 VALUE LastMonitorsCount
Action:
BEGIN
    80 GetSystemMetrics
    DUP LastMonitorsCount <> IF
        DUP 1 = IF
            \ Здесь указываем GUID плана для одного монитора
            START-APP: powercfg /setactive 381b4222-f694-41f0-9685-ff5bb260df2e
        ELSE
            \ Здесь указываем GUID плана для двух и более мониторов
            START-APP: powercfg /setactive 238c9fa8-0aad-41ed-83f4-97be242c8f20
        THEN
        TO LastMonitorsCount
    THEN DROP
    5000 PAUSE
FALSE UNTIL
)#

The task will automatically start at the beginning of the next minute and will run in the background, check once every five seconds if the monitor configuration has changed and apply the appropriate plan. Loads per percent there are fractions of a percent.

V
Vadim Andreevich, 2018-09-14
@VaInDis

That Win10 that Win 7. The essence is the same. Works in terms of power supply the same way.
I'll show you the example of Win 7.
And so:

  1. Press the "Start" key or "Win" on the keyboard or on the taskbar.
    The "Start" or "Win" key on the keyboard.
    "Start" or "Win" button on the taskbar.
    Click on "Power".
    "Power supply".
  2. In the window that opens, set the item "Never". You may have other items. The essence is one
    "Turn off the display" - "Sleep" and others set "Never".
  3. To be sure, we check more detailed power supply parameters. Click "Change
    advanced power settings".
  4. In the window that opens, select these two items "Sleep" and "Screen".
    Click on "+"
  5. Click "Apply" then "OK".
    To be sure, for the changes to take effect, reboot the device (optional).
    If everything was done correctly, now the device will not autonomously go to "Sleep". Only by pressing
    (Sleep mode activation).
    Thank you for your attention, I hope it helped;)
    All the best.

P
Pavel Belyaev, 2019-03-18
@PavelBelyaev

The action when closing the lid must be disabled in the power settings, in the same place the action when the power button is pressed is configured, in short, the lid is like a power button, ACPI action.
And what the comrade wrote above - it turned off the sleep by timeout.
20170521-1-min.jpg20180428-1.jpg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question