Share via

Windows 11 takes a long time to shutdown/Logoff the system with a USB controller plugged

Anonymous
2024-03-18T14:52:35+00:00

Windows version: Windows 11 Home & Pro 10.0.22631

PCs specs:

Desktop:

CPU: Ryzen 5 7600

Motherboard: MSI B650M-p pro

GPU: RTX 4060 MSI Ventus 2X

RAM: Kingston Fury Beast DDR5 16GB

SSD: Nvme Crucial P3

Laptop: HP Laptop 15s-eq2xxx

I have encountered some issues since the cumulative update on February 13th. If a controller is connected at any time (whether disconnected or not before shutdown makes no difference), Windows take a long time shutting down the system, about 8 minutes. This issue occurs on two different devices (desktop and laptop) with almost entirely different installed applications. The main point is that this problem occurs on both devices, in the exact same manner, even with different controllers. Rolling back the update resolves the issue. The problem is not perfectly reproducible for every Windows shutdown; I would say it occurs with a probability of 40%. Event Viewer shows stuff related to Event ID 6005, 6006 and 4267, realizing it is taking a long time to logoff, but it doesn't describe any process that might be causing this.

I have also tried using sfc /scannow, dism and even a Windows re-installation in-place, but I wasn't able to solve for neither of the devices.

Logging off from the local account BEFORE shutting down also causes the system to hang for the same amount of time.

EventData

ShutdownTsVersion 1

ShutdownStartTime 2024-03-04T15:23:27.3623737Z

ShutdownEndTime 2024-03-04T15:31:21.4183745Z

ShutdownTime 474056

ShutdownUserSessionTime 470178

ShutdownUserPolicyTime 3

ShutdownUserProfilesTime 34

ShutdownSystemSessionsTime 2094

ShutdownPreShutdownNotificationsTime 1121

ShutdownServicesTime 950

ShutdownKernelTime 1782

ShutdownRootCauseStepImprovementBits 0

ShutdownRootCauseGradualImprovementBits 0

ShutdownRootCauseStepDegradationBits 0

ShutdownRootCauseGradualDegradationBits 0

ShutdownIsDegradation false

ShutdownTimeChange 0

Uninstalling the cumulative update KB5034765 solved the issue, It doesn't happen anymore. However, I wouldn't call this a proper solution.

After enabling verbose status messages, the system seems to hang on to "Wait for System Event Notification Service".

On the Event Viewer I found the following:

Event with id 4627: "The COM+ Event System timed out when trying to fire the Logoff method in event class {D5978630-5B9F-11D1-8DD2-00AA004ABD5E} for the publisher and subscriber . Subscriber has not responded within 180 seconds. The display name of the subscription is "Explorer". HRESULT was 80010002"

Event with id 6005: "The management of the Logoff notification event by the WinLogon notification subscriber <Sens> takes a long time."

Event with id 6006: "The handling of the Logoff notification event by the WinLogon notification subscriber <Sens> took 468 seconds."

Disabling System Event Notification Service from Services also "fixes" It, but I don't really know if I really should keep an important Windows service disabled likes this...

The cumulative update of March 12 hasn't solved the issue.

I am almost sure the culprit Is explorer.exe, I have tried to kill the process with a controller plugged and Windows is just unable to kill the whole process, explorer's threads hot immediately reduced to 2. And After around 460 seconds It finally gets killed.

Edit:

The issue persist also after performing a clean installation of Windows 11 Home.

Edit 2:
Two months have passed since I have encountered the issue for the first time, I have also tried to enable a Group Policy Edit script to terminate group policies processes within a fixed amount of time, but neither this helped. It is still there on both computers, happening in the same exact way, I have no idea on how to solve this. Neither Process Explorer seems to point something particular I think? (Perhaps there is something, the list of loaded DLLs is full, it is probably just stuff previous logging off from session):It's still odd the fact that if I log off with after plugging/unplugging a USB controller, the the explorer.exe of previous session hangs there for 8 minutes before terminating.

Edit: For sake of completion, I'm adding the result screen while shutting down Windows:

It's just italian for "Wait System Event Notification Service".

Windows for home | Windows 11 | Devices and drivers

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

8 answers

Sort by: Most helpful
  1. VARADHARAJAN K 9,676 Reputation points Volunteer Moderator
    2024-03-18T16:58:53+00:00

    To check, which applications or services are prevented to shutdown fast?

    Type the below line in the Cmd application, and execute them with administrator rights

    Reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v VerboseStatus /t REG_DWORD /d 1 /f

    Restart Windows, record video in your phone

    2 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2024-03-20T17:12:51+00:00

    I forgot to mention:

    The issue present itself ONLY with plugging/unplugging controllers, I have tried with USB Storage devices, USB keyboards, USB mouses and USB headphones. It just happens with controllers for some reason.

    0 comments No comments
  3. Anonymous
    2024-03-20T17:10:21+00:00

    I have already done this to understand better what is the problem, the service that is causing this issue is SENS (System Event Notification Service), one of the svchost.exe windows services. I'm pretty sure that the culprit is this service, or explorer.exe
    The reason is the following:

    If I disable SENS, the issue won't present itself, but if I do multiple logoffs and re-logon, I can see multiple explorer.exe process hanging there with 2 thread each (they are ghosts of the previous sessions) and they will hang there for exactly the amount of time of the issued log off procedure (around 460 seconds). Making explorer.exe the main culprit, SENS is probably just waiting for explorer.exe to shutdown before logging off the session. Of course if SENS is disabled it just won't wait for explorer, since it is disabled.

    I just want to remind that it happens on 2 different devices, which manufacturers are not the same company (for the laptop is HP, for the Desktop is MSI).

    0 comments No comments
  4. Anonymous
    2024-03-20T16:51:02+00:00

    On both devices I just get the critical updates and framework ones, (Described by theri KB serial number). It does this to two separate devices, one is a Desktop, the other one a Laptop, I have also updated HP drivers after encountering the issue, but it didn't solve it.

    The KB update culprit is: KB5034765

    0 comments No comments
  5. Anonymous
    2024-03-18T15:52:29+00:00

    Possibly this & what update?

    By default, win 11 update auto updates only critical win updates, and nothing else unless you have made the mistake of selecting the "Get latest updates" option, and if you have turn it off. (It includes drivers)

    You obtain both Bios & Drivers updates from the PC Maker, there should be a shortcut on your system to that makers update utility, and no other source.

    Then set Bios to Defaults & Pwr to balanced.

    At the end of the day shutdown, do NOT leave in sleep

    0 comments No comments