W10 shutdown analysis

Discussion in 'Windows 10' started by kiwig, Mar 17, 2022.

Tags:
  1. kiwig

    kiwig MDL Member

    Apr 2, 2014
    127
    25
    10
    Hello All
    I have my win10 ltsc which is hanging(slow) on something at shut-down. Its painful when needing to do a restart while working.
    Is anyone here who could help me analysing the WPR/WPA recordings?
    Would be nice
    Thanks
     
  2. kaljukass

    kaljukass MDL Guru

    Nov 26, 2012
    3,451
    1,345
    120
    I can't suggest any particularly good analysis methods, but I recommend that you check that your Windows is working correctly (run cmd.exe as admin and then from commandline sfc.exe /scannow, if there are some problems, fix them) and if the process is still slow, you can make the following changes (I use it on older computers)
    NB! more faster closing is not recommended!
    Here are the recommended settings in registry:
    Code:
    open this key:
    Computer\HKEY_CURRENT_USER\Control Panel\Desktop
    WaitToKillAppTimeout : set to 10000 (default 20000)
    HungAppTimeout : set to 3000 (default 5000)
    WaitToKillServiceTimeout : set to 5000 (default - don't remember, but it's much more)
    AutoEndTasks : set to 1 (default is 0)
    
    And if done, you must restart pc. Changes takes effect after restart.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. kiwig

    kiwig MDL Member

    Apr 2, 2014
    127
    25
    10
    Thanks @kaljukass
    I have run sfc /scannow and chkdsk before and there isn't anything significant. The desktop is 3years old. I bought another SSD and have installed another OS(for the near future). Still I'm wondering what is so sticky on shut-down on this system. I have run the Windows Performance Toolkit and it is a full-on diagnosis which is over my head hence I thought someone here might be an expert on the WPR/WPA
     
  4. sonic9

    sonic9 MDL Member

    Aug 4, 2009
    178
    66
    10
    check if you have set ClearPageFileAtShutdown to 1 in registry, it slowdown shutdown
     
  5. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,779
    7,735
    210
    Another potential slowdown at shutdown: avast! Antivirus.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. kaljukass

    kaljukass MDL Guru

    Nov 26, 2012
    3,451
    1,345
    120
    If You have 64-bit system, try
    Code:
    %SystemRoot%\SysWOW64\shutdown.exe /f /s /t 00
    %SystemRoot%\SysWOW64\shutdown.exe /f /r /t 00
    or (if you have 32-bit system or 64-bit, no matter)
    Code:
    %windir%\system32\shutdown.exe /f /s /t 00
    %windir%\system32\shutdown.exe /f /r /t 00
    Meanings:
    s = shutdown, r = restart, t = time before shutdown or restart
    If shutdown and restart are faster using these commands or shortcuts, the reason is probably that there is some damage to the system that prevents programs from shutting down completely during normal shutdown, and they remain in so-called suspended mode.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. kiwig

    kiwig MDL Member

    Apr 2, 2014
    127
    25
    10
    Thanks @Carlos Detweiller
    Lucky me I haven't been there for a long time!
     
  8. kiwig

    kiwig MDL Member

    Apr 2, 2014
    127
    25
    10
    Thanks @sonic9
    Do I want to do that on a work machine and I'm the only person using it? What would be my benefit?
     
  9. kiwig

    kiwig MDL Member

    Apr 2, 2014
    127
    25
    10
    I have set-up two shortcuts on my desktop and will try as you suggested.
     
  10. sonic9

    sonic9 MDL Member

    Aug 4, 2009
    178
    66
    10
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management ClearPageFileAtShutdown is set to 0 by default. Check if was changed, some paranoid set to 1.
     
  11. kaljukass

    kaljukass MDL Guru

    Nov 26, 2012
    3,451
    1,345
    120
    100% agree, but shutdown speed is not affected.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. kiwig

    kiwig MDL Member

    Apr 2, 2014
    127
    25
    10
    Thanks
    I tried the above and it does not seem to make any change. For the time being I might just have to put up with it.
    Thank you all for the suggestions.
     
  13. adric

    adric MDL Expert

    Jul 30, 2009
    1,397
    1,518
    60
    Are you by chance using a local group policy to run a script during shutdown/restart?
    I've had a similar problem using a script via Local Group Policy > Windows Settings > Scripts (Startup/Shutdown).
    In my case, the script had an error and the system would hang. I wasn't sure from your OP if your system eventually
    completes the shutdown.
     
  14. kiwig

    kiwig MDL Member

    Apr 2, 2014
    127
    25
    10
    #14 kiwig, Mar 21, 2022
    Last edited: Mar 21, 2022
    (OP)
    Thanks @adric No, not that I can remember.
    The initial shut-down seems to proceed normally, it just continues silently and then towards the real shut off it seems to rev up. I'll measure time and will update this reply.
    Shut-down:
    5-8 sec till screen is black
    38 sec till turned off
    Start-up:
    26 sec till login screen.
     
  15. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,779
    7,735
    210
    Do you have Fast Boot enabled? At least for shutdown, the part after the screen going black is the partial hibernation phase. Can be even longer with slow disks.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. kiwig

    kiwig MDL Member

    Apr 2, 2014
    127
    25
    10
    Thanks @Carlos Detweiller
    Yes I had it enabled. I have disabled now, turned PC off and boot again and did a reboot. No noticeable difference, unfortunately.
     
  17. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,779
    7,735
    210
    :poop::dunno:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...