Sunshine icon indicating copy to clipboard operation
Sunshine copied to clipboard

Have to Restart PC

Open Sephodious opened this issue 3 years ago • 7 comments

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 nightly release?

  • [X] This issue is present in the nightly release

Describe the Bug

Firstly let me say that the foreground version of Sunshine does not work for me. I've made sure to check all ports, check everything that any troubleshooting or person has said to try and I cannot get moonlight to pick up sunshine unless its running on my PC as a service.

That being said, the main issue I have here is that anytime i change a setting in Sunshine localhost settings, I save and click apply, and then manually restart the Sunshinesvc and it moonlight still doesn't pick up sunshine anymore. I've tried stopping the service entirely and restarting it, uninstalling it and reinstalling it, none of it matters. The only way to get sunshine to work again through Moonlight is to restart the host PC that is running the service.

Expected Behavior

Save and Apply setting Manually restart service/auto service restart Open moonlight back up and Sunshine be available.

Additional Context

No response

Host Operating System

Windows

Operating System Version

Windows 11 Home Version 22H2 (Build 22621.1265)

Architecture

64 bit

Sunshine commit or version

0.18.3

Package

Windows - installer

GPU Type

Nvidia

GPU Model

Geforce RTX 3080 Ti

GPU Driver/Mesa Version

531.18 (Previous Driver same issue)

Capture Method (Linux Only)

No response

Config

encoder = nvenc
upnp = enabled
nv_preset = p4
resolutions = [
    352x240,
    480x360,
    858x480,
    1280x720,
    1920x1080,
    2560x1080,
    3440x1440,
    1920x1200,
    3860x2160,
    3840x1600
]
amd_usage = ultralowlatency
gamepad = x360
sunshine_name = Sunshine Streaming
origin_pin_allowed = pc
amd_vbaq = enabled
amd_rc = vbr_latency
fps = [10,30,60,90,120]
qsv_preset = medium
vt_coder = auto
nv_tune = ull
audio_sink = {0.0.0.00000000}.{0c484ff0-f558-4429-88ab-2758e0f6c7db}
vt_realtime = enabled
output_name = \\.\DISPLAY2
min_log_level = 2
adapter_name = NVIDIA GeForce RTX 3080 Ti
amd_preanalysis = disabled
nv_coder = auto
dwmflush = enabled
vt_software = auto
qsv_coder = auto
amd_quality = balanced
amd_coder = auto
origin_web_ui_allowed = lan
nv_rc = cbr
key_rightalt_to_key_win = disabled
hevc_mode = 0

Apps

No response

Relevant log output

[2023:03:06:17:52:19]: Info: Compiling shaders...
[2023:03:06:17:52:19]: Info: Compiled shaders
[2023:03:06:17:52:19]: Info: Trying encoder [nvenc]
[2023:03:06:17:52:20]: Info: ddprobe.exe [1] [\\.\DISPLAY2] returned: 0x80070005
[2023:03:06:17:52:20]: Info: Set GPU preference: 1
[2023:03:06:17:52:20]: Info: 
Device Description : NVIDIA GeForce RTX 3080 Ti
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x00002208
Device Video Mem   : 12100 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 16340 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x360
Virtual Desktop    : 5360x1440
[2023:03:06:17:52:20]: Info: Desktop resolution [1920x1080]
[2023:03:06:17:52:20]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2023:03:06:17:52:20]: Info: 
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.149414,0.0595703]
White Point        : [0.3125,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2023:03:06:17:52:20]: Info: SDR color coding [Rec. 601]
[2023:03:06:17:52:20]: Info: Color range: [JPEG]
[2023:03:06:17:52:20]: Info: 
Device Description : NVIDIA GeForce RTX 3080 Ti
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x00002208
Device Video Mem   : 12100 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 16340 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x360
Virtual Desktop    : 5360x1440
[2023:03:06:17:52:20]: Info: Desktop resolution [1920x1080]
[2023:03:06:17:52:20]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2023:03:06:17:52:20]: Info: 
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.149414,0.0595703]
White Point        : [0.3125,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2023:03:06:17:52:20]: Info: SDR color coding [Rec. 601]
[2023:03:06:17:52:20]: Info: Color range: [JPEG]
[2023:03:06:17:52:21]: Info: 
Device Description : NVIDIA GeForce RTX 3080 Ti
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x00002208
Device Video Mem   : 12100 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 16340 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x360
Virtual Desktop    : 5360x1440
[2023:03:06:17:52:21]: Info: Desktop resolution [1920x1080]
[2023:03:06:17:52:21]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2023:03:06:17:52:21]: Info: 
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.149414,0.0595703]
White Point        : [0.3125,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2023:03:06:17:52:21]: Info: SDR color coding [Rec. 601]
[2023:03:06:17:52:21]: Info: Color range: [JPEG]
[2023:03:06:17:52:22]: Info: 
Device Description : NVIDIA GeForce RTX 3080 Ti
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x00002208
Device Video Mem   : 12100 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 16340 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x360
Virtual Desktop    : 5360x1440
[2023:03:06:17:52:22]: Info: Desktop resolution [1920x1080]
[2023:03:06:17:52:22]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2023:03:06:17:52:22]: Info: 
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.149414,0.0595703]
White Point        : [0.3125,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2023:03:06:17:52:22]: Info: SDR color coding [Rec. 601]
[2023:03:06:17:52:22]: Info: Color range: [JPEG]
[2023:03:06:17:52:22]: Info: 
Device Description : NVIDIA GeForce RTX 3080 Ti
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x00002208
Device Video Mem   : 12100 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 16340 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x360
Virtual Desktop    : 5360x1440
[2023:03:06:17:52:22]: Info: Desktop resolution [1920x1080]
[2023:03:06:17:52:22]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2023:03:06:17:52:22]: Info: 
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.149414,0.0595703]
White Point        : [0.3125,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2023:03:06:17:52:22]: Info: SDR color coding [Rec. 601]
[2023:03:06:17:52:22]: Info: Color range: [JPEG]
[2023:03:06:17:52:23]: Info: 
Device Description : NVIDIA GeForce RTX 3080 Ti
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x00002208
Device Video Mem   : 12100 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 16340 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x360
Virtual Desktop    : 5360x1440
[2023:03:06:17:52:23]: Info: Desktop resolution [1920x1080]
[2023:03:06:17:52:23]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2023:03:06:17:52:23]: Info: 
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.149414,0.0595703]
White Point        : [0.3125,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2023:03:06:17:52:23]: Info: SDR color coding [Rec. 709]
[2023:03:06:17:52:23]: Info: Color range: [JPEG]
[2023:03:06:17:52:23]: Error: Could not open codec [h264_nvenc]: Function not implemented
[2023:03:06:17:52:24]: Info: 
Device Description : NVIDIA GeForce RTX 3080 Ti
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x00002208
Device Video Mem   : 12100 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 16340 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x360
Virtual Desktop    : 5360x1440
[2023:03:06:17:52:24]: Info: Desktop resolution [1920x1080]
[2023:03:06:17:52:24]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2023:03:06:17:52:24]: Info: 
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.149414,0.0595703]
White Point        : [0.3125,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2023:03:06:17:52:24]: Info: SDR color coding [Rec. 709]
[2023:03:06:17:52:24]: Info: Color range: [JPEG]
[2023:03:06:17:52:24]: Info: 
Device Description : NVIDIA GeForce RTX 3080 Ti
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x00002208
Device Video Mem   : 12100 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 16340 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x360
Virtual Desktop    : 5360x1440
[2023:03:06:17:52:24]: Info: Desktop resolution [1920x1080]
[2023:03:06:17:52:24]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2023:03:06:17:52:24]: Info: 
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.149414,0.0595703]
White Point        : [0.3125,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2023:03:06:17:52:24]: Info: SDR color coding [Rec. 601]
[2023:03:06:17:52:24]: Info: Color range: [JPEG]
[2023:03:06:17:52:25]: Info: 
Device Description : NVIDIA GeForce RTX 3080 Ti
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x00002208
Device Video Mem   : 12100 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 16340 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x360
Virtual Desktop    : 5360x1440
[2023:03:06:17:52:25]: Info: Desktop resolution [1920x1080]
[2023:03:06:17:52:25]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2023:03:06:17:52:25]: Info: 
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.149414,0.0595703]
White Point        : [0.3125,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2023:03:06:17:52:25]: Info: SDR color coding [Rec. 601]
[2023:03:06:17:52:25]: Info: Color range: [JPEG]
[2023:03:06:17:52:25]: Warning: nvenc: hevc: replacing nalu prefix data
[2023:03:06:17:52:25]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2023:03:06:17:52:25]: Info: 
[2023:03:06:17:52:25]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2023:03:06:17:52:25]: Info: 
[2023:03:06:17:52:25]: Info: Found encoder nvenc: [h264_nvenc, hevc_nvenc]
[2023:03:06:17:52:25]: Info: Configuration UI available at [https://localhost:47990]
[2023:03:06:17:52:26]: Info: Registered Sunshine mDNS service
[2023:03:06:17:52:33]: Error: A UPnP device has been found,  but it wasn't recognized as an IGD
[2023:03:06:17:57:28]: Warning: Unable to find MAC address for 127.0.0.1
[2023:03:06:18:57:28]: Warning: Unable to find MAC address for 127.0.0.1

Sephodious avatar Mar 07 '23 00:03 Sephodious

Tested on 0.18.4 and problem is still there.

Sephodious avatar Mar 07 '23 01:03 Sephodious

Can you try deleting the log file located in %WINDIR%/temp/sunshine.log when you notice that the apply does not properly restart sunshine? If it prevents you from doing so, let me know. I suspect this might be a file lock, which is causing the program to be unable to start sunshine again at the service level.

Nonary avatar Mar 09 '23 02:03 Nonary

I'll give this a try tomorrow.

I was able to fix the sunshine foreground, or non service version, not working by changing the default ports. I'm not sure what I could possibly be running that was using those ports, but I changed it to a family I know is open that I use for game servers and it is now working flawlessly.

The service restarting is still an issue though and as that is the main reason for this post I'll continue to troubleshoot until it's resolved. I'll let you know what happens when I am at my PC tomorrow.

Sephodious avatar Mar 09 '23 02:03 Sephodious

When sunshine is installed via the default settings, the "foreground" version should not be used except for troubleshooting, and only after you have manually disabled & stopped the sunshinesvc service, otherwise you will have two Sunshine processes running at the same time that will conflict.

Conflicting ports can be explained by either:

  • Running Sunshine in foreground mode while the service is already running (don't do this)
  • You forgot to turn off NVIDIA GameStream (as it conflicts with Sunshine)

psyke83 avatar Mar 26 '23 17:03 psyke83

When sunshine is installed via the default settings, the "foreground" version should not be used except for troubleshooting, and only after you have manually disabled & stopped the sunshinesvc service, otherwise you will have two Sunshine processes running at the same time that will conflict.

Conflicting ports can be explained by either:

  • Running Sunshine in foreground mode while the service is already running (don't do this)
  • You forgot to turn off NVIDIA GameStream (as it conflicts with Sunshine)

It could be Game stream as far as the ports go, I guess I assumed it was no longer enabled or even existent in the experience panel since it was removed. As for the service, yeah the OP issue was when it asks you to restart sunshine to renew with new settings.

The issue is that instead of being able to stop the service or restart it, I have to restart my entire PC after changing a setting or either of my Nvidia shields don't recognize sunshine as being open. I fixed this by just uninstalling the service and using foreground whenever I want to stream with custom ports.

Sephodious avatar Mar 26 '23 21:03 Sephodious

As of today, GFE still exists (v3.27.0.112) and will still cause problems if using the same ports as Sunshine. image

ReenigneArcher avatar Mar 26 '23 21:03 ReenigneArcher

As of today, GFE still exists (v3.27.0.112) and will still cause problems if using the same ports as Sunshine. image

Mhm, I was just saying I assumed they removed it, but I guess they didn't. Either way, using custom ports worked as well, but I'm sure now that I've disabled that, the original ports will work fine. Thanks.

Sephodious avatar Mar 26 '23 22:03 Sephodious