Sunshine
Sunshine copied to clipboard
Recurring lag spike once every 10-15 minutes
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?
I'm too lazy to test
Describe the Bug
Once about every 10-15 minutes, I get a massive spike, freezing the stream, for about 2-3 seconds. I never had the problem when running Windows, so I'm suspecting it's Linux related. Running Wayland/KDE, latest proprietary nvidia drivers, latest kernel. I'm not sure what to provide in terms of logs. The client just tells me to lower the bandwidth. Tried that, but still same problem. In between the spikes, it works flawlessly though. (I would try the beta, but lack the knowhow. I just installed through Discover in Fedora).
Expected Behavior
In Windows, it was butter smooth. Blazing fast network here, so it makes no sense.
Additional Context
No response
Host Operating System
Linux
Operating System Version
Fedora 42, kde plasma 6.4.3, Kernel 6.15.7.200
Architecture
amd64/x86_64
Sunshine commit or version
v2025.628.4510
Package
Linux - Fedora Copr
GPU Type
NVIDIA
GPU Model
RTX 4070
GPU Driver/Mesa Version
575.64.03
Capture Method
None
Config
(empty)
Apps
Relevant log output
[2025-08-01 18:58:31.824]: Info: Sunshine version: v2025.628.4510
[2025-08-01 18:58:31.824]: Info: Package Publisher: LizardByte
Prereleases are listed here: https://github.com/LizardByte/Sunshine/releases
I assume you're using flatpak, which is at the bottom of the assets and end with .flatpak.
https://docs.lizardbyte.dev/projects/sunshine/latest/md_docs_2getting__started.html#flatpak
Yes, sorry. I just double checked. Trusted the AI assistant a bit too much there which convinced me it was a native Fedora install. It's installed in /usr/bin/
Sorry again, it's actually an appimage... I'm new to Linux
Never mind, I don't have the technical knowledge to even write an issue on github. You can close this. i got the AI advice that it's most likely a "network buffer overflow" that only occurs in Linux, not windows. I will try sudo sysctl net.core.rmem_max=134217728
Some more from the log, if it's of any help: [2025-08-01 20:28:46.895]: Info: Found display [wayland-0] [2025-08-01 20:28:46.895]: Info: Found interface: zxdg_output_manager_v1(32) version 3 [2025-08-01 20:28:46.895]: Info: Found interface: zwp_linux_dmabuf_v1(57) version 5 [2025-08-01 20:28:46.895]: Info: Found interface: wl_output(120) version 4 [2025-08-01 20:28:46.896]: Warning: Missing Wayland wire for wlr-export-dmabuf [2025-08-01 20:28:46.896]: Info: /dev/dri/card2 -> nvidia-drm [2025-08-01 20:28:46.896]: Info: /dev/dri/card1 -> amdgpu [2025-08-01 20:28:46.897]: Info: Found display [wayland-0] [2025-08-01 20:28:46.897]: Info: Found display [wayland-0] [2025-08-01 20:28:46.897]: Info: Found interface: zxdg_output_manager_v1(32) version 3 [2025-08-01 20:28:46.897]: Info: Found interface: zwp_linux_dmabuf_v1(57) version 5 [2025-08-01 20:28:46.897]: Info: Found interface: wl_output(120) version 4 [2025-08-01 20:28:46.897]: Info: Resolution: 5120x1440 [2025-08-01 20:28:46.897]: Info: Offset: 0x0 [2025-08-01 20:28:46.898]: Info: Logical size: 4452x1252 [2025-08-01 20:28:46.898]: Info: Name: DP-4 [2025-08-01 20:28:46.898]: Info: Found monitor: Samsung Electric Company Odyssey G93SC [2025-08-01 20:28:46.898]: Info: -------- Start of KMS monitor list -------- [2025-08-01 20:28:46.898]: Info: --------- End of KMS monitor list --------- [2025-08-01 20:28:47.041]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. // [2025-08-01 20:28:47.041]: Info: Trying encoder [nvenc] [2025-08-01 20:28:47.041]: Info: Screencasting with KMS [2025-08-01 20:28:47.041]: Info: /dev/dri/card2 -> nvidia-drm [2025-08-01 20:28:47.041]: Info: Found monitor for DRM screencasting [2025-08-01 20:28:47.041]: Info: Found connector ID [130] [2025-08-01 20:28:47.042]: Info: Found cursor plane [55] [2025-08-01 20:28:47.042]: Info: Creating encoder [h264_nvenc] [2025-08-01 20:28:47.042]: Info: Color coding: SDR (Rec. 601) [2025-08-01 20:28:47.042]: Info: Color depth: 8-bit [2025-08-01 20:28:47.042]: Info: Color range: JPEG [2025-08-01 20:28:47.193]: Info: Streaming bitrate is 1000000 [2025-08-01 20:28:47.455]: Info: Creating encoder [hevc_nvenc] [2025-08-01 20:28:47.455]: Info: Color coding: SDR (Rec. 601) [2025-08-01 20:28:47.455]: Info: Color depth: 8-bit [2025-08-01 20:28:47.455]: Info: Color range: JPEG [2025-08-01 20:28:47.457]: Info: Streaming bitrate is 1000000 [2025-08-01 20:28:47.719]: Info: Creating encoder [av1_nvenc] [2025-08-01 20:28:47.719]: Info: Color coding: SDR (Rec. 601) [2025-08-01 20:28:47.719]: Info: Color depth: 8-bit [2025-08-01 20:28:47.719]: Info: Color range: JPEG [2025-08-01 20:28:47.720]: Info: Streaming bitrate is 1000000 [2025-08-01 20:28:47.982]: Info: Screencasting with KMS [2025-08-01 20:28:47.982]: Info: /dev/dri/card2 -> nvidia-drm [2025-08-01 20:28:47.982]: Info: Found monitor for DRM screencasting [2025-08-01 20:28:47.982]: Info: Found connector ID [130] [2025-08-01 20:28:47.982]: Info: Found cursor plane [55] [2025-08-01 20:28:47.982]: Info: Creating encoder [hevc_nvenc] [2025-08-01 20:28:47.982]: Info: Color coding: HDR (Rec. 2020 + SMPTE 2084 PQ) [2025-08-01 20:28:47.982]: Info: Color depth: 10-bit [2025-08-01 20:28:47.982]: Info: Color range: JPEG [2025-08-01 20:28:47.984]: Info: Streaming bitrate is 1000000 [2025-08-01 20:28:48.246]: Info: Creating encoder [av1_nvenc] [2025-08-01 20:28:48.246]: Info: Color coding: HDR (Rec. 2020 + SMPTE 2084 PQ) [2025-08-01 20:28:48.246]: Info: Color depth: 10-bit [2025-08-01 20:28:48.246]: Info: Color range: JPEG [2025-08-01 20:28:48.248]: Info: Streaming bitrate is 1000000 [2025-08-01 20:28:48.510]: Info: [2025-08-01 20:28:48.510]: Info: // Ignore any errors mentioned above, they are not relevant. // [2025-08-01 20:28:48.510]: Info: [2025-08-01 20:28:48.510]: Info: Found H.264 encoder: h264_nvenc [nvenc] [2025-08-01 20:28:48.510]: Info: Found HEVC encoder: hevc_nvenc [nvenc] [2025-08-01 20:28:48.510]: Info: Found AV1 encoder: av1_nvenc [nvenc] [2025-08-01 20:28:48.511]: Info: Adding avahi service Mainframe [2025-08-01 20:28:48.512]: Info: Configuration UI available at [https://localhost:47990] [2025-08-01 20:28:49.290]: Info: Avahi service Mainframe successfully established. [2025-08-01 20:29:01.449]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. // [2025-08-01 20:29:01.449]: Info: Trying encoder [nvenc]
Looks like I have the same issue but appearing way more frequently, once per few minutes. The stream freezes for multiple seconds. Between them - everything works flawlessly. Issues started to occur when I upgraded to the latest stable version. Also did a try with latest pre-release, but the issue is still present.
My setup: Host: unRAID 7.1.4 Guest: Windows 11 GPU: RTX4060 passthrough
I tried two different clien machines: Windows 11 Pro (latest Moonlight): 4k resolution Steam Deck (latest Moonlight): 1280x800 resolution
No difference, unfortunately.
The log I'm attaching was done in DEBUG mode. During session two freezes occured. I can see bunch of logs:
[2025-08-03 13:56:55.957]: Error: NvEnc: frame 10477 encode wait timeout [2025-08-03 13:56:55.957]: Error: NvENC returned empty packet [2025-08-03 13:56:55.957]: Error: Could not encode video packet
I don't know if this is normal, started to browse logs as I encountered issues. Let me know if you need further details.
P.S. If it helps - when the freeze occurs, sometime when I tried reconnectig my client it was saying that it did not receive the video stream from the server.
Today I rolled back my VM with following versions: Sunshine: v2025.122.141614 NVIDIA Driver: 576.80
Everything works perfectly, no freezes, no issues. I also updated the NVIDIA driver to the latest available version 580.88 and still no issues. Most likely the problem is related to Sunshine itself.
It seems this issue hasn't had any activity in the past 90 days. If it's still something you'd like addressed, please let us know by leaving a comment. Otherwise, to help keep our backlog tidy, we'll be closing this issue in 10 days. Thanks!