Valkirie / HandheldCompanion

ControllerService
Other
1.11k stars 86 forks source link

ROG Ally sleep loses access to physical controller #642

Closed electronicrice closed 1 year ago

electronicrice commented 1 year ago

Anytime the ROG Ally goes to sleep, when it wakes back up HC can no longer see the physical controller and input won't work. HC has to be completely closed out and reopened, and the service restarted for the controller to show back up.

CasperH2O commented 1 year ago

Can confirm, it's being investigated. Thank you for reporting.

trippyone commented 1 year ago

Seems to be caused by _hidDevice.TryOpen in ROGAlly.cs. When device wakes up, the code will loop on each HID devices and TryOpen them. The TryOpen function will inexplicably take a long time to return and will do this for each HID devices. This process will take a few minutes and eventually HC will work again. My testing indicates that so far if I wait out the long freeze my controller will work. To be confirmed.

https://github.com/Valkirie/HandheldCompanion/blob/dc041984b68242f7b0cda54305fb106d5b4c4f7c/ControllerCommon/Devices/ASUS/ROGAlly.cs#L89C5-L89C5

CasperH2O commented 1 year ago

Fixed. Tested on ROG Ally. Could use another tester though @trippyone , can you try also just to be 100% sure? It's the FixControllerResume branch.

Valkirie commented 1 year ago

Fixed. Tested on ROG Ally. Could use another tester though @trippyone , can you try also just to be 100% sure? It's the FixControllerResume branch.

Merged the branch into main because it no longer has any regressions anyway.

trippyone commented 1 year ago

Confirmed that the issue is resolved.

trippyone commented 1 year ago

Another and hopefully final attempt to fix the OEM keys not working on wake up issue. We need testers. @CasperH2O

electronicrice commented 1 year ago

Another and hopefully final attempt to fix the OEM keys not working on wake up issue. We need testers. @CasperH2O

I'm open to test. Just let me know

-eRice

CasperH2O commented 1 year ago

@electronicrice are you on Discord, we are testing there?

electronicrice commented 1 year ago

@electronicrice are you on Discord, we are testing there?

Yep, I'm eRice (.electronicrice) on discord

CasperH2O commented 1 year ago

@electronicrice I think we can close this one?

electronicrice commented 1 year ago

I think so!