The long delay after the screen goes blank indicates Windows is very slow completing shutdown, not a sleep/hibernate issue. Common causes in the provided context are:
- A service or process that does not end
- A blocked kernel thread
- The policy to clear the paging file at shutdown
To narrow this down:
- Check for services that don't end
- Start the PC in Safe Mode with third‑party services disabled.
- Shut down from Safe Mode.
- If shutdown is fast in Safe Mode, use the System Configuration utility and selective startup to isolate which third‑party service is blocking shutdown.
- Check if the paging file is being cleared at shutdown
- Open Registry Editor and navigate to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management - Locate
ClearPageFileAtShutdown. - If the value is
1, the paging file is being cleared at shutdown, which can significantly delay shutdown. Setting this to0disables that policy and removes that delay.
- Open Registry Editor and navigate to:
- If shutdown appears to stop responding for a very long time
- Collect a crash dump and analyze it with debuggers to check for blocked kernel threads or drivers.
- Look specifically for blocked threads (
!mex.tl -t) and for services that are not ending.
If the delay is extreme (tens of minutes) and not caused by the paging file policy, use Windows Performance Recorder (WPR) and Windows Performance Analyzer (WPA) to record a shutdown trace and identify which component is taking so long.
References: