Sleep from Command line with Psshutdown no longer working

Click Click 6 Reputation points
2024-11-19T11:53:12.8733333+00:00

I am using the sysinternals tool psshutdown.exe -d to suspend the pc from a command line on my Thinkpad L460. This works just fine on W7, W8, W10 and W11. I recently purchased an E16 G2 that has W11 Pro Preloaded on it. Psshutdown no longer works and quits with the following:

c:>psshutdown.exe -d

PsShutdown v2.6 - Shutdown, logoff and power manage local and remote systems Copyright (C) 1999-2023 Mark Russinovich Sysinternals - www.sysinternals.com

Error suspending local system: The local system does not support suspend.

I always have hibernate turned off, but if I turn it on, psshutdown -d (suspend) goes into hibernation instead of sleep.

What's the problem here?

I know sleep (suspend) works because selecting Sleep from the power button via Start Menu will suspend the PC, but I need to do this from a batch script.

rundll32.exe powrprof.dll, SetSuspendState Sleep doesn't work either

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,133 questions
Sysinternals
Sysinternals
Advanced system utilities to manage, troubleshoot, and diagnose Windows and Linux systems and applications.
1,178 questions
{count} vote

3 answers

Sort by: Most helpful
  1. Michael Taylor 55,461 Reputation points
    2024-11-19T15:19:18.6866667+00:00

    Did you follow the instructions given here? This is a configuration issue with the machine and not an issue with the OS version.


  2. Daisy Zhou 26,326 Reputation points Microsoft Vendor
    2024-11-20T07:50:05.3433333+00:00

    Hello Click Click,

    Thank you for posting in Q&A forum.

    It seems that PsShutdown has some compatibility issues with Windows 11 Pro, you can use alternative methods to put your system to sleep from the command line.

    1.Using PowerShell: You can use the following PowerShell command to put your computer to sleep:

       Start-Sleep -Seconds 5

       rundll32.exe powrprof.dll,SetSuspendState 0,1,0

    2.Using Command Prompt: You can create a shortcut or run the following command in Command Prompt:

       rundll32.exe powrprof.dll,SetSuspendState Sleep

    3.Using shutdown Command: Although shutdown is typically used for shutting down or restarting, you can use it to hibernate, which is similar to sleep:

       shutdown /h

    If you still prefer using PsShutdown, ensure you have the latest version (v2.6) as it includes some fixes. You can download it from the Sysinternals website.

    Reference:

    PSShutdown - Windows 11 Compatibility #485 - GitHub

    PsShutdown - Sysinternals | Microsoft Learn

     

    I hope the information above is helpful.

    If you have any questions or concerns, please feel free to let us know.

    Best Regards,

    Daisy Zhou

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.


  3. Click Click 6 Reputation points
    2024-11-20T22:27:00.63+00:00

    It turns out that Lenovo removed the support for S3 (suspend) on the E16 G2 which was replaced by what Ms calls Modern Standby. That's why specifying -d returns an error. After looking at all the options for psshutdown, I see

    -x Turn monitor off (system will initiate Modern Standby if supported)

    so -x needs to be used with the E16 G2 instead of -d for psshutdown for Sleep to work. I don't have an answeron how to use modern standby for the other command line options.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.