Skip to content

[bug] ROG Ally: Functionality lost after sleep with mcu powersave enabled #241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
uejji opened this issue Dec 9, 2024 · 17 comments
Open

Comments

@uejji
Copy link
Contributor

uejji commented Dec 9, 2024

On ROG Ally (may also affect Ally X, but I cannot test this) when mcu powersave is enabled, InputPlumber fails to recapture the device that provides back paddle and front button long press functionality after waking from sleep.

This seems to be the device pointed to by /dev/input/by-path/pci-0000:09:00.3-usb-0:3:1.0-event-kbd

If InputPlumber is restarted, everything captures normally and works fine until the next time the device is put to sleep.

This issue does not occur if mcu powersave is disabled.

@flukejones
Copy link
Contributor

@uejji does this path /dev/input/by-path/pci-0000:09:00.3-usb-0:3:1.0-event-kbd disappear or change on resume?

@scardracs
Copy link

scardracs commented Dec 9, 2024

@uejji does this path /dev/input/by-path/pci-0000:09:00.3-usb-0:3:1.0-event-kbd disappear or change on resume?

The path exists and if you cat it and press M1 and M2 it changes

@uejji
Copy link
Contributor Author

uejji commented Dec 9, 2024

@uejji does this path /dev/input/by-path/pci-0000:09:00.3-usb-0:3:1.0-event-kbd disappear or change on resume?

The path remains and does not change.

@scardracs
Copy link

scardracs commented Dec 18, 2024

By the way it happens that if MCU powersave is enabled the vibrators stop working or strangely work on different ways (in my case it happened twice that the left vibrator was much stronger than right one)

EDIT: to be clear the problem with the "double vibrations" happened only on Diablo IV, not with other games so it could not be related. The lost of vibrations happened to others as weòò

@uejji
Copy link
Contributor Author

uejji commented Dec 18, 2024

My Ally 1 is also losing vibration completely after waking from sleep, regardless of powersave setting. Using the "Reset Device Inputs" in the controller input test page restores vibration in both cases.

@uejji
Copy link
Contributor Author

uejji commented Dec 18, 2024

Ally X tester reports no issues with powersave disabled, but loses vibration after waking from sleep with powersave enabled until "Reset Device Inputs" is used or InputPlumber is restarted. This tester had no issues losing M1/M2 in either case.

@flukejones
Copy link
Contributor

flukejones commented Dec 18, 2024

Do any of these issues occur without inputplumber? And which kernel patch series?

@uejji
Copy link
Contributor Author

uejji commented Dec 18, 2024

All of us are testing on the latest version of SteamFork. I will test without InputPlumber and update.

@uejji
Copy link
Contributor Author

uejji commented Dec 18, 2024

Without InputPlumber, vibration comes back every single time after waking from sleep, regardless of powersave setting. M1 and M2 also work correctly after waking from sleep (tested by assigning a key to remap and using evtest)

@uejji
Copy link
Contributor Author

uejji commented Dec 18, 2024

I do not believe this is an issue with your patches.

@flukejones
Copy link
Contributor

I suspect it may be something along the lines of a race condition where IP is trying to set things too early. On both devices it takes some seconds before the MCU are fully active again.

@flukejones
Copy link
Contributor

It might be that IP needs to do a query the status of things first, see if there is a response. So I will look at adding another sysfs attribute mcu_active.. Unsure.

@uejji
Copy link
Contributor Author

uejji commented Dec 18, 2024

std::thread::sleep(Duration::from_millis(300));

I tried increasing this delay to 1000ms, but it made no difference. Might be barking up the wrong tree, though.

@pastaq
Copy link
Contributor

pastaq commented Dec 20, 2024

It might be that IP needs to do a query the status of things first, see if there is a response. So I will look at adding another sysfs attribute mcu_active.. Unsure.

Perhaps a command queue buffer for writes to the endpoint could be filled until the device is fully ready, or delay adding the interface we look for until it is ready.

@flukejones
Copy link
Contributor

This is now solved in kernel. For the ally 1 the MCU triggers a reset-resume instead of a full disconnect so the config data is still live. On reset-resume pm callback I now send all settings to the MCU.

Tested in steamfork so far.

@flukejones
Copy link
Contributor

Should be able to close toes in a few days once more folks test

@uejji
Copy link
Contributor Author

uejji commented Mar 29, 2025

Should be able to close toes in a few days once more folks test

Should we consider this resolved now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants