LizardByte / LizardByte/Sunshine
Sunshine causes minecraft java edition to flicker when vsync is on
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 latest pre-release
### Describe the Bug
Trying to play Minecraft Java Edition with Vsync on causes the screen to flicker black regardless of if Sunshine is currently steaming or not
### Expected Behavior
Game should not flicker.
### Additional Context
Disabling Vsync and using an override from the Nvidia control panel or shutting down sunshine stops the flickering from occuring
### Host Operating System
Windows
### Operating System Version
22H2
### Architecture
64 bit
### Sunshine commit or version
v2024.601.193044
### Package
Windows - installer
### GPU Type
Nvidia
### GPU Model
Geforce Rtx 2060 6GB
### GPU Driver/Mesa Version
555.99
### Capture Method (Linux Only)
_No response_
### Config
```Shell
key_rightalt_to_key_win = enabled
resolutions = [
1280x720,
1920x1080,
1920x1200,
1280x800
]
fps = [60]
av1_mode = 1
```
### Apps
_No response_
### Relevant log output
```shell
[2024:06:06:13:14:17]: Info: Sunshine version: v2024.601.193044
[2024:06:06:13:14:17]: Info: nvprefs: No need to modify application profile settings
[2024:06:06:13:14:17]: Info: nvprefs: Changed OGL_CPL_PREFER_DXPRESENT to OGL_CPL_PREFER_DXPRESENT_PREFER_ENABLED for base profile
[2024:06:06:13:14:17]: Info: Compiling shaders...
[2024:06:06:13:14:17]: Info: System tray created
[2024:06:06:13:14:17]: Info: Compiled shaders
[2024:06:06:13:14:17]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2024:06:06:13:14:17]: Info: Trying encoder [nvenc]
[2024:06:06:13:14:18]: Info: ddprobe.exe [1] [] returned: 0x00000000
[2024:06:06:13:14:18]: Info: Set GPU preference: 1
[2024:06:06:13:14:18]: Info:
Device Description : NVIDIA GeForce RTX 2060
Device Vendor ID : 0x000010DE
Device Device ID : 0x00001E89
Device Video Mem : 5945 MiB
Device Sys Mem : 0 MiB
Share Sys Mem : 8145 MiB
Feature Level : 0x0000B100
Capture size : 1920x1080
Offset : 0x0
Virtual Desktop : 1920x1080
[2024:06:06:13:14:18]: Info: Active GPU has HAGS disabled
[2024:06:06:13:14:18]: Info: Using realtime GPU priority
[2024:06:06:13:14:18]: Info:
Colorspace : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color : 8
Red Primary : [0.647461,0.333984]
Green Primary : [0.28418,0.607422]
Blue Primary : [0.151367,0.0712891]
White Point : [0.313477,0.329102]
Min Luminance : 0.5 nits
Max Luminance : 270 nits
Max Full Luminance : 270 nits
[2024:06:06:13:14:18]: Info: Desktop resolution [1920x1080]
[2024:06:06:13:14:18]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2024:06:06:13:14:18]: Info: Display refresh rate [60Hz]
[2024:06:06:13:14:18]: Info: Requested frame rate [60fps]
[2024:06:06:13:14:18]: Info: SDR color coding [Rec. 601]
[2024:06:06:13:14:18]: Info: Color depth: 8-bit
[2024:06:06:13:14:18]: Info: Color range: [JPEG]
[2024:06:06:13:14:18]: Info: NvEnc: created encoder P1 two-pass rfi
[2024:06:06:13:14:18]: Info: SDR color coding [Rec. 601]
[2024:06:06:13:14:18]: Info: Color depth: 8-bit
[2024:06:06:13:14:18]: Info: Color range: [JPEG]
[2024:06:06:13:14:18]: Info: NvEnc: created encoder P1 two-pass rfi
[2024:06:06:13:14:18]: Info:
Device Description : NVIDIA GeForce RTX 2060
Device Vendor ID : 0x000010DE
Device Device ID : 0x00001E89
Device Video Mem : 5945 MiB
Device Sys Mem : 0 MiB
Share Sys Mem : 8145 MiB
Feature Level : 0x0000B100
Capture size : 1920x1080
Offset : 0x0
Virtual Desktop : 1920x1080
[2024:06:06:13:14:18]: Info: Active GPU has HAGS disabled
[2024:06:06:13:14:18]: Info: Using realtime GPU priority
[2024:06:06:13:14:18]: Info:
Colorspace : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color : 8
Red Primary : [0.647461,0.333984]
Green Primary : [0.28418,0.607422]
Blue Primary : [0.151367,0.0712891]
White Point : [0.313477,0.329102]
Min Luminance : 0.5 nits
Max Luminance : 270 nits
Max Full Luminance : 270 nits
[2024:06:06:13:14:18]: Info: Desktop resolution [1920x1080]
[2024:06:06:13:14:18]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2024:06:06:13:14:18]: Info: Display refresh rate [60Hz]
[2024:06:06:13:14:18]: Info: Requested frame rate [60fps]
[2024:06:06:13:14:18]: Info: SDR color coding [Rec. 709]
[2024:06:06:13:14:19]: Info: Color depth: 10-bit
[2024:06:06:13:14:19]: Info: Color range: [JPEG]
[2024:06:06:13:14:19]: Info: NvEnc: created encoder P1 10-bit two-pass rfi
[2024:06:06:13:14:19]: Info:
[2024:06:06:13:14:19]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2024:06:06:13:14:19]: Info:
[2024:06:06:13:14:19]: Info: Found H.264 encoder: h264_nvenc [nvenc]
[2024:06:06:13:14:19]: Info: Found HEVC encoder: hevc_nvenc [nvenc]
[2024:06:06:13:14:19]: Info: Registered Sunshine mDNS service
[2024:06:06:13:14:20]: Info: Configuration UI available at [https://localhost:47990]
[2024:06:06:13:18:35]: Info: Web UI: [127.0.0.1] -- not authorized
```
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
Start by reproducing the black flicker on Windows 22H2 with an RTX 2060, Minecraft Java Edition, Vsync enabled, and Sunshine v2024.601.193044; compare behavior with Vsync disabled, an NVIDIA Control Panel override, and Sunshine stopped. Done means identifying the interaction that causes the flicker and preventing it without breaking desktop capture or streaming.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100