Skip to content

HDR does not revert to On State upon disconnect #3580

@lyndonguitar

Description

@lyndonguitar

Is there an existing issue for this?

  • I have searched the existing issues

Is your issue described in the documentation?

  • I have read the documentation

Is your issue present in the latest beta/pre-release?

None

Describe the Bug

Image

I am running into problems where a non-HDR client will turn off my HDR host as requested/expected, but upon full disconnect, it will not turn back on the HDR, but all other parameters (resolution+refresh rate) are reverted successfully.

Expected Behavior

Upon disconnect, HDR should be reverted to turned on state, if host has HDR on.

Additional Context

I reported it here before FrogTheFrog#2 (comment)
But I was not able to respond to @FrogTheFrog on time.

sunshine logs.txt

Host Operating System

Windows

Operating System Version

Win 11 24H2 Build 26100.2894

Architecture

amd64/x86_64

Sunshine commit or version

Sunshine v2025.118.151840

Package

Windows - installer (recommended)

GPU Type

AMD

GPU Model

RTX 3080

GPU Driver/Mesa Version

566.36

Capture Method

None

Config

upnp = enabled
display_mode_remapping = [{"type":"","received_resolution":"1680x1050","received_fps":"60","final_resolution":"2560x1600","final_refresh_rate":"60"},{"type":"","received_resolution":"1920x1080","received_fps":"60","final_resolution":"2560x1440","final_refresh_rate":"60"},{"type":"","received_resolution":"1920x1200","received_fps":"60","final_resolution":"2560x1600","final_refresh_rate":"60"},{"type":"","received_resolution":"1280x800","received_fps":"60","final_resolution":"2560x1600","final_refresh_rate":"60"},{"type":"","received_resolution":"","received_fps":"120","final_resolution":"2560x1440","final_refresh_rate":"120"},{"type":"","received_resolution":"3840x2160","received_fps":"60","final_resolution":"3840x2160","final_refresh_rate":"60"},{"type":"","received_resolution":"","received_fps":"","final_resolution":"","final_refresh_rate":""}]
fps = [10,30,60,90,120,144]
encoder = nvenc
dd_mode_remapping = {"mixed":[{"requested_fps":"","final_refresh_rate":"","requested_resolution":"1920x1080","final_resolution":"3840x2160"},{"requested_fps":"","final_refresh_rate":"","requested_resolution":"3840x2160","final_resolution":"3840x2160"},{"requested_fps":"","final_refresh_rate":"","requested_resolution":"2560x1440","final_resolution":"3840x2160"},{"requested_fps":"","final_refresh_rate":"","requested_resolution":"1280x800","final_resolution":"2560x1600"},{"requested_fps":"","final_refresh_rate":"","requested_resolution":"1920x1200","final_resolution":"2560x1600"},{"requested_fps":"","final_refresh_rate":"","requested_resolution":"1680x1050","final_resolution":"2560x1600"}],"resolution_only":[{"requested_resolution":"3840x2160","final_resolution":"3840x2160"},{"requested_resolution":"2560x1440","final_resolution":"3840x2160"},{"requested_resolution":"","final_resolution":""}],"refresh_rate_only":[]}
resolutions = [
    352x240,
    480x360,
    858x480,
    1280x720,
    1920x1080,
    2560x1080,
    3440x1440,
    1920x1200,
    3840x2160,
    3840x1600,
    2560x1440,
    1680x1050,
    2560x1600,
    1600x900
]
address_family = both
ping_timeout = 72000000
channels = 2
capture = ddx
display_device_prep = ensure_only_display
back_button_timeout = 2000

Apps

Relevant log output

[2025-01-23 00:37:34.428]: Info: Remapping requested display mode. Entry:
  - requested resolution: 1280x800
  - requested FPS: 
  - final resolution: 2560x1600
  - final refresh rate: 
[2025-01-23 00:37:34.456]: Info: Trying to apply display device settings. API is available: true
[2025-01-23 00:37:34.457]: Info: Using the following configuration:
{
  "device_id": "",
  "device_prep": "VerifyOnly",
  "hdr_state": "Disabled",
  "refresh_rate": {
    "type": "rational",
    "value": {
      "denominator": 1,
      "numerator": 60
    }
  },
  "resolution": {
    "height": 1600,
    "width": 2560
  }
}
[2025-01-23 00:37:34.457]: Info: Active topology before any changes:
[
  [
    "{64106ff7-725a-525c-a3b8-38ebaaab7a12}"
  ]
]
[2025-01-23 00:37:34.459]: Info: Currently available devices:
[
  {
    "device_id": "{64106ff7-725a-525c-a3b8-38ebaaab7a12}",
    "display_name": "\\\\.\\DISPLAY1",
    "friendly_name": "LG TV SSCR2",
    "info": {
      "hdr_state": "Enabled",
      "origin_point": {
        "x": 0,
        "y": 0
      },
      "primary": true,
      "refresh_rate": {
        "type": "rational",
        "value": {
          "denominator": 1000,
          "numerator": 143988
        }
      },
      "resolution": {
        "height": 2160,
        "width": 3840
      },
      "resolution_scale": {
        "type": "rational",
        "value": {
          "denominator": 100,
          "numerator": 125
        }
      }
    }
  }
]
[2025-01-23 00:37:34.459]: Info: Will compute new display device topology from the following input:
  - initial topology: [["{64106ff7-725a-525c-a3b8-38ebaaab7a12}"]]
  - initial primary devices: ["{64106ff7-725a-525c-a3b8-38ebaaab7a12}"]
  - configuring unspecified device: true
  - device to configure: "{64106ff7-725a-525c-a3b8-38ebaaab7a12}"
  - additional devices to configure: []
[2025-01-23 00:37:34.459]: Info: Newly computed display device topology data:
  - topology: [["{64106ff7-725a-525c-a3b8-38ebaaab7a12}"]]
  - change is needed: false
  - additional devices to configure: []
[2025-01-23 00:37:34.459]: Info: Changing display modes to:
{
  "{64106ff7-725a-525c-a3b8-38ebaaab7a12}": {
    "refresh_rate": {
      "denominator": 1,
      "numerator": 60
    },
    "resolution": {
      "height": 1600,
      "width": 2560
    }
  }
}
[2025-01-23 00:37:35.182]: Info: Changing HDR states to:
{
  "{64106ff7-725a-525c-a3b8-38ebaaab7a12}": "Disabled"
}
[2025-01-23 00:37:35.946]: Info: Encoder reenumeration is required
[2025-01-23 00:37:35.946]: Info: Trying encoder [nvenc]
[2025-01-23 00:37:36.415]: Info: 
Device Description : NVIDIA GeForce RTX 3080
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x00002206
Device Video Mem   : 10053 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 16345 MiB
Feature Level      : 0x0000B100
Capture size       : 2560x1600
Offset             : 0x0
Virtual Desktop    : 2560x1600
[2025-01-23 00:37:36.415]: Info: Active GPU has HAGS enabled
[2025-01-23 00:37:36.415]: Info: Using realtime GPU priority
[2025-01-23 00:37:36.415]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 10
Red Primary        : [0.639646,0.330079]
Green Primary      : [0.299805,0.59961]
Blue Primary       : [0.150393,0.0595684]
White Point        : [0.3125,0.329098]
Min Luminance      : 0.0449 nits
Max Luminance      : 3600 nits
Max Full Luminance : 3600 nits
[2025-01-23 00:37:36.540]: Info: Desktop resolution [2560x1600]
[2025-01-23 00:37:36.540]: Info: Desktop format [DXGI_FORMAT_R16G16B16A16_FLOAT]
[2025-01-23 00:37:36.540]: Info: Display refresh rate [60Hz]
[2025-01-23 00:37:36.540]: Info: Requested frame rate [60fps]
[2025-01-23 00:37:36.540]: Info: Creating encoder [h264_nvenc]
[2025-01-23 00:37:36.540]: Info: Color coding: SDR (Rec. 601)
[2025-01-23 00:37:36.540]: Info: Color depth: 8-bit
[2025-01-23 00:37:36.540]: Info: Color range: JPEG
[2025-01-23 00:37:36.632]: Info: NvEnc: created encoder H.264 P1 two-pass rfi
[2025-01-23 00:37:36.684]: Info: Creating encoder [hevc_nvenc]
[2025-01-23 00:37:36.684]: Info: Color coding: SDR (Rec. 601)
[2025-01-23 00:37:36.684]: Info: Color depth: 8-bit
[2025-01-23 00:37:36.684]: Info: Color range: JPEG
[2025-01-23 00:37:36.790]: Info: NvEnc: created encoder HEVC P1 two-pass rfi
[2025-01-23 00:37:36.844]: Info: Creating encoder [av1_nvenc]
[2025-01-23 00:37:36.844]: Info: Color coding: SDR (Rec. 601)
[2025-01-23 00:37:36.844]: Info: Color depth: 8-bit
[2025-01-23 00:37:36.844]: Info: Color range: JPEG
[2025-01-23 00:37:36.894]: Error: NvEnc: encoding format is not supported by the gpu
[2025-01-23 00:37:36.917]: Info: Creating encoder [h264_nvenc]
[2025-01-23 00:37:36.917]: Info: Color coding: SDR (Rec. 601)
[2025-01-23 00:37:36.917]: Info: Color depth: 8-bit
[2025-01-23 00:37:36.917]: Info: Color range: JPEG
[2025-01-23 00:37:37.001]: Info: NvEnc: created encoder H.264 P1 yuv444 two-pass rfi
[2025-01-23 00:37:37.396]: Info: 
Device Description : NVIDIA GeForce RTX 3080
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x00002206
Device Video Mem   : 10053 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 16345 MiB
Feature Level      : 0x0000B100
Capture size       : 2560x1600
Offset             : 0x0
Virtual Desktop    : 2560x1600
[2025-01-23 00:37:37.396]: Info: Active GPU has HAGS enabled
[2025-01-23 00:37:37.397]: Info: Using realtime GPU priority
[2025-01-23 00:37:37.397]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 10
Red Primary        : [0.639646,0.330079]
Green Primary      : [0.299805,0.59961]
Blue Primary       : [0.150393,0.0595684]
White Point        : [0.3125,0.329098]
Min Luminance      : 0.0449 nits
Max Luminance      : 3600 nits
Max Full Luminance : 3600 nits
[2025-01-23 00:37:37.412]: Info: Desktop resolution [2560x1600]
[2025-01-23 00:37:37.412]: Info: Desktop format [DXGI_FORMAT_R16G16B16A16_FLOAT]
[2025-01-23 00:37:37.412]: Info: Display refresh rate [60Hz]
[2025-01-23 00:37:37.412]: Info: Requested frame rate [60fps]
[2025-01-23 00:37:37.412]: Info: Creating encoder [hevc_nvenc]
[2025-01-23 00:37:37.412]: Info: Color coding: SDR (Rec. 709)
[2025-01-23 00:37:37.412]: Info: Color depth: 10-bit
[2025-01-23 00:37:37.412]: Info: Color range: JPEG
[2025-01-23 00:37:37.625]: Info: NvEnc: created encoder HEVC P1 yuv444 10-bit two-pass rfi
[2025-01-23 00:37:37.690]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2025-01-23 00:37:37.690]: Info: 
[2025-01-23 00:37:37.690]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2025-01-23 00:37:37.690]: Info: 
[2025-01-23 00:37:37.690]: Info: Found H.264 encoder: h264_nvenc [nvenc]
[2025-01-23 00:37:37.690]: Info: Found HEVC encoder: hevc_nvenc [nvenc]
[2025-01-23 00:37:37.690]: Info: Executing [Desktop]
[2025-01-23 00:37:37.879]: Info: New streaming session started [active sessions: 1]
[2025-01-23 00:37:38.087]: Info: nvprefs: No need to modify application profile settings
[2025-01-23 00:37:38.087]: Info: nvprefs: No need to modify global profile settings
[2025-01-23 00:37:38.150]: Info: CLIENT CONNECTED
[2025-01-23 00:37:38.151]: Warning: QOSAddSocketToFlow() failed: 1168
[2025-01-23 00:37:38.333]: Info: Gamepad 0 will be Xbox 360 controller (default)
[2025-01-23 00:37:38.364]: Warning: QOSAddSocketToFlow() failed: 1168
[2025-01-23 00:37:38.409]: Info: Changed virtual audio sink format to [S24 48000 2.0]
[2025-01-23 00:37:38.545]: Info: Audio capture format is [F32 48000 2.0]
[2025-01-23 00:37:38.547]: Info: Opus initialized: 48 kHz, 2 channels, 512 kbps (total), LOWDELAY
[2025-01-23 00:37:38.565]: Info: 
Device Description : NVIDIA GeForce RTX 3080
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x00002206
Device Video Mem   : 10053 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 16345 MiB
Feature Level      : 0x0000B100
Capture size       : 2560x1600
Offset             : 0x0
Virtual Desktop    : 2560x1600
[2025-01-23 00:37:38.565]: Info: Active GPU has HAGS enabled
[2025-01-23 00:37:38.565]: Info: Using realtime GPU priority
[2025-01-23 00:37:38.565]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 10
Red Primary        : [0.639646,0.330079]
Green Primary      : [0.299805,0.59961]
Blue Primary       : [0.150393,0.0595684]
White Point        : [0.3125,0.329098]
Min Luminance      : 0.0449 nits
Max Luminance      : 3600 nits
Max Full Luminance : 3600 nits
[2025-01-23 00:37:38.569]: Info: Desktop resolution [2560x1600]
[2025-01-23 00:37:38.569]: Info: Desktop format [DXGI_FORMAT_R16G16B16A16_FLOAT]
[2025-01-23 00:37:38.569]: Info: Display refresh rate [60Hz]
[2025-01-23 00:37:38.569]: Info: Requested frame rate [60fps]
[2025-01-23 00:37:38.570]: Info: Creating encoder [hevc_nvenc]
[2025-01-23 00:37:38.570]: Info: Color coding: SDR (Rec. 601)
[2025-01-23 00:37:38.570]: Info: Color depth: 8-bit
[2025-01-23 00:37:38.570]: Info: Color range: MPEG
[2025-01-23 00:37:38.588]: Info: Capture format [DXGI_FORMAT_R16G16B16A16_FLOAT]
[2025-01-23 00:37:38.666]: Info: NvEnc: created encoder HEVC P1 two-pass rfi
[2025-01-23 00:37:40.308]: Info: CLIENT DISCONNECTED
[2025-01-23 00:37:45.072]: Info: Trying to revert applied display device settings. API is available: true
[2025-01-23 00:37:45.074]: Info: Trying to change back the display modes to:
{
  "{64106ff7-725a-525c-a3b8-38ebaaab7a12}": {
    "refresh_rate": {
      "denominator": 1000,
      "numerator": 143988
    },
    "resolution": {
      "height": 2160,
      "width": 3840
    }
  }
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions