LizardByte / Sunshine

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

Every game crash in 10 mins #3164

Open zhishixiang opened 2 months ago

zhishixiang commented 2 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?

This issue is present in the latest pre-release

Describe the Bug

I use sunshine v2024.910.1354 in my host and moonlight v6.0.1 in my client. When I streaming and playing games it always crash in 10 mins. I tried Far Cry 5, Crysis3 Remastered and CS2 and crash without crash alert. v0.23.1 will still crash but sunshine will crash too. I tried a lot of ways but can't solve this program. image crash_cs2.exe_20240910120143_1.dmp

Expected Behavior

No response

Additional Context

No response

Host Operating System

Windows

Operating System Version

Windows11 23H2 22631.4037

Architecture

64 bit

Sunshine commit or version

v2024.910.1354

Package

Windows - installer

GPU Type

AMD

GPU Model

RX 6700XT

GPU Driver/Mesa Version

24.8.1

Capture Method

None

Config

amd_usage = lowlatency_high_quality
locale = zh
hevc_mode = 3
av1_mode = 1
min_threads = 6

Apps

No response

Relevant log output

Blue Primary       : [0.151367,0.0722656]
White Point        : [0.3125,0.328125]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2024-09-10 12:15:30.968]: Info: Desktop resolution [2560x1600]
[2024-09-10 12:15:30.968]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2024-09-10 12:15:30.968]: Info: Display refresh rate [144Hz]
[2024-09-10 12:15:30.968]: Info: Requested frame rate [120fps]
[2024-09-10 12:15:30.970]: Info: Creating encoder [hevc_amf]
[2024-09-10 12:15:30.970]: Info: Color coding: SDR (Rec. 601)
[2024-09-10 12:15:30.970]: Info: Color depth: 8-bit
[2024-09-10 12:15:30.970]: Info: Color range: MPEG
[2024-09-10 12:15:30.981]: Info: Capture format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2024-09-10 12:15:31.308]: Info: Changed virtual audio sink format to [S32 48000 2.0]
[2024-09-10 12:15:31.372]: Info: Audio capture format is [F32 48000 2.0]
[2024-09-10 12:15:31.372]: Info: Opus initialized: 48 kHz, 2 channels, 512 kbps (total), LOWDELAY
[2024-09-10 12:19:04.977]: Info: Web UI: [127.0.0.1] -- not authorized
niuzhd commented 2 months ago

Same here. The sound is continuing, but the graph is freeze, and then Sunshine server got restarted, meanwhile the game is not crash. Also on the latest nightly version the issue is the same. I will try to get the log file ( since the log will be rewrite when the service is restarted, it needs some time) My system: windows 11 24h2

[2024-09-11 22:10:14.284]: Error: No displays were found after reenumeration! [2024-09-11 22:10:14.785]: Error: Failed to locate an output device [2024-09-11 22:10:15.287]: Error: Failed to locate an output device [2024-09-11 22:10:15.989]: Error: Failed to locate an output device [2024-09-11 22:10:16.491]: Error: Failed to locate an output device [2024-09-11 22:10:16.692]: Error: No displays were found after reenumeration! [2024-09-11 22:10:17.193]: Error: Failed to locate an output device [2024-09-11 22:10:17.695]: Error: Failed to locate an output device [2024-09-11 22:10:18.397]: Error: Failed to locate an output device [2024-09-11 22:10:18.899]: Error: Failed to locate an output device [2024-09-11 22:10:19.100]: Error: No displays were found after reenumeration! [2024-09-11 22:10:19.602]: Error: Failed to locate an output device [2024-09-11 22:10:20.104]: Error: Failed to locate an output device [2024-09-11 22:10:20.806]: Error: Failed to locate an output device [2024-09-11 22:10:21.307]: Error: Failed to locate an output device [2024-09-11 22:10:21.509]: Error: No displays were found after reenumeration! [2024-09-11 22:10:21.565]: Info: CLIENT DISCONNECTED [2024-09-11 22:10:22.010]: Error: Failed to locate an output device [2024-09-11 22:10:22.512]: Error: Failed to locate an output device [2024-09-11 22:10:23.215]: Error: Failed to locate an output device [2024-09-11 22:10:23.717]: Error: Failed to locate an output device [2024-09-11 22:15:55.087]: Info: Encoder reenumeration is required [2024-09-11 22:15:55.087]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. // [2024-09-11 22:15:55.087]: Info: Trying encoder [nvenc]

Device Description : NVIDIA GeForce RTX 3060 Ti Device Vendor ID : 0x000010DE Device Device ID : 0x00002489 Device Video Mem : 8024 MiB Device Sys Mem : 0 MiB Share Sys Mem : 16324 MiB Feature Level : 0x0000B100 Capture size : 1920x1080 Offset : 0x0 Virtual Desktop : 1920x1080 2024-09-11 22:15:55.281: Info: Active GPU has HAGS enabled 2024-09-11 22:15:55.281: Info: Using realtime GPU priority

Colorspace : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709 Bits Per Color : 8 Red Primary : [0.639648,0.330078] Green Primary : [0.299805,0.599609] Blue Primary : [0.150391,0.0595703] White Point : [0.313477,0.329102] Min Luminance : 0.0657 nits Max Luminance : 1670.85 nits Max Full Luminance : 1670.85 nits

backkem commented 2 months ago

What fixed this problem for me: Right-click the desktop, go to "Display Settings" > "Graphics" > "Change default settings", then turn off "hardware-accelerated GPU scheduling".

tcamargo commented 1 month ago

What fixed this problem for me: Right-click the desktop, go to "Display Settings" > "Graphics" > "Change default settings", then turn off "hardware-accelerated GPU scheduling".

It fixes the problem, but performance drops significantly when streamming in 4K HDR 120 fps.

Wontell commented 1 month ago

OP, this is NORMAL behavior for 6700XT This is AMD bug and been unsolved for YEAR.

Some years ago, i purchased MSI 2x MECH 6700XT as backup GPU for backup PC and used it for a month to test it. I have 140TB home server that I collect movies/tv to, I usually get them in BluRay Remuxes and Encode myself.

And so i started to get what you experience, i would run encode and after sometime, could be anywhere from 3 to 4 to 10 minutes I would get either driver recover error [rarely] or PC would freeze and i had to hard reset it or i ill get BSOD, only happened when I encoded to HEVC, I could game on that GPU just fine for hours. With h.264 it happened less or not happened at all, if you have good network, try using h.264 with high bitrate and you should get same quality.

Wontell commented 1 month ago

What fixed this problem for me: Right-click the desktop, go to "Display Settings" > "Graphics" > "Change default settings", then turn off "hardware-accelerated GPU scheduling".

It fixes the problem, but performance drops significantly when streamming in 4K HDR 120 fps.

OP has 6700XT, its not 4K/120 GPU

Wontell commented 1 month ago

Same here. The sound is continuing, but the graph is freeze, and then Sunshine server got restarted, meanwhile the game is not crash. Also on the latest nightly version the issue is the same. I will try to get the log file ( since the log will be rewrite when the service is restarted, it needs some time) My system: windows 11 24h2

your issue is different and you have nvidia he has AMD, disable real time GPU priority in settings and check your encoding option, i hope you didn't use P7 mode