Situation:
- I boot up my laptop, log in to Windows, and everything loads up quickly as it should.
- After the system has been up for "a while", a second user logs in with fast user switching.
- For the second user, the system "hangs" at a mostly blank desktop for five minutes before things start working. While the desktop is "hung", the taskbar is loaded with the start button and search bar but no program icons, the desktop is unresponsive, and the Start button/menu is unresponsive.
The hang is not user-specific. I have five users on the laptop and any one of them can experience the login delay. Even my own account which normally works fine will have the issue if I am not the first one to log in and try to log in after the system has been up for "a while".
I'm not sure how long "a while" is. If I try to reproduce this issue by rebooting and then logging in with two users back-to-back, both logins work fine. (That makes troubleshooting this by like disabling startup items & services and rebooting to check difficult.)
I was initially experiencing this with Windows 10, version 1909, and it has persisted after an upgrade to 20H2. I actually have this issue on two different laptops, one Dell Precision M6700 and one Dell Precision 7510. There isn't a whole lot of software overlap between the two, the 7510 doesn't have much on it besides Office / Acrobat / and a couple of Steam games. They do have a similar hardware and driver setup.
While the second user is hung, if I switch back to the first user (where things are working fine) and do "Analyze wait chain" on the second (hung) user's explorer.exe instance, it shows that it is waiting for sihost.exe.
...Anyway, I've been "dealing with it" for a while but yesterday I took to xperf to try to figure out what is causing the delay.
I ran three different traces and they all came out strikingly similar. Sure enough, the "UI delay" view shows a "COM Modal Loop" delay in explorer.exe for the duration of the hang.
Performance Analyzer showing COM Modal Loop delay (green) for the duration of the hang at login
I thought it odd that the hang/delay seems to be exactly 5 minutes long. Well, turns out that it is not quite exactly 5 minutes long. The traces are showing that it consistently hangs for 308 seconds (5 minutes + 8 seconds).
Anyway, I went to the "thread lifetimes" view and I can see that this lines up perfectly with a thread in explorer.exe that has a thread start module of "Windows.Devices.Lights.dll". A number of other threads don't start running to do their business until this one terminates.
COM Modal Loop delay (green at top) and Windows.Devices.Lights.dll thread in explorer.exe (red at bottom) occur at the same time and for the same duration
...Anyway, here I have sort of reached the end of my rope. I'm not super familiar with xperf. Is there any way to dig in further to see what Explorer is trying to do here? What is "Windows.Devices.Lights.dll" even for? It has a description that just says "Windows Runtime Lights DLL". I imagine that there is something that I can just turn off that will cause this behavior to stop. I am tempted to just remove/rename this DLL file and see if that makes the problem go away.
Any insights appreciated...
[Edit] Stumbled across this thread after posting, apparently it is related to the USB Microsoft Pro IntelliMouse, which I do have connected to both systems. (No solution offered...)
