moonlight-stream / moonlight-android

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

Lag spikes every 5 minutes. #885

Open juantosuperpan opened 3 years ago

juantosuperpan commented 3 years ago

Streaming overall is very smooth, no drops whatsoever, overall 10ms of latency(average 2,5ms of network receive time) on 1080p, 40Mbps and 120fps. It only happens every 5 minutes or so, for 3 seconds, that the frames start to drop dramatically. The audio and video stutters heavily, bitrate visibly drops. The spike lasts for about 3 seconds, just to get back to normal performance. Moonlight streaming stats, when the spike happens, show that 50% of my frames dropped because of my network connection. Tried setting the network duplex to 100 Mbps Full Duplex, but the issue still persists. The issue is not present when switching to my 4G phone data. The issue does not exist on other phones connected to my home Wi-Fi. I'm using an Exynos S7, 600mb/s 5Ghz Wi-Fi, playing with a Bluetooth controller(The issue persists with Bluetooth off as well)

when testing my connection on ping.canbeuseful.com on my phone's browser, I get a of having single 200ms, sometimes 400ms ping spikes every so often, but I'm not quite sure what to make out of it.

I also had another stutter issue before, that still exists, it's just that I managed to find a workaround for it. There are microstutters that happen every 5 seconds, make the audio stutter as well. To get rid of them, I have to turn on, and turn off airplane mode before launching a Moonlight streaming session. This, however, does not fix the mentioned above huge stutters.

it seems like its a local issue on my phone, but not quite sure what causes it :\

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

AngelAbaddon commented 2 years ago

I can confirm I'm having the exact same issue (intermittent bursts of spikes that also display an FPS drop in the stats). This occurs on both a Google Pixel 2 XL and Pixel 6, doing the same testing - Bluetooth off and airplane mode on except WiFi both still exhibit the issue. Can confirm its client side as my Nvidia Shield does not have the same issue.

Pizzacore commented 2 years ago

I have the EXACT same issue streaming to moonlight on steam link. I use a combination of 5ghz wifi (router to steam link) and wired (PC to router).

Regular steam link doesn't have this issue, so it must be Moonlight specific. Wish i could fix this, anyone else know something about this issue?

ottelo9 commented 2 years ago

I have this problem too

ottelo9 commented 1 year ago

If you connected via WiFi then this should help:

Windows: "Global BG scan blocking" https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting#video-is-choppy-or-laggy

Mac: https://github.com/moonlight-stream/moonlight-docs/wiki/Frequently-Asked-Questions#why-do-i-see-periodic-stutters-on-macos-when-streaming-over-wifi

Otherwise some background running service can cause this problem (see Mac help). Maybe iTunes or something else.

chu-bin commented 2 months ago

I have this problem too. on same wi-fi, iphone 15 pm no lag, the android phone lag spikes every 10 minutes. moonlight 12.1, sunshine 0.22

mr-scrawley commented 2 months ago

Could be caused by location services: https://github.com/moonlight-stream/moonlight-android/issues/75#issuecomment-103625847

That fixed behavior like the one described here for me.

Zorrozia commented 1 week ago

Hi

Where you able to solve this issue i have tries to disable all wifi scanning and location services but still gets a lag. All settings as well has been tried

Pizzacore commented 1 week ago

I never did, but I also haven't used moonlight in about 3 years or so!

On Thu, May 23, 2024, 03:42 Zorrozia @.***> wrote:

Hi

Where you able to solve this issue i have tries to disable all wifi scanning and location services but still gets a lag. All settings as well has been tried

— Reply to this email directly, view it on GitHub https://github.com/moonlight-stream/moonlight-android/issues/885#issuecomment-2126038854, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWVYS7PPDOH5P263BZNSIODZDVCQBAVCNFSM4SJKX2JKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJSGYYDGOBYGU2A . You are receiving this because you commented.Message ID: @.***>

Zorrozia commented 1 week ago

I never did, but I also haven't used moonlight in about 3 years or so! On Thu, May 23, 2024, 03:42 Zorrozia @.> wrote: Hi Where you able to solve this issue i have tries to disable all wifi scanning and location services but still gets a lag. All settings as well has been tried — Reply to this email directly, view it on GitHub <#885 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWVYS7PPDOH5P263BZNSIODZDVCQBAVCNFSM4SJKX2JKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJSGYYDGOBYGU2A . You are receiving this because you commented.Message ID: @.>

Thanks for the reply i was able to fix it but still under monitoring. At first i though it was my bluetooth but it turns out that the problem is my BSP D8 controller. It introduces lag via cable or blue tooth.

i used my ps4 controller and moonlight is smoother now but i am still checking as this might just been a fluke

Thanks again for the response

Pizzacore commented 1 week ago

Oh that's good to now! I was using a Nintendo Switch Pro controller at the time and now have an Xbox controller.

Next time I try moonlight it will hopefully be better, thanks!

On Thu, May 23, 2024, 18:12 Zorrozia @.***> wrote:

I never did, but I also haven't used moonlight in about 3 years or so! … <#m1954279124035444624> On Thu, May 23, 2024, 03:42 Zorrozia @.> wrote: Hi Where you able to solve this issue i have tries to disable all wifi scanning and location services but still gets a lag. All settings as well has been tried — Reply to this email directly, view it on GitHub <#885 (comment) https://github.com/moonlight-stream/moonlight-android/issues/885#issuecomment-2126038854>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWVYS7PPDOH5P263BZNSIODZDVCQBAVCNFSM4SJKX2JKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJSGYYDGOBYGU2A https://github.com/notifications/unsubscribe-auth/AWVYS7PPDOH5P263BZNSIODZDVCQBAVCNFSM4SJKX2JKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJSGYYDGOBYGU2A . You are receiving this because you commented.Message ID: @.>

Thanks for the reply i was able to fix it but still under monitoring. At first i though it was my bluetooth but it turns out that the problem is my BSP D8 controller. It introduces lag via cable or blue tooth.

i used my ps4 controller and moonlight is smoother now but i am still checking as this might just been a fluke

Thanks again for the response

— Reply to this email directly, view it on GitHub https://github.com/moonlight-stream/moonlight-android/issues/885#issuecomment-2127537797, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWVYS7K5HHUYNLLEOIP6JNLZDYINZAVCNFSM4SJKX2JKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJSG42TGNZXHE3Q . You are receiving this because you commented.Message ID: @.***>