LizardByte / LizardByte/Sunshine
[macOS] Stream artificially limited to 90fps when set to 120fps in Moonlight
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 41.3k
- Forks
- 2.1k
- Avg merge
- 23h 47m
- Merged PRs (30d)
- 124
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Is your issue described in the documentation?
- [x] I have read the documentation
### Is your issue present in the latest beta/pre-release?
- [x] This issue is present in the nightly release
### Describe the Bug
I have a tablet (Samsung Tab S9+) capable of 120hz refresh rate on which I run Moonlight.
Connecting it to my Macbook Pro M1 host works but the fps does not reach 120fps. Instead, it stays at a steady 90 fps.

### Expected Behavior
The macOS Sunshine host provides 120fps when the client requests it.
### Additional Context
Troubleshooting done:
- I have successfuly used the full 120Hz of the tablet when connected to a Windows Sunshine host
- I tried on both the native and external display of the macOS host
- I made sure Moonlight is set to request 120fps
- I made sure Sunshine exposes 120fps (although I don't think this matters here)
- I made sure the display I tried to stream from is set to 120Hz
### Host Operating System
macOS
### Operating System Version
Sonoma 14.5
### Architecture
arm
### Sunshine commit or version
v2024.621.193854
### Package
macOS - Homebrew
### GPU Type
n/a
### GPU Model
N/A
### GPU Driver/Mesa Version
N/A
### Capture Method
None
### Config
```Shell
output_name = 3
hevc_mode = 2
fps = [30,60,90,120]
resolutions = [
1280x720,
1920x1080,
2560x1440,
1920x1200,
2560x1600,
1280x800
]
origin_web_ui_allowed = pc
```
### Apps
_No response_
### Relevant log output
```shell
[2024:06:23:03:10:37]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2024:06:23:03:10:37]: Info: Trying encoder [videotoolbox]
[2024:06:23:03:10:37]: Info: Detecting displays
[2024:06:23:03:10:37]: Info: Detected display: Built-in Retina Display (id: 1) connected: true
[2024:06:23:03:10:37]: Info: Detected display: 28E850 (id: 3) connected: true
[2024:06:23:03:10:37]: Info: Configuring selected display (3) to stream
[2024:06:23:03:10:37]: Info: SDR color coding [Rec. 601]
[2024:06:23:03:10:37]: Info: Color depth: 8-bit
[2024:06:23:03:10:37]: Info: Color range: [JPEG]
[2024:06:23:03:10:37]: Warning: [h264_videotoolbox @ 0x107b2df90] PrioritizeEncodingSpeedOverQuality property is not supported on this device. Ignoring.
[2024:06:23:03:10:37]: Info: [h264_videotoolbox @ 0x107b2df90] This device does not support the AllowOpenGop option. Value ignored.
[2024:06:23:03:10:37]: Info: SDR color coding [Rec. 601]
[2024:06:23:03:10:37]: Info: Color depth: 8-bit
[2024:06:23:03:10:37]: Info: Color range: [JPEG]
[2024:06:23:03:10:37]: Info: SDR color coding [Rec. 601]
[2024:06:23:03:10:37]: Info: Color depth: 8-bit
[2024:06:23:03:10:37]: Info: Color range: [JPEG]
[2024:06:23:03:10:37]: Error: Couldn't open [av1_videotoolbox]
[2024:06:23:03:10:37]: Info: Detecting displays
[2024:06:23:03:10:37]: Info: Detected display: Built-in Retina Display (id: 1) connected: true
[2024:06:23:03:10:37]: Info: Detected display: 28E850 (id: 3) connected: true
[2024:06:23:03:10:37]: Info: Configuring selected display (3) to stream
[2024:06:23:03:10:37]: Info: SDR color coding [Rec. 709]
[2024:06:23:03:10:37]: Info: Color depth: 10-bit
[2024:06:23:03:10:37]: Info: Color range: [JPEG]
[2024:06:23:03:10:38]: Info:
[2024:06:23:03:10:38]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2024:06:23:03:10:38]: Info:
[2024:06:23:03:10:38]: Info: Found H.264 encoder: h264_videotoolbox [videotoolbox]
[2024:06:23:03:10:38]: Info: Found HEVC encoder: hevc_videotoolbox [videotoolbox]
[2024:06:23:03:10:38]: Info: Executing [Desktop]
[2024:06:23:03:10:38]: Info: CLIENT CONNECTED
[2024:06:23:03:10:38]: Info: Detecting displays
[2024:06:23:03:10:38]: Info: Detected display: Built-in Retina Display (id: 1) connected: true
[2024:06:23:03:10:38]: Info: Detected display: 28E850 (id: 3) connected: true
[2024:06:23:03:10:38]: Info: Configuring selected display (3) to stream
[2024:06:23:03:10:38]: Info: SDR color coding [Rec. 709]
[2024:06:23:03:10:38]: Info: Color depth: 8-bit
[2024:06:23:03:10:38]: Info: Color range: [MPEG]
[2024:06:23:03:10:38]: Error: opening microphone '' failed. Please set a valid input source in the Sunshine config.
[2024:06:23:03:10:38]: Error: Available inputs:
[2024:06:23:03:10:38]: Error: MacBook Pro Microphone
[2024:06:23:03:10:38]: Error: Unable to initialize audio capture. The stream will not have audio.
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue provides no source file or test entry point. Start by reproducing the macOS host stream with a 120 Hz display and Moonlight configured for 120 fps, then trace the macOS display and frame-timing path. Done means the stream reaches the requested 120 fps rather than remaining at 90 fps.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, macos
- Domain
- audio-video-rtc, desktop, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100