moonlight-stream / moonlight-android

GameStream client for Android
GNU General Public License v3.0
3.23k stars 512 forks source link

[Issue]: Weird gamepad input latency #1266

Open Sidefix opened 7 months ago

Sidefix commented 7 months ago

Describe the bug

I am encountering an odd type of input latency that seems very specific and may be difficult to describe.

When playing any given game with a gamepad (bluetooth), I am encountering input lag specifically pertaining to the gamepad thumbsticks. It is quite inconsistent, but GENERALLY, I will be able to move individual thumbsticks with no issues.

However, if I move both thumbsticks in tandem, the actions performed on the thumbsticks somehow "queue" up and prevent other actions/buttons from interrupting this queue, causing a perceived input lag.

When this issue occurs, no other perceptible signs of lag or latency occur (no delays in audio signal for example, and Moonlight does not show any connectivity warnings). I am reproducing this issue on LAN.

I have reproduced this issue with multiple controllers, on multiple devices.

To summarize, the behavior does not seem to be related to the devices being utilized, but rather either the client (Moonlight) or the server (Sunshine). I have been reproducing this issue since version 0.20 of Sunshine (never attempted with anything older) and version 4.3.1 of Moonlight desktop / version 11(?) of Android. i.e. this is not a new issue.

I have not been able to reproduce the same behavior when using a mouse (bluetooth) + keyboard (also bluetooth, or built-in from the laptop). It only occurs when using a controller, both on desktop and mobile. The only thing I have not attempted is to use a wired controller, which I do not own.

Please find attached a recording of the issue.

I'd be happy to contribute any logs or further troubleshooting that may be needed to help fix this. Thank you in advance for your help.

https://github.com/moonlight-stream/moonlight-android/assets/26040103/f564c89f-13a5-4cf1-a842-77f9727e49e6

Steps to reproduce

Issue occurs with any tandem thumbstick movement on any game.

Using latest Moonlight (Android/Desktop) and latest Sunshine.

Games running on latest (8.22 at the time of writing) Proton-GE.

Affected games

Any games with controller support.

Could not reproduce issue with mouse+keyboard (also bluetooth) or by emulating mouse on the controller.

Other Moonlight clients

PC

Moonlight adjusted settings

Yes

Moonlight adjusted settings (please complete the following information)

I have attempted to toggle the Controller driver settings off and on in Moonlight Android in an attempt to fix the issue with no success. My biggest achievement was to completely stop the controller from working.

Moonlight default settings

Yes

Gamepad-related connection issue

No

Gamepad-related input issue

Yes

Gamepad-related streaming issue

Yes

Android version

Android 12L

Device model

Surface Duo/Galaxy S10

Server PC OS version

Ubuntu 23.10 (Occurred on 22.04 as well)

Server PC GeForce Experience version

not utilized

Server PC Nvidia GPU driver version

545.23.06 (Occurred on 535.104.05 as well)

Server PC antivirus and firewall software

n/a, Ubuntu clean install

Screenshots

n/a

Relevant log output

Uncertain what to add here

Additional context

Uncertain what to add here

Sidefix commented 6 months ago

I should mention that I was unable to reproduce this issue with any locally hosted games directly on the device, or with Xbox game pass games. This issue occurs strictly with Moonlight/Sunshine.

Asylzatwww commented 3 months ago

When using multiple buttons in action games, some of them doesnt work at time, and movement also is not correct which makes difficult to aim at a target

jdomian commented 2 months ago

Same here. Happens often with "Legion Go" streaming moonlight to sunshine on 5ghz LAN. No video interruptions, no audio interruptions, no slow connection issues or warnings. PC specs are very good, Wifi connection is very good. Same behavior as in video shared above where you can move both joysticks around, but in game, your "character" continues to move as of the Joystick was "frozen" in the last known position.