LizardByte / Sunshine

Self-hosted game stream host for Moonlight.
http://app.lizardbyte.dev/Sunshine/
GNU General Public License v3.0
18.42k stars 893 forks source link

Sunshine causes minecraft java edition to flicker when vsync is on #2639

Closed EpicGamenator closed 3 months ago

EpicGamenator commented 3 months ago

Is there an existing issue for this?

Is your issue described in the documentation?

Is your issue present in the latest beta/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

key_rightalt_to_key_win = enabled
resolutions = [
    1280x720,
    1920x1080,
    1920x1200,
    1280x800
]
fps = [60]
av1_mode = 1

Apps

No response

Relevant log output

[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
Kane-Kuroneko commented 3 months ago

Trying to play Minecraft Java Edition with Vsync on causes the screen to flicker black regardless of if Sunshine is currently steaming or not

It seems there is no relationship between the sunshine and MC Java.

Monoverde888 commented 3 months ago

if it still happens without sunshine its not a sunshine problem

EpicGamenator commented 3 months ago

if it still happens without sunshine its not a sunshine problem

The flickering only happens when sunshine is on in the background and minecraft's vsync is on

ReenigneArcher commented 3 months ago

I believe the suggestion is to disable vsync in most cases...

EpicGamenator commented 3 months ago

I believe the suggestion is to disable vsync in most cases...

I usually have vsync off for games that I play with sunshine, however I don't stream minecraft java edition. The flickering appears when I am playing at my desktop

EpicGamenator commented 3 months ago

Update: Enabling triple buffering seems to have stoped the flickering

cherbert commented 3 months ago

if it still happens without sunshine its not a sunshine problem

Yes it absolutely is a Sunshine problem. Can confirm if I remove Sunshine flickering goes away. This happened yesterday when I updated Sunshine the latest version.

Kane-Kuroneko commented 3 months ago

if it still happens without sunshine its not a sunshine problem如果没有阳光仍然发生,则不是阳光问题

Yes it absolutely is a Sunshine problem. Can confirm if I remove Sunshine flickering goes away. This happened yesterday when I updated Sunshine the latest version.是的,这绝对是一个阳光问题。可以确认如果我删除阳光闪烁就会消失。昨天我更新Sunshine 最新版本时发生了这种情况。

Have you ever tried to downgrade your GPU driver?