DEV Community

Naimul Karim
Naimul Karim

Posted on

How I Fixed Windows 11 Sleep Not Working by Tracking Down a Hidden WebView2 Video Wake Lock

Have you ever configured your Windows laptop to sleep after a few minutes of inactivity, only to find the screen never turns off?

I recently ran into this issue on my Dell Inspiron 16 running Windows 11 Pro, and after hours of troubleshooting, I discovered the culprit wasn't Windows itselfβ€”it was an application using Microsoft Edge WebView2.

Here's how I diagnosed and fixed it.


πŸ–₯️ The Problem

My power settings were configured correctly:

  • Display turns off after 3 minutes
  • Sleep after 3 minutes
  • Hibernate enabled

Despite that, the laptop would remain awake indefinitely. The display never turned off, and the system never entered sleep.


πŸ” Step 1: Check for Power Requests

Windows includes a built-in command that tells you what's preventing your computer from sleeping.

Open Command Prompt as Administrator and run:

powercfg /requests
Enter fullscreen mode Exit fullscreen mode

The output looked something like this:

DISPLAY:
[PROCESS] msedgewebview2.exe
Video Wake Lock
Enter fullscreen mode Exit fullscreen mode

The important part was Video Wake Lock.

A Video Wake Lock tells Windows that media playback is active, so Windows intentionally keeps the display awake.


πŸ”Ž Step 2: Find Which Application Owns WebView2

Many Windows applications use Microsoft Edge WebView2, so simply seeing msedgewebview2.exe doesn't tell you which application is responsible.

I used PowerShell to identify the parent process for each WebView2 instance:

Get-CimInstance Win32_Process |
Where-Object {$_.Name -eq "msedgewebview2.exe"} |
Select-Object ProcessId, ParentProcessId,
@{
    Name="Host"
    Expression={
        (Get-CimInstance Win32_Process -Filter "ProcessId=$($_.ParentProcessId)").Name
    }
} | Sort-Object Host
Enter fullscreen mode Exit fullscreen mode

The output revealed several applications using WebView2:

  • Widgets.exe
  • Microsoft Teams
  • SearchHost.exe
  • Visual Studio (devenv.exe)
  • PCAppStore.exe

At this point I still didn't know which one was preventing sleep.


πŸ§ͺ Step 3: Eliminate Processes One by One

I terminated each host process individually and checked the power requests again.

Stop-Process -Id <PID> -Force
Enter fullscreen mode Exit fullscreen mode

After each process was stopped, I reran:

powercfg /requests
Enter fullscreen mode Exit fullscreen mode

When I terminated PCAppStore.exe, the output immediately changed to:

DISPLAY:
None.
Enter fullscreen mode Exit fullscreen mode

πŸŽ‰ That was the smoking gun.

PCAppStore.exe was holding a Video Wake Lock through WebView2, preventing Windows from turning off the display or entering sleep.


πŸ’» Step 4: Verify Sleep Support

To ensure there wasn't a hardware limitation, I checked the supported sleep states:

powercfg /a
Enter fullscreen mode Exit fullscreen mode

The output showed:

Standby (S0 Low Power Idle)
Hibernate
Enter fullscreen mode Exit fullscreen mode

This means the laptop uses Modern Standby (S0) rather than the traditional S3 Sleep.

Modern Standby is more sensitive to applications requesting wake locks, making powercfg /requests an essential troubleshooting tool.


βœ… Step 5: Fix the Root Cause

Once I identified the offending application, the fix was straightforward:

  • Disable the application from Startup
  • Close it when not needed
  • Uninstall it if you never use it

After preventing PCAppStore from running, my laptop finally behaved as expected:

  • βœ… Display turns off after 3 minutes
  • βœ… Laptop enters sleep automatically
  • βœ… Wake-up works normally

πŸ” Bonus: Require a PIN After Sleep

After fixing sleep, I noticed another issue:

The laptop woke directly to the desktop instead of asking for my PIN.

To fix that:

Settings β†’ Accounts β†’ Sign-in options

Configure:

If you've been away, when should Windows require you to sign in again?

Choose the shortest available delay (or Immediately, depending on your Windows version).


πŸ›  Useful Commands

Check what's preventing sleep

powercfg /requests
Enter fullscreen mode Exit fullscreen mode

View supported sleep states

powercfg /a
Enter fullscreen mode Exit fullscreen mode

Generate an energy report

powercfg /energy
Enter fullscreen mode Exit fullscreen mode

Generate a Sleep Study report

powercfg /sleepstudy
Enter fullscreen mode Exit fullscreen mode

Show devices allowed to wake the PC

powercfg /devicequery wake_armed
Enter fullscreen mode Exit fullscreen mode

πŸ’‘ Lessons Learned

A few things I learned from this experience:

  • Start with powercfg /requests whenever Windows won't sleep.
  • msedgewebview2.exe is often just the messengerβ€”you need to identify the parent application.
  • Modern Standby systems are more susceptible to applications holding wake locks.
  • Third-party utilities can unintentionally interfere with Windows power management.

Final Thoughts

Initially, I suspected Windows, Dell firmware, or Modern Standby itself.

In reality, a background application was keeping the display awake by holding a WebView2 Video Wake Lock.

If your Windows laptop refuses to sleep despite correct power settings, don't overlook background applications.

A single process may be the only thing standing between you and a properly sleeping system.

Hopefully this saves someone else a few hours of troubleshooting.


Have you encountered a similar issue?

I'd love to hear what prevented sleep on your machine.

Share your experience in the comments!

Windows #Windows11 #PowerManagement #Troubleshooting #WebView2 #PowerShell #Dell #ModernStandby #DeveloperTips

Top comments (0)