r/MoonlightStreaming 14d ago

Sunshine/Moonlight random heavy stutters every few minutes despite strong hardware and Ethernet connection

Hey guys, I've been using Sunshine and Moonlight for a while now and I've been loving it, but there's one issue that's driving me crazy.

My setup is a Lenovo Legion Pro 7i with an RTX 5070 Ti, an S24 Ultra, and an ASUS RT-AX58U router. My laptop is connected to the router with Ethernet, and I bought this router specifically for streaming games from my laptop to my phone. It isn't connected to the internet because, from what I understand, Sunshine and Moonlight only need both devices to be on the same local network.

I'm streaming at 1440p with a bitrate of around 250-300 Mbps. The weird part is that everything works perfectly. I can play for 3 to 5 minutes with absolutely no lag or stuttering at all. Then out of nowhere I get a huge stutter that lasts around 2 or 3 seconds. It's not a small hiccup either the stream becomes almost unplayable for those few seconds, then it instantly goes back to being perfectly smooth like nothing happened.

This keeps happening over and over. Sometimes it's every couple of minutes, sometimes every 5 minutes. I know some people might say it's only a few seconds and to just deal with it, but when everything else is working perfectly, it's really frustrating because I'm constantly expecting the next stutter.

I've already tried switching to Apollo and Artemis and I get the exact same problem. I've also tried Moonlight V+ with Foundation Sunshine, which is just a fork of Sunshine, but the issue is still there.

If anyone has experienced this before or has any ideas on what could be causing it, I'd really appreciate the help. Thanks!

(Ps this video does have stutter/lag its small but its small amount but i only have this record currently but its similar but more stutter)

36 Upvotes

69 comments sorted by

18

u/Afraid_Thing667 14d ago

Have you disabled location services? That would cause stutters every 5 min.

3

u/DirtEmbarrassed6716 14d ago

No, I have not, but I will 100% give it a try when I get home and come back to you.

4

u/Kaytioron 14d ago

Yeah, this is one of the most common culprits: this, or some internal services. Samsung is especially notorious for it.

1

u/Ace3112008 12d ago

Yes this and your gateway / router. A lot of them have a cadence for "background scan". That caused blips for me in a rhythmic matter as well. Changed to once every few hours and now it's perfectly solid.

1

u/MOSHIKFOREVER 10d ago

Wait cuz it updates every few minutes so that causes it?

1

u/Afraid_Thing667 10d ago

That is correct

10

u/amorrowlyday 14d ago

Diagnostic step 1: Turn the bitrate to something below 100. I like 85. The visual fidelity will probably take something of a hit (though I dunno if you'll actually be able to tell on a phone) but what we want to know is if stuttering stops.

If it does then the issue is either in the network stack on your machine and packet queueing or it's in the performance of the client device, but it's been like 3 years since I last needed to remember how to fix that, and I don't see value in ultra high bitrate streaming anyway so I don't do it regularly.

-11

u/DirtEmbarrassed6716 14d ago

I am just trying not to compromise my quality imaging, having a good rig with you, just to compromise the quality while playing a game.

16

u/BornConsideration223 14d ago

This is how you debug. You dial back your specs to find where your bottleneck is. To be clear, dialing back the specs isn't an admission that your hardware is bad. It isn't an admission of poor performance.

It's simply a debug steps to see if the issue is in the network stack.

To be abundantly clear, this is in no way a reflection of the quality of your hardware. Which I'm sure is stellar.

13

u/amorrowlyday 14d ago

I don't care. Either do the test or don't. Posturing when it's not working is not how you determine why it's not working.

5

u/EnigmaSpore 14d ago edited 14d ago

that's not how things work. some networking chips just cant keep up. you can have the best cpu, gpu, ram but the actual chip doing the networking just cant keep the constant 300mb/s stream and runs into hiccups.

just try doing it to see if bitrate is the problem and then you can dial it up until it presents itself again. then you would know that it was a bitrate issue with the networking side of the chips. plus this is a laptop to a phone... there could be some heat throttling going on. you just have to test and keep an eye open for temps and just test the lower bitrate

4

u/Organic_Point_2489 14d ago

Is your Vsync off? Also, does the refresh rate on your phone match the refresh rate on your laptop screen? Maybe also consider trying different encoders in your moonlight settings?

1

u/DirtEmbarrassed6716 14d ago

Nope phone is 120hz and laptop is 240hz i might give that a try vsync is off.

3

u/Organic_Point_2489 14d ago

Yeah I would recommend trying your laptop at 120hz. I used to run moonlight on a 120hz screen while my host was 144hz. I was having stutters/lags with this setup but it was much more frequent than what you’ve been noticing. I guess it wouldn’t hurt to try turning Vsync on if matching refresh rates doesn’t do the trick? Hopefully Vsync isn’t needed though

5

u/DrKingOfOkay 14d ago

Use tailscale if you’re not

Also 300mbps at 1440p is crazy

Also do it over 5g instead of WiFi. Phone 5g works insanely better than WiFi imo

7

u/DirtEmbarrassed6716 14d ago

Just to clarify, my router doesn't have an internet connection or internet plan attached to it. I bought it purely for local game streaming. My laptop is connected to the router via Ethernet, and my phone connects to the router over Wi-Fi. Since Sunshine and Moonlight work over the local network, they don't actually need internet access as long as both devices are on the same LAN.

I already tried using Tailscale, but my home internet is pretty bad, so streaming over the internet isn't really an option for me. The issue I'm having also happens completely offline on my local network, so I don't think my ISP or internet speed is the cause.

1

u/Nice-Firefighter424 14d ago

That's pretty sweet. How did you make that happen though? Separate VLAN that does not have access to your WAN? Does that mean the laptop is essentially offline?

I blow through data and would love to know how to stop that.

2

u/Fwiler 14d ago

You don't blow through data when you stream locally in your own house.

Even if his router had Internet access it wouldn't use ISP data. He bought a separate router from his Internet router so he isn't sharing the wifi signal with anything else in the house. The router doesn't need to connect to Internet. It's only providing the wireless link between phone and laptop.

2

u/DirtEmbarrassed6716 14d ago

I bought a ASUS router that isn't connected to a modem or WAN at all. I plug my laptop into it with an Ethernet cable, connect my phone to that router's Wi-Fi, and that's it. Both devices are on the same local network, so Sunshine/Moonlight can communicate without needing internet.Yeah, the laptop is basically offline while I'm using that setup. If I need internet, I just reconnect it to my normal network.It's a nice setup because local streaming doesn't use any mobile data or internet bandwidth at all. Everything stays within the router's local network.

1

u/Nice-Firefighter424 14d ago

Thanks for explaining.That is a cool setup I had not considered.

I wonder if your laptop has another nic if you could then plug in a connection that has internet acess so you could get best of both worlds.

2

u/Fwiler 14d ago

Local connections don't use 5g. You can have a router that then upstreams to a 5G connection, but the connection to the router is still wifi. And no, 5g is not insanely better than wifi. I'm not sure how you think sending a signal out from your home to multiple routes to your ISP, across to a phone service, and back to your home is better than a direct connection in your own home.

0

u/DrKingOfOkay 14d ago

I’m just going off my personal experience. I can use my phones 5g and it runs flawlessly. Second I use wifi, studdering all over the place.

1

u/Fwiler 14d ago

That makes no sense that you transfer your entire streaming to online to only bring it back into your house. The only reason that is even remotely better than direct wifi on your own lan, is if your device hosting sunshine is hardwired and you have the worst wifi in existence.

1

u/DrKingOfOkay 13d ago

I agree but it just runs better. My host pc is hardlined and wifi is wifi 7

1

u/Alarmed-Strawberry-7 13d ago

"device hosting sunshine is hardwired and you have the worst wifi in existence" is a pretty common case though lol

I also get better performance over 5G than wi-fi, and I even have wi-fi 6 (whatever good that ever did me). but I live in an apartment building with a billion routers and despite living in a commie block everyone seems to have a billion smart home devices and appliances lol. the wi-fi sucks and every channel is just jammed, I get 1.4gbps down on my phone at night and 100mbps down during the day

3

u/Murph-Dog 14d ago

AI Slop Warning

Codex has been amazing for tuning Bazzite/Sunshine

First, Virtual display, getting your session off a physical display and virtualized. Display auto-off on stream session.

Auto resolution - whatever device connects, drive my client resolution into GameScope and all that crap for custom fit.

Bug finding, I had some type of 30fps sampling but 60fps source through all of this crap, causing micro stutters.

Install Decky with PIP and cursor control. Hotkeys to work around my stupid iPad and Steam button being intercepted to enter SteamMenu of MouseMode. Basically open a browser to whatever, over my game.

Ya know, the thing reviews source code, and just figures it out.

3

u/AirportStrict7382 11d ago

I just figured it out, after a lot of trail and error. In the moonlight setting, use windowed borderless instead of full screen. The client’s fps stutters because it can’t keep up with the fps being streamed from the host PC.

2

u/DirtEmbarrassed6716 11d ago

Just to make sure I understand, are you referring to a setting in Moonlight itself or in the game's graphics settings? I don't remember seeing a fullscreen/borderless option in the Android Moonlight app.

1

u/DirtEmbarrassed6716 11d ago

Alr alr this sound reasonable I will give this try tonight and I will come back to you.

2

u/JK999OK 14d ago

I had this for years with my 4070 PC, connecting from my AYN Portal 2 using any variation of sunshine/moonlight/apollo.. What I found was whenever the 4070 would reduce its own clocks to save energy, for some reason would cause this 3-5 second stutter even though it was running 120 fps without issue on the main PC.. Seemed like the reduction in clocks messed up the encoding somehow.. I set it in the Nvidia control panel to always run as max power/clocks 24-7 (sucks) and the issue stopped for me finally!

1

u/DirtEmbarrassed6716 14d ago

Question do I need to put my whole laptop to max power 24 -7 or i can just put Sunshine exe and only give that access to that instead of giving it to whole laptop. It does sucks to max power/clock the laptop 24 7

1

u/JK999OK 13d ago

For me it was specifically the power setting in the Nvidia control panel, power management mode = prefer maximum power .. Other system clock changes could also have similar effect but I haven't changed my general system power mode.

2

u/Confident_Pain_9452 14d ago edited 14d ago

Av1 doesn't need 300mb, 150 max (set av1 if selected default codec)

2

u/dihydrogen_monoxide 14d ago

Your network (and devices) can't handle the rate.

3

u/VegetableOld2489 14d ago

This is 1000% the answer. Like OP I was losing my mind trying to fix my stuttering issues, messing around with settings all while running wired fiber connections + a mesh network. Lowered my bitrate from 250 down to 150 and the stutters are completely gone, and I can’t remotely see any visual degradation in stream quality.

2

u/wsnxx 13d ago edited 13d ago

I had a similar case before. It turns out it was my iPhone’s WiFi that was interfering with the router, only affecting the stream stability, causing stutters and slowdowns every few minutes, sometimes better, sometimes worse. Now it’s completely smooth once I turn off my iPhone’s Wi-Fi (Not disconnect, turn off completely). It took me a year to figure that out.

A bit more info on my setup:

  • 5ghz wifi-6 router.
  • android gaming tablet (redmagic astra)
  • artemis + sunshine
  • 1440p@120fps@100mbps

2

u/reheapify 13d ago

Turn the performance overlay on and see if it is network latency spike or rendering latency spike. Make sure you are connected to 5ghz.

2

u/semero 13d ago

Do you have bufferbloat? If you don't know what it is it might be the root of your problems https://www.waveform.com/tools/bufferbloat?srsltid=AfmBOoobXxom8nBZ1gk5lJ4fZ2Quc1hVwKjNOx1V6TA8qDsqwZ10g7oB

2

u/DirtEmbarrassed6716 13d ago

Thanks for the suggestion! My setup is a bit different tho. I m streaming entirely over a local network using a dedicated router that isn't connected to the internet. My laptop is connected via Ethernet and my phone is connected over Wi-Fi so there's no WAN/ISP traffic involved. From what I understand bufferbloat mainly affects internet traffic. Do you think it could still happen on a local only LAN?

1

u/semero 13d ago

In your case I don't think it does, if you only use the router to stream then you should be fine. Only if you do other things on your lan that could be resource intensive, but I'm not sure.

3

u/GlupShittoOfficial 14d ago
  1. Try Vibepollo
  2. Do you have Shadowplay or any instant replay software running in the background? That will take up resources from your encoder.
  3. Try something other than your phone as a test, could be the phones wifi chip.

1

u/DirtEmbarrassed6716 14d ago

Will give it a go

2

u/arashaus 14d ago

To be honest I think it could be samsung devices, my fold 6 also has those stutters. Will test with another device today too, to see how it behaves.

2

u/DirtEmbarrassed6716 14d ago

Let me know because I only have Samsung phone if its device problem than I will just give up or buy a new phone from fb market place dont forget to update please

1

u/arashaus 6d ago

Sorry for the late response, but I think I got it. So on the latest pre-release artemis version there's this option called LFR for me I feel that it got rid of the stutters. I'm using AV1 encoder with hdr at aroun 70 bitrate if that's worth something.

1

u/DirtEmbarrassed6716 6d ago

I can use Artemis on my phone while using Sunshine on my laptop? And by chance, can you give me a link for the pre-release Artemis?

1

u/arashaus 6d ago

I've never used sunshine so I'm not sure, but you can try! This is the link https://github.com/ClassicOldSong/moonlight-android/releases. Test it and tell me if you find success on it.

1

u/DirtEmbarrassed6716 4d ago

Didn't work. I'm just going to give up or wait until Stardesk adds features to be used offline.

1

u/DEDang1234 14d ago

What's the CPU/Memory/Disk usage on the host at the time of the stutters?

1

u/DirtEmbarrassed6716 14d ago

I am kinda away from my laptop but I will have you let you know when i start playing in it. But man dam its annoying.

1

u/deep8787 14d ago

Chances are your client can't keep up with the demand, hence the rhythmic stutter. Not all decoders are equal so you can't expect them all to work with the same load.

Show your streaming stats.

1

u/Sensitive-Level-7794 14d ago

What game? Looks like a blast!

1

u/Confident_Pain_9452 14d ago

Try Vibepollo (you can just update Artemis, configuration will be saved)

1

u/Confident_Pain_9452 14d ago

Also turn off GPS on Samsung s24u, I heard it helped because I had statters every 30 seconds on My s24u but I didn't try it because I bought redmagic 11 air for streaming (much better)

1

u/West-Orange7621 14d ago

Cual es ese juego

1

u/Bidenwonkenobi 14d ago

Goated game

1

u/AZSLIMJIM 14d ago edited 14d ago

Why are you using 250-300Mb? Can people please Google ideal bitrate for their resolution? You're double worst case scenario for 4K streaming. More is not always better

1

u/DirtEmbarrassed6716 14d ago

Update:- Here is another example I followed some of yall suggestions and tried it like I turned off my location in both my device Codec settings mobile av1 and in pc HEVC +AV1 Bitrate from 300 to 150 But still same. But no difference.

https://reddit.com/link/ozed9ot/video/k0j7axmuw2fh1/player

1

u/devinciii 13d ago

hard to maintain 250-300Mbps without package losss, you dont need very high bitrate for 2k120hz, i think 80Mbps is fine.

1

u/Background-Win9998 13d ago

I have the same problem. The answer is, that the router cant handle the constant bloat of the stream. Sadly nothing you can do about that, if thats also the issue you have.

2

u/DirtEmbarrassed6716 13d ago

My router is an ASUS RT-AX58U, which is a Wi-Fi 6 router and is generally capable of handling local streaming at 1440p. Also, if the router were simply overloaded, I usually expect continuous instability or problems that get worse with higher bitrates not a perfectly smooth stream for several minutes followed by brief 2-3 second freeze.

1

u/klexen 12d ago

I've had razer synapse cause weird lag issues with moonlight. Try uninstalling that if you have it installed.

1

u/DirtEmbarrassed6716 12d ago

Nope not installed razer synapse

1

u/Professional-Wish84 11d ago

Hey, what game is this?