Skip to content
This repository was archived by the owner on Nov 2, 2023. It is now read-only.
This repository was archived by the owner on Nov 2, 2023. It is now read-only.

Driver deadlockΒ #22

Closed
Closed

Description

@michael-fadely

Describe the bug
With a virtual Xbox 360 controller enabled, programs that poll controller input will be unable to launch. They deadlock attempting to open a handle to the device. This happens with feeder applications as well.

It also prevents any real devices from connecting to or disconnecting from my system.

To Reproduce
I've been unable to consistently reproduce it. It happens fairly frequently, but with no specific steps that I could identify. If applications begin failing to launch with a feeder and Xbox 360 endpoint, however:

  1. Launch an application that polls for controller input (a game, Uplay, Steam, Battle.net).
  2. The application will stall or fail to launch.
  3. Attempt to disable the device with Device Manager/etc, and it will also stall.
  4. When the feeder is killed, the Xbox 360 endpoint device will enter an error state, displayed in Device Manager.

Expected behavior
Some kind of error handling or error logging. ViGEmClient has error logging, but it doesn't appear to encounter any errors when this deadlock occurs.

Screenshots
image

I attempted to disable the device, Device Manager stalled, and both the Game Controllers dialog and Battle.net immediately launched. Opening another instance of Device Manager reveals that the device is still enabled:

image

System details (please complete the following information):

  • OS: Windows 10 Pro 1903
  • Feeder software: ds4wizard
  • Driver Version: 1.14.3.0

Additional context
It very well could be something I'm doing with my feeder, but I've been unable to figure it out.

Activity

  1. nefarius commented on Aug 12, 2019

    @nefarius
    Owner

    Thanks for the report but could you please monitor the situation with the latest driver version as well? What you run is very outdated.

  2. michael-fadely commented on Aug 12, 2019

    @michael-fadely
    Author

    ...Wow, that IS really old! I missed the latest stable release somehow. Will do!

  3. michael-fadely commented on Aug 14, 2019

    @michael-fadely
    Author

    Same issue with latest stable. I will do some experimenting to see if I can narrow down the issue.

  4. MtDewFella commented on Aug 16, 2019

    @MtDewFella

    I have been getting the same problem, wasn't sure if it was steam, glosc or vigem, I assume it's vigem since trying to disable it causes driver manager to freeze up, only fix I have found is to reboot the pc, oddly it never happens during play only after (not all the time only some times)

  5. nefarius commented on Aug 19, 2019

    @nefarius
    Owner

    Dammit πŸ˜…

  6. MtDewFella commented on Aug 20, 2019

    @MtDewFella

    I completely uninstalled vigem and glosc, and reinstalled vigem first then glosc and so far I have had no issues, the last time I installed I just installed glosc like normal, which installed vigem (or was supposed to) but when I first used glosc that time I got the couldn't initialize vigem error, I then installed vigem without uninstalling anything, perhaps that caused the issue, I will keep and eye on it

    Edit: I can also disable and enable vigem in device manager without issue now

  7. nefarius commented on Jan 15, 2020

    @nefarius
    Owner

    Any news @michael-fadely ?

  8. self-assigned this
    on Jan 15, 2020
  9. michael-fadely commented on Jan 16, 2020

    @michael-fadely
    Author

    Still exhibiting the exact same behavior, unfortunately. Just having the virtual Xbox 360 device present when attempting to launch an application that uses XInput will sometimes cause this deadlock and require a hard reboot to allow any other physical devices to connect to, or disconnect from, the system.

  10. michael-fadely commented on Jan 29, 2020

    @michael-fadely
    Author

    Could this be due to my program's multi-threading? I am using ViGEmClient. I call vigem_alloc and vigem_connect (as well as free and disconnect) on the main thread, but vigem_target_add, vigem_target_x360_register_notification, etc. are called on a secondary thread.

  11. michael-fadely commented on Jan 30, 2020

    @michael-fadely
    Author

    In my program, everything appears to continue working. I simply unplug the DualShock 4 and it calls vigem_remove_target seemingly without error. I will implement some more robust error checking in this instance to be certain.

  12. Corrodias commented on Jan 31, 2020

    @Corrodias

    This seems very similar to a problem I'm experiencing. I'm using DS4Windows, on Windows 10 1909 and the latest version of the driver. After about 3 days of uptime, during which I leave a controller connected by USB at all times, Monster Hunter World will stall on its black startup screen and not proceed to the dev logo, but Special K's overlay is drawn, and Chrome can still start a new, GPU-accelerated video, so it's not a video driver failure. Attempting to "stop" and "start" DS4Windows may appear to work but results in a CPU-spinning thread. Attempting to reboot Windows causes it to hang on "Restarting" for several minutes, then BSOD.

    I have not yet narrowed this down to being caused by ViGEmBus. It does seem like a likely culprit, especially after reading this thread. The next time this happens, I'll try disabling the device to see if it hangs, like it does for MtDewFella, and I'll try uninstalling it after the reboot. I will also attempt to get an xperf trace on the shutdown process that includes stacks.

    If ViGEmBus does wind up being the culprit, is there anything else I can do to help diagnose this? It seems reliably reproducible for me; I just have to wait 3 days each time.

  13. Corrodias commented on Jan 31, 2020

    @Corrodias

    In fact, if it's going to do it again, today's the day. I have about 7 or 8 hours before I'm going to commence playing games, at which time I'll be doing the trace and so on if it did deadlock. If you have any advice or suggestions on helping diagnose this, providing them now would be timely.

  14. nefarius commented on Jan 31, 2020

    @nefarius
    Owner

    Make sure kernel memory dumps are enabled and keep the dump file somewhere. It shouldn't be shared publicly but is the best start to get the culprit.

  15. 73 remaining items

  16. nefarius commented on Feb 17, 2021

    @nefarius
    Owner

    Even once is too much though, thanks for the feedback nonetheless!

  17. Corrodias commented on Mar 8, 2021

    @Corrodias

    Pity, I left it running overnight ONE DAY and it happened again. πŸ˜†

    Is there any thing further I can do to help you diagnose this, other than shipping you my PC? I provided some (unfortunately massive) memory dumps, but evidently those weren't enough on their own.

  18. nefarius commented on Mar 8, 2021

    @nefarius
    Owner

    Pity, I left it running overnight ONE DAY and it happened again. πŸ˜†

    Is there any thing further I can do to help you diagnose this, other than shipping you my PC? I provided some (unfortunately massive) memory dumps, but evidently those weren't enough on their own.

    I'll just scratch everything and start anew πŸ‘»

  19. valentyn-l commented on Jun 26, 2021

    @valentyn-l

    I am STILL getting a driver deadlock issue with the 2021 Xbox 360 controller driver. Not an issue with the 2009 driver. This is a problem though because the 2009 driver prevents me from activating Core Isolation in the Device Security settings. Tested this on both Windows 10 and 11 leaked build.

  20. nefarius commented on Jun 27, 2021

    @nefarius
    Owner

    I've pretty much given up on this to be honest. There's simply no resources I or any potential contributor could come up with to tackle this mystery and I'm tired of it and will move on. Sorry.

  21. andrewklamut commented on Jul 2, 2021

    @andrewklamut

    Hi, I'm facing a 100% reproducible issue which might be relevant? The issue is that when I start to use my Xbox 360 controller over Parsec, the host system hangs and must be forced shut down.

    Steps:

    1. Using Windows Hyper V, create a Windows 10 VM

    2. Install Parsec on VM guest and VM host

    3. Plug Xbox 360 controller into VM host

    4. Start the Windows 10 VM guest using Hyper-V -> Start (don't do Hyper-V connect) and connect via Parsec

    5. Press any button on the Xbox 360 controller

    6. The VM guest hangs and must be force shut down. If I open Device Manager on the VM guest before step 4, I can see the Xbox Peripheral device is added as step 4 happens, and the Device Manger refreshes very slowly (I see the tree collapse, and then expand).

    It kind of seems like a deadlock and I came across this thread and noticed you were stuck, maybe same root cause?

  22. ankomen2 commented on Aug 26, 2021

    @ankomen2

    I tried the 2009 driver and my pc still freezes when I use my controller. Do you guys have any suggestions?

  23. wingfixer commented on Jan 1, 2022

    @wingfixer

    Found this topic by accident, realized it was the same issue I had with (as I thought) DS4Windows forever ago, ended up giving up on it and just setting a hotkey to disable the whole thing when not needed.
    Appears to be completely random, could run for hours or days before it happens, so people that don't leave their PC running for long may be susceptible but will never notice it.

  24. nefarius commented on Jan 1, 2022

    @nefarius
    Owner

    It will be solved by the rewrite I am working on in the dev dungeon βš’οΈ

  25. nefarius commented on Aug 8, 2022

    @nefarius
    Owner

    Time to close this. Can't fix something I can not replicate. Sorry.

  26. gjmv commented on Aug 8, 2022

    @gjmv

    I have the driver installed again in windows 11, in PC and laptop, and never again get deadlock.

  27. nefarius commented on Aug 8, 2022

    @nefarius
    Owner

    This issue isn't about a bluescreen.

  28. gjmv commented on Aug 8, 2022

    @gjmv

    This issue isn't about a bluescreen.

    Sorry, deadlock

    I have installed the new version since December, and it only happened to me 2 times the first days. During January and February I used it a lot, and I didn't have any deadlocks. Thanks for the update! Regards

  29. starjet commented on Mar 28, 2023

    @starjet

    I know this repo is no longer being updated in favour of whatever new one nefarius is working on, but I still want to comment on this
    I faced this problem myself and finally managed to isolate the issue to the controller
    This was pretty hard to troubleshoot as there's so little info on the web about this problem. As someone above said, only the few of us that keep our PCs running for a long time are bound to notice this most likely

    Anyway, two things:
    What drove me towards this being related to the Xbox controller driver is this post in Microsoft Answers: https://answers.microsoft.com/en-us/windows/forum/all/video-games-wont-launch-problems-with-restarting/6b139719-470d-4658-860c-68f3224e0a40

    When this problem starts, the game seems to stop the process during the launch process (loading dlls, etc.). So I tried using ProcessMonitor, thinking that if I could find the last dll that was trying to load, it might help solve the problem.
    ...
    Then I found that it stopped after loading the "xinput" dll file... Yes, I always have an Xbox360 (very old) controller plugged into my PC. I pulled it out and plugged it in. My games are now up and running!

    This suggests that the problem could be tied to the basic Xbox 360 controller driver itself, and not something that originates in Vigembus (Though Vigembus somehow likely exacerbates the problem, leading to the driver being stuck even after you pull out the controller)

    I will be following the recommendation to downgrade to the 2009 Xbox 360 controller driver. Will report back if I face this problem again. Though it's going to be hard to tell if it's fixed per se, as this problem only pops up very randomly (Sometimes it may happen twice in a week, but sometimes it may not happen for three to four months at a stretch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions