Skip to content
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

WiFi jitter and frames dropped on macOS Sequoia 15.0 #1427

Open
TsaiTung-Chen opened this issue Sep 28, 2024 · 6 comments
Open

WiFi jitter and frames dropped on macOS Sequoia 15.0 #1427

TsaiTung-Chen opened this issue Sep 28, 2024 · 6 comments

Comments

@TsaiTung-Chen
Copy link

TsaiTung-Chen commented Sep 28, 2024

Describe the bug
After upgrading to the latest macOS Sequoia 15.0, the WiFi network jitters and causes a large amount of frames dropped, which makes games unplayable.

I have tested connecting to a Windows PC from a Mac running macOS Sequoia 15.0 with WiFi and with Ethernet; as well as connecting to the same PC from another Mac running macOS Sonoma 14.6.1 with WiFi. Among these 3 tests, the network jitters only appear when I connected the PC from the Mac running macOS Sequoia 15.0 with WiFi. So this issue could be caused by the new macOS. Maybe there're something changed related to WiFi connection.

Steps to reproduce
Upgrade to the latest macOS Sequoia 15.0 and use WiFi network to connect to your host.

Screenshots
iOS 18.0 with WiFi --> network latency 3 ms
iOS 18 0 - WiFi

macOS Sonoma 14.6.1 with WiFi --> network latency 6 ms, jitter 0%
Sonoma - WiFi

macOS Sequoia 15.0 with Ethernet --> network latency 2 ms, jitter 0%
Sequoia - Ethernet

macOS Sequoia 15.0 with WiFi --> network latency 56 ms, jitter 14%
Sequoia - WiFi

Affected games
All games

Other Moonlight clients

  • The issue does not occur when using Moonlight on iOS 18.0. Maybe enabling the Game Mode on macOS Sequoia could help.

Moonlight settings (please complete the following information)

  • 1080p 60fps
  • V-Sync on, frame pacing on
  • Hardware decoding, HEVC codec

Client PC details (please complete the following information)

  • OS: macOS Sequoia 15.0
  • Moonlight version: v6.1.0
  • GPU: M2 Pro

Server PC details (please complete the following information)

  • OS: Windows 11 23H2
  • Sunshine version: v0.23.1
  • GPU: NVIDIA RTX 2060
  • GPU driver: 517.48

Moonlight Logs (please attach)
Moonlight-1727461847.log

@andygrundman
Copy link

I have had a similar experience and I think you may be on the right track when it comes to Game Mode. I've built a version of Moonlight from the current master with the 2-line change necessary to enable support for Game Mode. If you would like to give it a try your feedback is very helpful. Game Mode only activates when viewing the app full screen, and swiping to other apps causes it to exit game mode. This may cause an audio glitch when using Bluetooth headphones.

(This is an unsigned build, only install if you are comfortable allowing it through the Privacy & Security settings menu.)
https:/andygrundman/moonlight-qt/releases/tag/v6.1.0-game-mode

@TsaiTung-Chen
Copy link
Author

I have had a similar experience and I think you may be on the right track when it comes to Game Mode. I've built a version of Moonlight from the current master with the 2-line change necessary to enable support for Game Mode. If you would like to give it a try your feedback is very helpful. Game Mode only activates when viewing the app full screen, and swiping to other apps causes it to exit game mode. This may cause an audio glitch when using Bluetooth headphones.

(This is an unsigned build, only install if you are comfortable allowing it through the Privacy & Security settings menu.) https:/andygrundman/moonlight-qt/releases/tag/v6.1.0-game-mode

I tried your build and the Game Mode notification did show up. However, the jitter and frames dropped persist and I can't see the Gamed Mode makes any difference. Did this build work for you?

@andygrundman
Copy link

Hmm, the specific "due to network jitter" counter is caused by the frame pacing code. It's worth comparing to vsync with no pacing, no vsync, and 120fps (if you are on a MacBook Pro). Doing some tests here with this build, it's pretty bad for me, very similar to your results. Game Mode doesn't help. But it definitely helps on iPad, and I have had luck on Mac in the past (I was mostly focused on audio stuff though). Also see if rebooting makes any difference.

@AlanKK
Copy link

AlanKK commented Oct 1, 2024

I have been having this same issue. I remembered I had created a "Game Mode" shortcut for MacOS that does this:

while sleep 10; do sudo ifconfig awdl0 down; done

This disables Apples wireless stuff like airplay, airdrop. It fixed the jitter issue for me.

@andygrundman
Copy link

Very brute force, should work for at least for a bit. You'd probably need to write something more complex that watches the interface for when it comes back online. If you search awdl0 you can find discussion about it going back years and no real acknowledgment from Apple.

I've been trying to understand what Game Mode actually does, mostly around bluetooth audio because it causes glitches with my CoreAudio code, and there's just so much undocumented stuff going on.

Take a look at the system logs in Console.app and you can find a lot of interesting stuff. Some search keyword suggestions: awdl, coex, airport, latency, gamemode, bluetooth. For as secretive as Apple are, they do also like to write some detailed log messages.

@TsaiTung-Chen
Copy link
Author

TsaiTung-Chen commented Oct 2, 2024

I tried connecting to my PC via WiFi again today. And surprisingly, the frames dropped caused by network jitter was 0%, which was the same as connecting to PC via Ethernet cable. I have no idea what's the difference between the setups on Saturday and today.

By the way, my WiFi router is set to use the channel 149 for 5 GHz band.

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

3 participants