Screen tearing / black stripes on high GPU load #76
-
Describe the BugScreen tearing happens in the upper bit of the screen. Expected BehaviorThe screen doesn't tear at any moment and no black stripes appear. Additional ContextOnly seems to happen when the GPU is under heavy load (more demanding games, where the framerate may not be so stable / may drop below vsync). From the games I tried, it seems to be most prevalent in The Witcher 3. Doesn't seem to happen in games, where the framerate is way above vsync. It may be good to mention, that my setup is a bit special. I'm running sunshine on a headless machine with My client laptop (using moonlight) has a 120hz screen as opposed to the emulated display's 60hz, but I don't think that could cause the issue. Host Operating SystemLinux Operating System Version5.19.7-arch1-1 Architecture64 bit Sunshine Version0.14.1 GPU TypeNvidia GPU ModelGeForce GTX 1060 6GB GPU Driver/Mesa Version515.65.01-12 Capture Method (Linux Only)X11 Relevant log output[vt_software] -- [auto]
[amd_quality] -- [default]
[origin_web_ui_allowed] -- [lan]
[min_log_level] -- [2]
[origin_pin_allowed] -- [pc]
[resolutions] -- [[
352x240,
480x360,
858x480,
1280x720,
1920x1080,
2560x1080,
3440x1440,
1920x1200,
3860x2160,
3840x1600
]]
[nv_coder] -- [cabac]
[key_rightalt_to_key_win] -- [disabled]
[vt_realtime] -- [enabled]
[vt_coder] -- [auto]
[fps] -- [[10,30,60,90,120]]
[gamepad] -- [x360]
[nv_preset] -- [hq]
[upnp] -- [disabled]
[amd_coder] -- [auto]
[dwmflush] -- [enabled]
[nv_rc] -- [cbr]
[hevc_mode] -- [0]
[encoder] -- [nvenc]
[amd_rc] -- [auto]
[2022:09:06:23:56:10]: Error: Failed to gain CAP_SYS_ADMIN
[2022:09:06:23:56:11]: Error: Environment variable WAYLAND_DISPLAY has not been defined
[2022:09:06:23:56:11]: Info: Detecting connected monitors
[2022:09:06:23:56:11]: Info: //////////////////////////////////////////////////////////////////
[2022:09:06:23:56:11]: Info: // //
[2022:09:06:23:56:11]: Info: // Testing for available encoders, this may generate errors. //
[2022:09:06:23:56:11]: Info: // You can safely ignore those errors. //
[2022:09:06:23:56:11]: Info: // //
[2022:09:06:23:56:11]: Info: //////////////////////////////////////////////////////////////////
[2022:09:06:23:56:11]: Info: Trying encoder [nvenc]
[2022:09:06:23:56:11]: Info: Screencasting with X11
[2022:09:06:23:56:11]: Info: Color coding [Rec. 601]
[2022:09:06:23:56:11]: Info: Color range: [JPEG]
[2022:09:06:23:56:11]: Error: Could not open codec [h264_nvenc]: Function not implemented
[2022:09:06:23:56:11]: Info: Screencasting with X11
[2022:09:06:23:56:11]: Info: Color coding [Rec. 601]
[2022:09:06:23:56:11]: Info: Color range: [JPEG]
[2022:09:06:23:56:12]: Info: Screencasting with X11
[2022:09:06:23:56:12]: Info: Color coding [Rec. 601]
[2022:09:06:23:56:12]: Info: Color range: [JPEG]
[2022:09:06:23:56:12]: Info: Screencasting with X11
[2022:09:06:23:56:12]: Info: Color coding [Rec. 601]
[2022:09:06:23:56:12]: Info: Color range: [JPEG]
[2022:09:06:23:56:12]: Error: Could not open codec [hevc_nvenc]: Function not implemented
[2022:09:06:23:56:12]: Info: Screencasting with X11
[2022:09:06:23:56:12]: Info: Color coding [Rec. 601]
[2022:09:06:23:56:12]: Info: Color range: [JPEG]
[2022:09:06:23:56:12]: Info: Screencasting with X11
[2022:09:06:23:56:12]: Info: Color coding [Rec. 709]
[2022:09:06:23:56:12]: Info: Color range: [JPEG]
[2022:09:06:23:56:12]: Error: Could not open codec [h264_nvenc]: Function not implemented
[2022:09:06:23:56:12]: Info: Screencasting with X11
[2022:09:06:23:56:12]: Info: Color coding [Rec. 709]
[2022:09:06:23:56:12]: Info: Color range: [JPEG]
[2022:09:06:23:56:12]: Info: Screencasting with X11
[2022:09:06:23:56:12]: Info: Color coding [Rec. 601]
[2022:09:06:23:56:12]: Info: Color range: [JPEG]
[2022:09:06:23:56:12]: Info: Screencasting with X11
[2022:09:06:23:56:12]: Info: Color coding [Rec. 601]
[2022:09:06:23:56:12]: Info: Color range: [JPEG]
[2022:09:06:23:56:12]: Warning: nvenc: hevc: replacing nalu prefix data
[2022:09:06:23:56:12]: Info:
[2022:09:06:23:56:12]: Info: //////////////////////////////////////////////////////////////
[2022:09:06:23:56:12]: Info: // //
[2022:09:06:23:56:12]: Info: // Ignore any errors mentioned above, they are not relevant //
[2022:09:06:23:56:12]: Info: // //
[2022:09:06:23:56:12]: Info: //////////////////////////////////////////////////////////////
[2022:09:06:23:56:12]: Info:
[2022:09:06:23:56:12]: Info: Found encoder nvenc: [h264_nvenc, hevc_nvenc]
[2022:09:06:23:56:12]: Info: Configuration UI available at [https://localhost:47990]
[2022:09:06:23:56:12]: Info: Adding avahi service Sunshine
[2022:09:06:23:56:13]: Info: Avahi service Sunshine successfully established.
[2022:09:06:23:56:20]: Error: Couldn't discover any UPNP devices
[2022:09:06:23:56:26]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:56:26]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:56:29]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:56:32]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:56:32]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:56:32]: Info: CLIENT CONNECTED
[2022:09:06:23:56:32]: Info: Detecting connected monitors
[2022:09:06:23:56:32]: Info: Screencasting with X11
[2022:09:06:23:56:32]: Info: Configuring selected monitor (0) to stream
[2022:09:06:23:56:32]: Info: Streaming display: HDMI-1 with res 1920x1080 offset by 0x0
[2022:09:06:23:56:32]: Info: Color coding [Rec. 601]
[2022:09:06:23:56:32]: Info: Color range: [MPEG]
[2022:09:06:23:56:33]: Info: Setting default sink to: [sink-sunshine-stereo]
[2022:09:06:23:56:33]: Info: Found default monitor by name: sink-sunshine-stereo.monitor
[2022:09:06:23:58:03]: Info: CLIENT DISCONNECTED
[2022:09:06:23:58:03]: Info: Setting default sink to: [auto_null]
[2022:09:06:23:58:03]: Error: Couldn't set default-sink [auto_null]: No such entity
[2022:09:06:23:58:03]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:03]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:06]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:09]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:12]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:12]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:13]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:13]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:13]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:15]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:15]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:15]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:15]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:15]: Info: CLIENT CONNECTED
[2022:09:06:23:58:15]: Info: Detecting connected monitors
[2022:09:06:23:58:15]: Info: Screencasting with X11
[2022:09:06:23:58:15]: Info: Configuring selected monitor (0) to stream
[2022:09:06:23:58:15]: Info: Streaming display: HDMI-1 with res 1920x1080 offset by 0x0
[2022:09:06:23:58:15]: Info: Color coding [Rec. 601]
[2022:09:06:23:58:15]: Info: Color range: [MPEG]
[2022:09:06:23:58:16]: Info: Setting default sink to: [sink-sunshine-stereo]
[2022:09:06:23:58:16]: Info: Found default monitor by name: sink-sunshine-stereo.monitor
[2022:09:06:23:58:18]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:21]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:24]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:27]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:30]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:30]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:31]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:31]: Info: CLIENT DISCONNECTED
[2022:09:06:23:58:31]: Info: Setting default sink to: [auto_null]
[2022:09:06:23:58:31]: Error: Couldn't set default-sink [auto_null]: No such entity
[2022:09:06:23:58:32]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:32]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:33]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:34]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:37]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:38]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:38]: Info: CLIENT CONNECTED
[2022:09:06:23:58:38]: Info: Detecting connected monitors
[2022:09:06:23:58:38]: Info: Screencasting with X11
[2022:09:06:23:58:38]: Info: Configuring selected monitor (0) to stream
[2022:09:06:23:58:38]: Info: Streaming display: HDMI-1 with res 1920x1080 offset by 0x0
[2022:09:06:23:58:38]: Info: Color coding [Rec. 601]
[2022:09:06:23:58:38]: Info: Color range: [MPEG]
[2022:09:06:23:58:39]: Info: Setting default sink to: [sink-sunshine-stereo]
[2022:09:06:23:58:39]: Info: Found default monitor by name: sink-sunshine-stereo.monitor
[2022:09:06:23:58:46]: Info: CLIENT DISCONNECTED
[2022:09:06:23:58:46]: Info: Setting default sink to: [auto_null]
[2022:09:06:23:58:46]: Error: Couldn't set default-sink [auto_null]: No such entity
[2022:09:06:23:58:49]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:52]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:55]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:58:58]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:59:02]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:59:05]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:59:08]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:59:11]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:59:14]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:59:17]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:59:17]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:59:20]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:59:23]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:59:26]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:59:29]: Info: /CN=NVIDIA GameStream Client -- verified
[2022:09:06:23:59:32]: Info: /CN=NVIDIA GameStream Client -- verified |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 8 replies
-
This is not a bug in Sunshine... Lower your graphic settings in games where this happens. Or invest in a stronger GPU. Sunshine needs to be able to utilize some of the GPU resources as well. If there's no resources available, how do you expect Sunshine as if they are available? |
Beta Was this translation helpful? Give feedback.
-
You are screencasting with X11. You could considerably reduce the load on your encoder and on your CPU thread running sunshine by patching nvidia drivers (install nvidia-utils-nvlax from AUR in place of nvidia-utils). Make sure cuda is available before building sunshine If working your log will say: See also https://github.com/LizardByte/Sunshine/discussions/99#discussioncomment-2368858 |
Beta Was this translation helpful? Give feedback.
-
I see the same top-of-screen tearing on my setup, and haven't figured out how to fix it. My host machine is Windows 10, with a Ryzen 5 5600 and an RX 6900xt. This top-of-screen tearing happens even when the CPU and GPU are comfortably far from maxed out, when the GPU is in like 60% usage range or less, even (and CPU <40%). My client machine is running moonlight on Ubuntu with an admittedly-weak i5-4590 and RX 480; would that be the root cause of the issue? |
Beta Was this translation helpful? Give feedback.
You are screencasting with X11. You could considerably reduce the load on your encoder and on your CPU thread running sunshine by patching nvidia drivers (install nvidia-utils-nvlax from AUR in place of nvidia-utils). Make sure cuda is available before building sunshine
If working your log will say:
screencasting with NvFBC
See also https://github.com/LizardByte/Sunshine/discussions/99#discussioncomment-2368858