Solved Create Desktop Shortcut for Sleep


This is exactly what I have in my shortcut that I use for putting the system to sleep.

C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState Sleep

This triggers S3 sleep. Note that I have disabled hibernate on my machines, I find it pretty useless and slow. That may trigger hibernate if it's enabled.

Here's what Google AI says...

Yes, rundll32.exe powrprof.dll,SetSuspendState 0,1,0 often triggers hibernation instead of sleep if hibernation is enabled. The first parameter (0 or Sleep) controls whether it hibernates (true/1 for hibernate, false/0 for sleep), but rundll32 misinterprets the passed arguments, causing Windows to default to hibernation if it is turned on.

I don't routinely leave tons of stuff open day after day, so sleep is fine with me. I also have a 1500VA UPS that gives me 60 minutes of runtime for a power outage. I have Windows set to shutdown after ten minutes of power loss, well before the battery runs out.
 

My Computers My Computers

  • At a glance

    Win 11 Pro 25H2, Build 26200.9168Intel Core i5 14500, 14th Generation64GB DDR4GeForce RTX 4060
    OS
    Win 11 Pro 25H2, Build 26200.9168
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Brew
    CPU
    Intel Core i5 14500, 14th Generation
    Motherboard
    Gigabyte B760M G P WIFI
    Memory
    64GB DDR4
    Graphics Card(s)
    GeForce RTX 4060
    Sound Card
    Chipset Realtek
    Monitor(s) Displays
    LG 45" Ultragear & Acer 24" 1080p
    Screen Resolution
    5120x1440 & 1920x1080
    Hard Drives
    Crucial P310 2TB 2280 PCIe Gen4 3D NAND NVMe M.2 SSD (O/S)
    Silicon Power 2TB US75 NVMe PCIe Gen4 M.2 2280 SSD (backup)
    Crucial BX500 2TB 3D NAND (2nd backup)
    Seagate 4TB Ironwolf, rotating HDD archive files
    External off-line backup Drives: 2 NVMe 4TB drives in external enclosures
    PSU
    Thermaltake Toughpower GF3 750W
    Case
    LIAN LI LANCOOL 216 E-ATX PC Case
    Cooling
    Lots of fans!
    Keyboard
    Microsoft Comfort Curve 2000
    Mouse
    Logitech G305
    Internet Speed
    Verizon FiOS 1GB
    Browser
    Firefox
    Antivirus
    Malware Bytes & Windows Defender Security
  • At a glance

    Win 11 Pro 25H2, Build 26200.9168Intel Core i5 1440032GB DDR5Intel 700 Embedded GPU
    Operating System
    Win 11 Pro 25H2, Build 26200.9168
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Brew
    CPU
    Intel Core i5 14400
    Motherboard
    Gigabyte B760M DS3H AX
    Memory
    32GB DDR5
    Graphics card(s)
    Intel 700 Embedded GPU
    Sound Card
    Realtek Embedded
    Monitor(s) Displays
    27" HP 1080p
    Screen Resolution
    1920x1080
    Hard Drives
    Crucial P310 2TB 2280 PCIe Gen4 eD NAND PCIe SSD
    Samsung EVO 990 2TB NVMe Gen4 SSD
    Samsung 2TB SATA SSD
    PSU
    Thermaltake Smart BM3 650W
    Case
    Okinos Micro ATX Case
    Cooling
    Fans
    Keyboard
    Microsoft Comfort Curve 2000
    Mouse
    Logitech G305
    Internet Speed
    Verizon FiOS 1GB
    Browser
    Firefox
    Antivirus
    Malware Bytes & Windows Defender Security
  • Nimo N171 17" Laptop, (Intel i3-1215U, 16GB RAM, 2TB NVMe, Win11 Pro)
    Acemagic Vista Mini PC V1 (Intel N150, 16GB RAM, 1TB NVMe, Win11 Pro)
    HP ENVY h8-1540t, (24GB RAM, 2TB SSD, 2TB HDD, Win11 Pro)
This is exactly what I have in my shortcut that I use for putting the system to sleep.

C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState Sleep

This triggers S3 sleep. Note that I have disabled hibernate on my machines, I find it pretty useless and slow. That may trigger hibernate if it's enabled.

Here's what Google AI says...

Yes, rundll32.exe powrprof.dll,SetSuspendState 0,1,0 often triggers hibernation instead of sleep if hibernation is enabled. The first parameter (0 or Sleep) controls whether it hibernates (true/1 for hibernate, false/0 for sleep), but rundll32 misinterprets the passed arguments, causing Windows to default to hibernation if it is turned on.

I don't routinely leave tons of stuff open day after day, so sleep is fine with me. I also have a 1500VA UPS that gives me 60 minutes of runtime for a power outage. I have Windows set to shutdown after ten minutes of power loss, well before the battery runs out.
Ah okay, so it must be because i have hibernate enabled. I will disable that then.

Thanks
 

My Computer My Computer

At a glance

windwos 11 pro
OS
windwos 11 pro
I have a pair of simple NirCmd shortcuts for invoking S3 Sleep & S0 Modern standby without any delay.
I use NirCmd for a number of other things already so I just use these NirCmd shortcuts:-

S3 Sleep shortcut on S3 Sleep computers only
[It works whether or not Hibernate is enabled. I always have it enabled on my computers.]
C:\Tools\NirCmd\x64\NirCmd.exe standby

S0 Modern standby shortcut on S0 Modern standby computers only
[On all computers, it blanks the display and that, for S0 Modern standby computers, is what invokes S0 Modern standby.]
C:\Tools\NirCmd\x64\NirCmd.exe monitor off

You can see where I keep my NirCmd. In both Windows 10 & 11, I keep all portable applications & all my own scripts within C:\Tools, a folder that I created for that purpose and to which I have applied special permissions [Admin approval needed for any changes yet not for executing].
Set up my Tools folder - TenForums
Read from my para starting, "I noticed the folder path in your diagram ...".


Denis
 

My Computer My Computer

At a glance

Windows 11 Home x64 Version 25H2 Build 26200....
OS
Windows 11 Home x64 Version 25H2 Build 26200.9168
I like S3 sleep, it only takes a couple seconds to wake up, and it truly turns everything but memory off.
 

My Computers My Computers

  • At a glance

    Win 11 Pro 25H2, Build 26200.9168Intel Core i5 14500, 14th Generation64GB DDR4GeForce RTX 4060
    OS
    Win 11 Pro 25H2, Build 26200.9168
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Brew
    CPU
    Intel Core i5 14500, 14th Generation
    Motherboard
    Gigabyte B760M G P WIFI
    Memory
    64GB DDR4
    Graphics Card(s)
    GeForce RTX 4060
    Sound Card
    Chipset Realtek
    Monitor(s) Displays
    LG 45" Ultragear & Acer 24" 1080p
    Screen Resolution
    5120x1440 & 1920x1080
    Hard Drives
    Crucial P310 2TB 2280 PCIe Gen4 3D NAND NVMe M.2 SSD (O/S)
    Silicon Power 2TB US75 NVMe PCIe Gen4 M.2 2280 SSD (backup)
    Crucial BX500 2TB 3D NAND (2nd backup)
    Seagate 4TB Ironwolf, rotating HDD archive files
    External off-line backup Drives: 2 NVMe 4TB drives in external enclosures
    PSU
    Thermaltake Toughpower GF3 750W
    Case
    LIAN LI LANCOOL 216 E-ATX PC Case
    Cooling
    Lots of fans!
    Keyboard
    Microsoft Comfort Curve 2000
    Mouse
    Logitech G305
    Internet Speed
    Verizon FiOS 1GB
    Browser
    Firefox
    Antivirus
    Malware Bytes & Windows Defender Security
  • At a glance

    Win 11 Pro 25H2, Build 26200.9168Intel Core i5 1440032GB DDR5Intel 700 Embedded GPU
    Operating System
    Win 11 Pro 25H2, Build 26200.9168
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Brew
    CPU
    Intel Core i5 14400
    Motherboard
    Gigabyte B760M DS3H AX
    Memory
    32GB DDR5
    Graphics card(s)
    Intel 700 Embedded GPU
    Sound Card
    Realtek Embedded
    Monitor(s) Displays
    27" HP 1080p
    Screen Resolution
    1920x1080
    Hard Drives
    Crucial P310 2TB 2280 PCIe Gen4 eD NAND PCIe SSD
    Samsung EVO 990 2TB NVMe Gen4 SSD
    Samsung 2TB SATA SSD
    PSU
    Thermaltake Smart BM3 650W
    Case
    Okinos Micro ATX Case
    Cooling
    Fans
    Keyboard
    Microsoft Comfort Curve 2000
    Mouse
    Logitech G305
    Internet Speed
    Verizon FiOS 1GB
    Browser
    Firefox
    Antivirus
    Malware Bytes & Windows Defender Security
  • Nimo N171 17" Laptop, (Intel i3-1215U, 16GB RAM, 2TB NVMe, Win11 Pro)
    Acemagic Vista Mini PC V1 (Intel N150, 16GB RAM, 1TB NVMe, Win11 Pro)
    HP ENVY h8-1540t, (24GB RAM, 2TB SSD, 2TB HDD, Win11 Pro)
I like S3 sleep, it only takes a couple seconds to wake up, and it truly turns everything but memory off.
Yes, I like S3 sleep aswell. And that, for my S3 Sleep computers, is what the first of my shortcuts achieves.
[I do not copy that shortcut to my S0 Modern standby computers.]

I also keep Hibernation enabled for those occasions when I want to use it.
My shortcut to invoke that is a simple:-
shutdown.exe /h


All the best,
Denis
 

My Computer My Computer

At a glance

Windows 11 Home x64 Version 25H2 Build 26200....
OS
Windows 11 Home x64 Version 25H2 Build 26200.9168
Some keyboards have a dedicated Sleep Button. If you have that you don't need a shortcut.
On my keyboard if I hit Fn + F12 my computer goes to sleep.

Sleep Button.webp
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2 (26200.6901)AMD Ryzen 7 6800H with Radeon 680M GPU (486MB...Crucial DDR5-4800 (2400MHz) 32GB (2 x 16GB)NVIDIA RTX 3060 Laptop (6GB RAM)
    OS
    Windows 11 Pro 25H2 (26200.6901)
    Computer type
    Laptop
    Manufacturer/Model
    ASUS TUF Gaming A15 (2022)
    CPU
    AMD Ryzen 7 6800H with Radeon 680M GPU (486MB RAM)
    Memory
    Crucial DDR5-4800 (2400MHz) 32GB (2 x 16GB)
    Graphics Card(s)
    NVIDIA RTX 3060 Laptop (6GB RAM)
    Sound Card
    n/a
    Monitor(s) Displays
    15.6-inch
    Screen Resolution
    1920x1080 300Hz
    Hard Drives
    2 x Samsung 990 Evo Plus (2TB M.2 NVME SSD)
    PSU
    n/a
    Mouse
    Wireless Mouse M510
    Internet Speed
    2100Mbps/300Mbps
    Browser
    Firefox
    Antivirus
    Malwarebytes
  • At a glance

    Windows 11 Pro 25H2 (26200.8246)AMD Ryzen 7 5700X3DG.SKILL Flare X 32GB (2x16GB) DDR4ASUS ROG-STRIX-RTX3060TI-08G-V2-GAMING (RTX 3...
    Operating System
    Windows 11 Pro 25H2 (26200.8246)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom build
    CPU
    AMD Ryzen 7 5700X3D
    Motherboard
    ASUS ROG Strix B550-F Gaming WiFi II
    Memory
    G.SKILL Flare X 32GB (2x16GB) DDR4
    Graphics card(s)
    ASUS ROG-STRIX-RTX3060TI-08G-V2-GAMING (RTX 3060-Ti, 8GB RAM)
    Monitor(s) Displays
    Samsung G50D IPS 27"
    Screen Resolution
    1440p/180Hz
    Hard Drives
    SAMSUNG 990 EVO Plus (2TB] M.2 NVME SSD
    SAMSUNG 990 EVO Plus (4TB) M.2 NVME SSD
    PSU
    Corsair RM750x (750 watts)
    Case
    Cooler Master MasterCase 5
    Cooling
    Scythe Mugen 6
    Keyboard
    Logitech K520 (MK540 keyboard/mouse combo)
    Mouse
    Logitech M310 (MK540 keyboard/mouse combo)
    Internet Speed
    2100 Mbps down / 300 Mbps up
    Browser
    Firefox, Edge, Chrome
    Antivirus
    Malwarebytes (Premium)
    Other Info
    ASUS Blu-ray Burner BW-16D1HT (SATA) || Western Digital Easystore 20TB USB 3.0 external hard drive used with Acronis True Image 2025 backup software || HP OfficeJet Pro 6975 Printer/Scanner

Latest Support Threads

Back
Top Bottom