4

I have a Dell Zbook 17 G5 laptop with nvme ssd i use for work that i am pulling my hair out to fix this issue i am having. After a fresh boot, if i restart or shutdown (possibly even just log off but i haven't test it), it will stay in the shutdown screen for 7-10 minutes before proceeding to turn off. If i was logged in for 10 minutes already, it will turn off/reboot normally in a couple of seconds.

I've disabled all non-microsoft services, removed the anti-virus, disabled windows defender, checked if page file delete policy is disabled, etc and can't find the issue.

Last resort i found this question and answer here: How can I identify the culprit of my slow Windows shutdown? and recorded 2 performance logs. One is "good" (quick restart since i was logged in for more than 10 minutes) and the other one is "bad" (slow restart since i rebooted as soon as i logged in). I can't seem to find a sure cause, but i am not familiar with the analyzer enough to know what is fishy.

That's why i uploaded both logs in hopes someone can please check them out: https://www.dropbox.com/s/76sowxabh8mndnp/windows_performance_logs.rar?dl=0

Kind regards

TnF
  • 151

2 Answers2

4

Ok fixed it. So it turns out there is an issue somewhere with the GPClient if you use custom DNS servers, even though you might not be connected to them. My user account is a domain user. In my network settings i had set google dns to bypass the filtering used in the domain network. The problem with this seems the group policy client cannot access the policies set by the domain (even though in my case the policies are empty) and hangs the system until some timeout is gone. I changed back the domain dns to automatic for my network adapter, and then updated the domain group policy by running this command:

gpupdate /force

In order for it to be successful i had to renew the dns with some command i found in the error log in the event viewer, but i would guess a restart would do the job as well. Now i need to find what setting controls this timeout which is absolutely stupid set to like 10 minutes.

TnF
  • 151
1

I'm just copying the solution that worked for me from the comments on another answer. I had this problem with a domain joined HP ZBook Power 15 G8 laptop, with Windows 11 23h2 when I used it outside of the network where access to the domain is available. It took about 6 minutes to shutdown / reboot.

Open gpedit.msc(type in Win+R) and navigate to Computer Configuration => Administrative Templates => System=> Scripts. Edit the Specify maximum wait time for Group Policy scripts. Select Enabled and put time in seconds that you find reasonable into the Seconds box.

The following text is the desciption of this field gpedit gives:

This policy setting determines how long the system waits for scripts applied by Group Policy to run.

This setting limits the total time allowed for all logon, logoff, startup, and shutdown scripts applied by Group Policy to finish running. If the scripts have not finished running when the specified time expires, the system stops script processing and records an error event.

If you enable this setting, then, in the Seconds box, you can type a number from 1 to 32,000 for the number of seconds you want the system to wait for the set of scripts to finish. To direct the system to wait until the scripts have finished, no matter how long they take, type 0.

This interval is particularly important when other system tasks must wait while the scripts complete. By default, each startup script must complete before the next one runs. Also, you can use the ""Run logon scripts synchronously"" setting to direct the system to wait for the logon scripts to complete before loading the desktop.

An excessively long interval can delay the system and inconvenience users. However, if the interval is too short, prerequisite tasks might not be done, and the system can appear to be ready prematurely.

If you disable or do not configure this setting the system lets the combined set of scripts run for up to 600 seconds (10 minutes). This is the default.

I personally put number 15 in there and reboots speed became reasonable again.