moonlight-stream / moonlight-ios

GameStream client for iOS/tvOS
GNU General Public License v3.0
990 stars 247 forks source link

Rhythmic/Pattern Stuttering on Vision Pro (iPad app) #607

Open 1kuna opened 3 months ago

1kuna commented 3 months ago

While using the Apple Vision Pro I get this sort of consistent rhythmic skipping. It's seemingly a perfect pattern that cuts both the audio and video out at the same time. It was happening more often than it wasn't, but there were periods of time where the issue was non-existent. It would periodically start and stop having the issue.

I tried all the troubleshooting steps and changing my settings, including the notorious location settings for Mac/iOS. I haven't tried another game, since I didn't have much time to test other than on Palworld, but I'd be willing to bet it has the same result.

Here is a screen recording of the issue

PureDark commented 3 months ago

Can confirm I have this as well.

paulbettner commented 3 months ago

Yep, I am also experiencing this exact same problem using iPad app on Vision Pro. Despite the stream running perfectly otherwise (no dropped frames, minimal latency) I get a consistent "rhythmic" stutter (stuck video frame and audio dropout) every 80 milliseconds or so, like clockwork.

It's not related to any specific game, it reproduces simply streaming the desktop (and also happens in any games I've tried as well.)

felipejfc commented 3 months ago

try with bluetooth and airplay off too, these are known for causing hiccups in networking on ios devices. also try with the setting I contributed to turned on, the prefer smooth experience instead of low latency. It will delay one frame which adds a small latency but can work wonders on reducing stutters

paulbettner commented 3 months ago

Thank you for your response. Unfortunately none of those adjustments fix this issue.

adam-fox commented 3 months ago

Having the same problem. Is this exclusive to the Vision Pro, though? Moonlight on my iPad seems to be having the same problem.

CptGabok commented 3 months ago

Chiming in. Same problem, on both iPad and Vision Pro. None of the normal troubleshooting solutions have helped. Latency averaging around 7ms, 0% dropped frames. Metrics suggest everything should be great, but instead there is this consistent choppiness.

alexhaugland commented 3 months ago

Is it happening every second? On macOS it's caused by AWDL taking the wifi card every second and you can make it better by putting your wifi on the same channel as AWDL in your region (149 in the us iirc). On macOS you can disable it entirely but it doesn't seem possible to do so on visionOS. I had this problem on my AVP but switching my wifi channels fixed it.

adam-fox commented 3 months ago

@alexhaugland Yep, every second for me. Unfortunately, I have one of those wonderful routers with zero configuration options or I'd give changing the channel a shot. Odd, though it's only occurring on the AVP and an iPad Mini 6. Working as expected on an iPhone and wirelessly on a MacBook.

maddox commented 3 months ago

On macOS it's caused by AWDL taking the wifi card every second and you can make it better by putting your wifi on the same channel as AWDL in your region (149 in the us iirc).

Wow, I think this solved it for me. I was having horrible packet loss on Moonlight, and on Game streaming like GeForce Now and Xbox Cloud Gaming. They were impossible to use. But I couldn't replicate this issue on a wired Apple TV nor my laptop on wifi.

For me though, it was showing great FPS and ping time. It was the "Percent of dropped frames" that was ranging from 8% to 25%.

I swapped the AP I was attached to, to channel 149 and it all magically worked.

Unfortunately, I have quite a few access points in my house, so now I don't know what to do. This is kind of a really crappy issue.

Razorub commented 3 months ago

Same exact issue here. Running on an ultra fast WiFi 7 network, and encountering the same rhythmic stuttering every second. I've spent the past week configuring network settings, replacing my network adapter, replacing my router, cables, you name it. Still encountering the same issue. Every now and then there's a moment when everything just works, but then after a few minutes it's right back. My gpu is a 4090 so it should handle it. Seems to be any game, even Rayman which uses hardly any resources triggers it. I've tried all the configuration options in Sunshine, and still no luck. When the stutter occurs, lowering the bitrate to even 5 still causes it.

Also, the VisionOS TestFlight version seems to have disabled H264. I can select it in the options, but it's defaulting to HEVC when loaded.

maddox commented 3 months ago

@Razorub did you try changing your router to use channel 149 for 5ghz (if you're in the United States).

I did this and it instantly resolved it.

1kuna commented 3 months ago

@Razorub did you try changing your router to use channel 149 for 5ghz (if you're in the United States).

I did this and it instantly resolved it.

How extended was your testing after doing that? I'd find it hard to believe a specific broadcast channel can fix the issue entirely, though I'm no expert.

Razorub commented 3 months ago

@Razorub did you try changing your router to use channel 149 for 5ghz (if you're in the United States).

I did this and it instantly resolved it.

My Eero 7 Max automatically configures channels. There is no manual control.

maddox commented 3 months ago

How extended was your testing after doing that?

Over many hours of not using it and trying again.

I'd find it hard to believe a specific broadcast channel can fix the issue entirely, though I'm no expert.

AWDL switches to channel 149 (on 5ghz in the US) in order to query and operate and switches back. This is the cause of the disruption. If your network interface is already on 149, it avoids the chaos.

1kuna commented 3 months ago

How extended was your testing after doing that?

Over many hours of not using it and trying again.

I'd find it hard to believe a specific broadcast channel can fix the issue entirely, though I'm no expert.

AWDL switches to channel 149 (on 5ghz in the US) in order to query and operate and switches back. This is the cause of the disruption. If your network interface is already on 149, it avoids the chaos.

Alright I'll give it a try and report back. Thanks for the info 👍

TheSpacemanSpliff commented 3 months ago

1kuna

Did this fix your situation as well?

1kuna commented 3 months ago

1kuna

Did this fix your situation as well?

@TheSpacemanSpliff @maddox I tried it for about an hour last night with zero stuttering. Slightly more latency & variance than usual, 4ms instead of 1ms. Will do more testing today but it seemingly worked for now.

TheSpacemanSpliff commented 3 months ago

I guess I'm stuck in this situation then, as I have an Eero 7 Max which after discussion with their tech support doesn't allow for manual selection of a channel. Bummer because I love everything about moonlight.

PureDark commented 3 months ago

Is it happening every second? On macOS it's caused by AWDL taking the wifi card every second and you can make it better by putting your wifi on the same channel as AWDL in your region (149 in the us iirc). On macOS you can disable it entirely but it doesn't seem possible to do so on visionOS. I had this problem on my AVP but switching my wifi channels fixed it.

I can't believe it's that simple, but changing the wifi channel to 149 fixed the issue instantly

NapalmDest54 commented 3 months ago

I guess I'm stuck in this situation then, as I have an Eero 7 Max which after discussion with their tech support doesn't allow for manual selection of a channel. Bummer because I love everything about moonlight.

I have the Eero 6 Pro (not 6e) and it does seem to be more specific issue to some apps compared to others.

Some of my test results:

Even more interestingly is using parsec as a comparison, the M1 MBP on wireless with awdl on, airdrop on, bluetooth on, has no issues with 4k 60fps.

TheSpacemanSpliff commented 3 months ago

Is it happening every second? On macOS it's caused by AWDL taking the wifi card every second and you can make it better by putting your wifi on the same channel as AWDL in your region (149 in the us iirc). On macOS you can disable it entirely but it doesn't seem possible to do so on visionOS. I had this problem on my AVP but switching my wifi channels fixed it.

I can't believe it's that simple, but changing the wifi channel to 149 fixed the issue instantly

Seems Channel 149 is the solution. Unfortunately my $600 Wifi 7 router doesn't allow me to do something as simple as manually change the channel. Talk about frustrating.

Side note: You don't happen to be the same PureDark who created the DLSS3 mod for Starfield?

TheSpacemanSpliff commented 3 months ago

Even more interestingly is using parsec as a comparison, the M1 MBP on wireless with awdl on, airdrop on, bluetooth on, has no issues with 4k 60fps.

Yeah, I also use parsec on my other system and it runs with no hiccups. I really want to be able to use Moonlight with the Vision Pro.

NapalmDest54 commented 3 months ago

It seems strange the wireless hiccups are occurring just on Moonlight compared to Parsec.

@TheSpacemanSpliff I am highly considering switching to a new wireless mesh router system to get away from Eero holding back some of this basic functionality.

adam-fox commented 3 months ago

Yeah, for me at least, this issue seems to exclusively occur with Moonlight. Steam Link is working just fine. I'll also note, that at least on my iPad Mini, this is a new occurrence and was working fine up until somewhat recently. So, I'd question whether something changed within the iPadOS build or within iPadOS itself that's causing some of us to have issues.

TheSpacemanSpliff commented 3 months ago

I wonder what is triggering it with Moonlight vs Steamlink? I tried Steamlink and much prefer Moonlight and the higher quality stream.

NapalmDest54 commented 3 months ago

So testing SteamLink and also Geforce Now, do not see the kind of stuttering and frame drop issues as I do with moonlight on iPad, iOS, Vision Pro, or Mac.

Razorub commented 3 months ago

So testing SteamLink and also Geforce Now, do not see the kind of stuttering and frame drop issues as I do with moonlight on iPad, iOS, Vision Pro, or Mac.

Hopefully this is something the moonlight devs can figure out then, because moonlight is so much nicer to use than steamlink or GeForce.

felipejfc commented 3 months ago

The reason geforce now and steam link are mostly flawless is they use a fat buffer of packets, which of course mean highly perceived latency. particularly I wasn't able to moonlight in my iOS devices as well as I did on x86 linux/windows or even android devices, so I just gave up on ios at some point for this purpose.

TheSpacemanSpliff commented 3 months ago

The reason geforce now and steam link are mostly flawless is they use a fat buffer of packets, which of course mean highly perceived latency. particularly I wasn't able to moonlight in my iOS devices as well as I did on x86 linux/windows or even android devices, so I just gave up on ios at some point for this purpose.

Do you think it would be possible for Moonlight to offer the option of using a fat buffer, even if it meant facing a higher latency?

felipejfc commented 3 months ago

The reason geforce now and steam link are mostly flawless is they use a fat buffer of packets, which of course mean highly perceived latency. particularly I wasn't able to moonlight in my iOS devices as well as I did on x86 linux/windows or even android devices, so I just gave up on ios at some point for this purpose.

Do you think it would be possible to for Moonlight to offer the option of using a fat buffer, even if it meant facing the a higher latency?

sure. I contributed to a feature where I introduced one frame as a buffer and this fixed most of my issues on an apple tv wired. you just need to go to settings and choose smoother experience rather than low larency.

maddox commented 3 months ago

FWIW, I had a terrible time with GeForce Now and Xbox Cloud Gaming as well. They are both better now.

Razorub commented 3 months ago

FWIW, I had a terrible time with GeForce Now and Xbox Cloud Gaming as well. They are both better now.

Is that after switching to channel 149?

CptGabok commented 3 months ago

Switching to channel 149 fixed my issues as well. Very interesting.

Razorub commented 3 months ago

I'm unable to manually select a channel with my Eero system, but disabling location services in my Vision Pro seems to have fixed my stutter.

laestrella26 commented 3 months ago

I can't change the channel settings on my Orbi router and disabling location services didn't fix this problem. Seems to occur on the iPad and on the Vision Pro.

NapalmDest54 commented 3 months ago

@laestrella26 do you happen to have a MacBook or Mac device close by? Try powering them down if you do.

additionally, try selecting Smooth Video in the settings in moonlight on the iPad and Vision Pro settings.

laestrella26 commented 3 months ago

@laestrella26 do you happen to have a MacBook or Mac device close by? Try powering them down if you do.

additionally, try selecting Smooth Video in the settings in moonlight on the iPad and Vision Pro settings.

Thanks. I tried that but it didn't really help. I thought I noticed some improvement but that could have been because I rebooted the Vision Pro after turning of location services.

Either way, I just bought a new router. This was the last straw with my Orbi. I've been living with the lack of control over even selecting which satellite my devices connect to for way too long and the inability to even separate the SSIDs. I just got an ASUS ROG router and it's fantastic. I put the Orbi in AP mode and it's all working great. I was able to set the channel to 149 and now everything is working as expected. Hopefully, there is a less drastic solution for others but I've been wanting a new router and this was the right time.

NapalmDest54 commented 3 months ago

@laestrella26 which router did you get specifically? I’m probably going to do the same.

laestrella26 commented 3 months ago

@NapalmDest54 ASUS ROG RAPTOR AX11000 -https://www.bestbuy.com/site/asus-rog-rapture-gt-ax11000-pro-tri-band-wifi-6-gaming-router-2-5g-port-black/6531152.p?skuId=6531152

landonepps commented 3 months ago

I think any of the ASUS 6/6E routers should work well. I bought this slightly cheaper one and it works great. https://www.amazon.com/ASUS-RT-AX88U-Extendable-Rangeboost-Subscription-Free/dp/B0BTTY7QFH

paulbettner commented 3 months ago

Update from my setup (which is a home network of several overlapping Orbi routers/access points):

When I first posted about my issue, I thought I had disabled all the extra services on the Vision Pro (i.e. location services, handoff, etc) - but it turns out I hadn't turned ALL of them off. So I did that, and then the problem disappeared (now able to stream at 4k/120hz SMOOTH).

However, the weird part is: I have since gone in and re-enabled all of these services on the Vision Pro, to try and diagnose (and then report back here) which specific service was causing the issue. Unfortunately though, I can no longer reproduce this issue, even with ALL of the potentially-problematic services/settings re-enabled.

I don't know if something else changed since my first test (Moonlight update? Orbi update?) But for the last few days, even with all services re-enabled, I am getting rock solid streaming performance (and without having adjusted the wifi channel either!)

As an engineer myself, I hate that the answer from my end is "turning it off and back on again is what fixed it" but unfortunately that's all I've got at the moment 🤷‍♂️

NapalmDest54 commented 3 months ago

@paulbettner mine started working flawlessly, but then the stutters came back. What all options did you disable and re-enable on the vision pro?

paulbettner commented 2 months ago

@paulbettner mine started working flawlessly, but then the stutters came back. What all options did you disable and re-enable on the vision pro?

For me, the problem came back. But then I disabled location services and it immediately went away (like - it stopped happening WHILE moonlight was running, simply by disabling location services.)

But then it came back again, and this time disabling location services had no effect (although I haven't tried restarting the device yet.)

Sorry, I wish I had a more reliable repro for y'all.

NapalmDest54 commented 2 months ago

I ended up buying an asus router, setting it up as an AP for the eero network. Set the asus router 5Ghz to 149 channel and connect to that. All is good now

aaroncase86 commented 2 months ago

I had this problem with my Eero network and the vision pro. Like @NapalmDest54 , I ended up buying an ASUS router and set it up as the Access Point. I didn't have to adjust the channel settings, but the stutter problem immediately went away.

Other applications with game streaming capabilities (nexus+ with game pass cloud) are also instantly better.

Something with the eero network just doesn't play nice here.

Razorub commented 2 months ago

Same, I ended up buying a ASUS Rog Router, setting up as an AP with my Eero and the stutter instantly went away.

johnseabird commented 1 month ago

I'm just joining the conversation because I do have the exact same rhythmic stutter (at least it sounds like it). I also just had it completely go away when turning off bluetooth. I will in addition test Wifi Frequency settings of the router. I think in europe and UK it is 44 (I found that number in an apple forum).

peperunas commented 1 month ago

I am pretty confident that the issue is related to Apple devices that use AirPlay. Disabling location services / discovery of Airplay receivers fixes it.

This issue is also present on MacOS.

RikuKunMS2 commented 2 days ago

An alternative i’ve found that seems to have worked for me if you can’t set your router to ch 149 is to connect to a Wifi 6/7 MLO network