Windows Sleep Shortcut: Create It and Fix It
In this article
You can put a PC to sleep with one click or keystroke by creating a desktop shortcut that runs a single command, and you can fix a shortcut that does nothing by checking the command path, the power settings, and whether a device driver is blocking sleep. The shortest working method is to right-click the desktop, choose New > Shortcut, and enter rundll32.exe powrprof.dll,SetSuspendState 0,1,0 as the location. That is the whole answer; the rest of this guide covers making it reliable, giving it a keyboard shortcut, and repairing the cases where Windows ignores the command.
One note before you start: menu labels in Windows 11 and Windows 10 can differ slightly by version, edition and region, so if a label you see is worded a little differently, look for the closest match. The steps below assume a standard Windows 10 or Windows 11 desktop PC.
What You'll Need
- A Windows 10 or Windows 11 PC where you can create desktop shortcuts and open Settings (a standard user account is usually enough; changing some power options may require an administrator account).
- Permission to change power settings if the shortcut is for a work machine — some organisations lock these down by policy.
- Nothing else. No extra software, no downloads, and no third-party utilities are required.
Step-by-Step
- Create the shortcut. Right-click an empty area of the desktop and choose New > Shortcut. The Create Shortcut wizard opens.
- Enter the command. In the location field, paste
rundll32.exe powrprof.dll,SetSuspendState 0,1,0and click Next. Keep the spacing exactly as shown: one space afterrundll32.exe, then the DLL name, a comma, and the three numbers separated by commas with no spaces. A stray space after a comma is one of the most common reasons the shortcut silently fails. - Name it. Type something clear like Sleep PC and click Finish. The shortcut appears on the desktop with a generic icon.
- Test it once. Save your work, close anything important, and double-click the shortcut. The screen should go dark within a few seconds and the power light should start blinking or dimming, depending on your hardware. Press a key or move the mouse to wake it.
- Pin it where you will actually use it. Right-click the shortcut and choose Pin to Start or Pin to taskbar. If the taskbar option is missing, drag the shortcut onto the taskbar instead, or open the Start menu, find the shortcut in the app list, right-click it and pin from there.
- Add a keyboard shortcut (optional). Right-click the shortcut, choose Properties, click the Shortcut tab, click inside the Shortcut key box and press the key combination you want — Windows will prefix it with Ctrl+Alt automatically. Click Apply, then OK. Avoid combinations already used by other apps.
- Give it a proper icon (optional). In the same Properties window, click Change Icon, browse to
C:\Windows\System32\shell32.dllorimageres.dll, pick a moon or power symbol, and confirm. - Check that sleep is enabled at all. Open Settings > System > Power & battery (Windows 11) or Settings > System > Power & sleep (Windows 10) and confirm the sleep option is available and the screen and sleep timeouts are set to something sensible. If the Sleep option is greyed out or missing entirely, the shortcut cannot work until that is resolved — see Troubleshooting.
Common Mistakes
- Typing the command instead of pasting it. A single wrong character — a missing comma, a space after a comma, or
powrprofspelled with one f — produces a shortcut that opens and closes instantly with no visible error. - Pointing the shortcut at a batch file that does not exist. Some guides tell you to create a .bat file and point the shortcut at it. If the path is wrong or the file was moved, the shortcut fails. The single-line rundll32 command avoids this entirely.
- Expecting hibernate instead of sleep. The
SetSuspendStatecommand puts the machine into whichever low-power state is configured. If hibernation is enabled on the PC, the same command can hibernate instead of sleeping. If you specifically want one behaviour, use the Start menu power button or configure hibernation deliberately rather than relying on the shortcut. - Forgetting to save work. Sleep keeps the session in memory and normally resumes where you left off, but a power cut or a failing battery during sleep can lose unsaved data. Save first, every time.
- Assigning a shortcut key that clashes. If Ctrl+Alt+S already does something in an app you use, the shortcut may not fire, or may fire the other action. Pick something unused.
- Creating it in the wrong account. Shortcuts and shortcut keys are per-user. A shortcut on one account's desktop will not appear for another user on the same PC.
Tips
- Keep a second shortcut for Lock or Shut down next to the sleep one so you are not hunting through menus. The lock command is
rundll32.exe user32.dll,LockWorkStation. - If you use the shortcut daily, pin it to the taskbar and skip the keyboard shortcut — one click is faster than remembering a combination.
- Test the shortcut after any major Windows update. Updates occasionally reset power plans or re-enable Fast Startup, which can change how sleep behaves.
- If the PC wakes on its own shortly after sleeping, the cause is usually a device (a mouse, network adapter or scheduled task) rather than the shortcut. That is a power configuration issue, not a shortcut issue.
- Name the shortcut with a verb, like Sleep PC, so it is easy to find in Start menu search later.
Troubleshooting
Work through these in order — simplest and safest first.
- Re-check the command. Open the shortcut's Properties and compare the target character by character with the command above. This fixes the majority of cases.
- Test sleep from the Start menu. Click Start, click the power icon and choose Sleep. If that also fails, the shortcut is not the problem — the PC cannot sleep at all, and you should continue with the steps below.
- Restart the PC. A pending update or a stuck process can block sleep. A clean restart clears it.
- Run the built-in troubleshooter. Open Settings > System > Troubleshoot > Other troubleshooters (Windows 11) or Settings > Update & Security > Troubleshoot > Additional troubleshooters (Windows 10) and run the Power troubleshooter. It checks for common misconfigurations and applies fixes automatically.
- Check the power plan. Open Control Panel and go to Hardware and Sound > Power Options > Choose what the power buttons do. Make sure sleep is listed as available and that the relevant settings are not disabled. On some PCs, a setting called Fast Startup affects how sleep and shutdown behave; changing it requires administrator rights.
- Look for a blocking device or driver. Open Command Prompt as administrator and run
powercfg /requests. It lists anything currently preventing sleep — an audio stream, a video player, a backup tool or a driver. Close the listed app and try again. This command only reports; it changes nothing. - Update drivers, especially graphics and chipset. Use the PC manufacturer's official support site or Windows Update. Avoid third-party driver packs.
- Check for policy restrictions on a work PC. If sleep options are greyed out and you do not administer the machine, contact your IT department. Do not attempt to override organisation policy.
If none of that works, the final option is a full reset of Windows, which removes installed apps and can remove files depending on the option you choose. Back up everything first, and treat it as a last resort rather than a troubleshooting step.
Frequently Asked Questions
Does the rundll32 sleep command work on both Windows 10 and Windows 11?
Yes. The command uses a Windows system file that is present on both versions, so the same shortcut works on either.
Why does my shortcut flash and do nothing?
Almost always a typo in the command, or the PC cannot sleep at all. Test sleep from the Start menu power button to tell the two apart.
Can I make the shortcut shut down or restart instead?
Yes. Use shutdown /s /t 0 for shutdown and shutdown /r /t 0 for restart as the shortcut target. Save your work first, since these act immediately.
Does a sleep shortcut work on a laptop with the lid closed?
It depends on the lid-close action set in Power Options. If closing the lid is set to do nothing, the shortcut still works; if it is set to sleep already, the shortcut is redundant.
Will the keyboard shortcut work when an app is fullscreen?
Usually yes, but some games and fullscreen video players capture key combinations. If it does not fire, exit fullscreen or use the pinned taskbar button.
Is it safe to leave the PC sleeping overnight?
Yes for most desktops. On a laptop, sleep draws a small amount of battery power, so for long periods unplugged, shut down or hibernate instead to avoid a flat battery.