Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ddprobe): allow to manually specify gpu preference #3521

Merged
merged 3 commits into from
Jan 8, 2025

Conversation

FrogTheFrog
Copy link
Collaborator

@FrogTheFrog FrogTheFrog commented Jan 8, 2025

Description

At the moment ddprobe does not always work (see #3414). This PR allows to manually specify the GPU preference instead of relying on the ddprobe.

Screenshot

image

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

@FrogTheFrog
Copy link
Collaborator Author

@RebelliousX If you have time I have added a very stupid thing I would like to test regarding the ddprobe. Could you please try this build and see if it works (also with the ddprobe version that should supposedly fix the issue).

That aside, I will soon add a manual override option and would also like you to test it.

Copy link

codecov bot commented Jan 8, 2025

Codecov Report

Attention: Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.

Project coverage is 8.44%. Comparing base (9b9767b) to head (0c18aa4).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/platform/windows/display_base.cpp 0.00% 8 Missing and 3 partials ⚠️
src/config.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           master   #3521      +/-   ##
=========================================
- Coverage    8.44%   8.44%   -0.01%     
=========================================
  Files          90      90              
  Lines       16069   16074       +5     
  Branches     7633    7636       +3     
=========================================
  Hits         1357    1357              
- Misses      14214   14218       +4     
- Partials      498     499       +1     
Flag Coverage Δ
Linux 9.15% <0.00%> (-0.01%) ⬇️
Windows 6.18% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/config.h 0.00% <ø> (ø)
src/config.cpp 0.00% <0.00%> (ø)
src/platform/windows/display_base.cpp 13.35% <0.00%> (-0.11%) ⬇️

@ReenigneArcher ReenigneArcher changed the title feature(ddprobe): all to manually specify gpu preference feat(ddprobe): allow to manually specify gpu preference Jan 8, 2025
@RebelliousX
Copy link

RebelliousX commented Jan 8, 2025

Sure thing, I am happy to test 😊

Using this PR's build installer, I didn't change the ddprobe.exe:

  • Value -1 default, I don't get black screen, but Moonlight throws error 503.
Sunshine Log: GPU Preference is -1 (default)
[2025-01-08 12:39:44.063]: Info: Sunshine version: 0.0.0.e32cc83b91b98b0918c078ebb5331a02ec88ac5e
[2025-01-08 12:39:44.063]: Info: Package Publisher: LizardByte
[2025-01-08 12:39:44.063]: Info: Publisher Website: https://app.lizardbyte.dev
[2025-01-08 12:39:44.063]: Info: Get support: https://app.lizardbyte.dev/support
[2025-01-08 12:39:44.063]: Info: Provided workaround settings for SettingsManager:
{
  "hdr_blank_delay": null
}
[2025-01-08 12:39:44.069]: Info: Currently available display devices:
[
  {
    "device_id": "{7c0d6921-fd7a-5acb-92d9-e9e5cfea32f1}",
    "display_name": "\\\\.\\DISPLAY1",
    "friendly_name": "",
    "info": {
      "hdr_state": null,
      "origin_point": {
        "x": 0,
        "y": 0
      },
      "primary": true,
      "refresh_rate": {
        "type": "rational",
        "value": {
          "denominator": 2310880,
          "numerator": 138700000
        }
      },
      "resolution": {
        "height": 1080,
        "width": 1920
      },
      "resolution_scale": {
        "type": "rational",
        "value": {
          "denominator": 100,
          "numerator": 125
        }
      }
    }
  },
  {
    "device_id": "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}",
    "display_name": "",
    "friendly_name": "VDD by MTT",
    "info": null
  }
]
[2025-01-08 12:39:44.522]: Info: nvprefs: No need to modify application profile settings
[2025-01-08 12:39:44.522]: Info: nvprefs: Changed OGL_CPL_PREFER_DXPRESENT to OGL_CPL_PREFER_DXPRESENT_PREFER_ENABLED for base profile
[2025-01-08 12:39:44.592]: Info: Compiling shaders...
[2025-01-08 12:39:44.646]: Info: System tray created
[2025-01-08 12:39:44.806]: Info: Compiled shaders
[2025-01-08 12:39:44.817]: Info: Trying encoder [quicksync]
[2025-01-08 12:39:44.960]: Info: ddprobe.exe 1  --verify-frame-capture returned 0x00000000
[2025-01-08 12:39:44.960]: Info: Set GPU preference: 1
[2025-01-08 12:39:45.477]: Error: Failed to locate an output device
[2025-01-08 12:39:45.683]: Info: Set GPU preference: 1
[2025-01-08 12:39:46.206]: Error: Failed to locate an output device
[2025-01-08 12:39:46.413]: Info: Encoder [quicksync] failed
[2025-01-08 12:39:46.413]: Error: Couldn't find any working encoder matching [quicksync]
[2025-01-08 12:39:46.413]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2025-01-08 12:39:46.414]: Info: Trying encoder [nvenc]
[2025-01-08 12:39:46.415]: Info: Set GPU preference: 1
[2025-01-08 12:39:46.924]: Error: Failed to locate an output device
[2025-01-08 12:39:47.132]: Info: Set GPU preference: 1
[2025-01-08 12:39:47.643]: Error: Failed to locate an output device
[2025-01-08 12:39:47.847]: Info: Encoder [nvenc] failed
[2025-01-08 12:39:47.850]: Info: Trying encoder [amdvce]
[2025-01-08 12:39:47.850]: Info: Set GPU preference: 1
[2025-01-08 12:39:48.363]: Error: Failed to locate an output device
[2025-01-08 12:39:48.568]: Info: Set GPU preference: 1
[2025-01-08 12:39:49.078]: Error: Failed to locate an output device
[2025-01-08 12:39:49.285]: Info: Encoder [amdvce] failed
[2025-01-08 12:39:49.286]: Info: Trying encoder [software]
[2025-01-08 12:39:49.286]: Info: Set GPU preference: 1
[2025-01-08 12:39:49.805]: Error: Failed to locate an output device
[2025-01-08 12:39:50.009]: Info: Set GPU preference: 1
[2025-01-08 12:39:50.523]: Error: Failed to locate an output device
[2025-01-08 12:39:50.728]: Info: Encoder [software] failed
[2025-01-08 12:39:50.728]: Error: Couldn't find any working encoder that meets HEVC/AV1 requirements
[2025-01-08 12:39:50.729]: Fatal: Unable to find display or encoder during startup.
[2025-01-08 12:39:50.729]: Fatal: Please ensure your manually chosen GPU and monitor are connected and powered on.
[2025-01-08 12:39:50.729]: Error: Video failed to find working encoder
[2025-01-08 12:39:50.737]: Info: Configuration UI available at [https://localhost:47990]
[2025-01-08 12:39:51.494]: Info: Registered Sunshine mDNS service
[2025-01-08 12:40:17.239]: Info: Trying to apply display device settings. API is available: true
[2025-01-08 12:40:17.239]: Info: Using the following configuration:
{
  "device_id": "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}",
  "device_prep": "EnsureOnlyDisplay",
  "hdr_state": "Disabled",
  "refresh_rate": {
    "type": "rational",
    "value": {
      "denominator": 1,
      "numerator": 60
    }
  },
  "resolution": {
    "height": 1080,
    "width": 1920
  }
}
[2025-01-08 12:40:17.239]: Info: Active topology before any changes:
[
  [
    "{7c0d6921-fd7a-5acb-92d9-e9e5cfea32f1}"
  ]
]
[2025-01-08 12:40:17.242]: Info: Currently available devices:
[
  {
    "device_id": "{7c0d6921-fd7a-5acb-92d9-e9e5cfea32f1}",
    "display_name": "\\\\.\\DISPLAY1",
    "friendly_name": "",
    "info": {
      "hdr_state": null,
      "origin_point": {
        "x": 0,
        "y": 0
      },
      "primary": true,
      "refresh_rate": {
        "type": "rational",
        "value": {
          "denominator": 2310880,
          "numerator": 138700000
        }
      },
      "resolution": {
        "height": 1080,
        "width": 1920
      },
      "resolution_scale": {
        "type": "rational",
        "value": {
          "denominator": 100,
          "numerator": 125
        }
      }
    }
  },
  {
    "device_id": "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}",
    "display_name": "",
    "friendly_name": "VDD by MTT",
    "info": null
  }
]
[2025-01-08 12:40:17.242]: Info: Will compute new display device topology from the following input:
  - initial topology: [["{7c0d6921-fd7a-5acb-92d9-e9e5cfea32f1}"]]
  - initial primary devices: ["{7c0d6921-fd7a-5acb-92d9-e9e5cfea32f1}"]
  - configuring unspecified device: false
  - device to configure: "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}"
  - additional devices to configure: []
[2025-01-08 12:40:17.242]: Info: Newly computed display device topology data:
  - topology: [["{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}"]]
  - change is needed: true
  - additional devices to configure: []
[2025-01-08 12:40:17.747]: Info: Changing display modes to:
{
  "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}": {
    "refresh_rate": {
      "denominator": 1,
      "numerator": 60
    },
    "resolution": {
      "height": 1080,
      "width": 1920
    }
  }
}
[2025-01-08 12:40:18.103]: Info: Changing HDR states to:
{
  "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}": "Disabled"
}
[2025-01-08 12:40:18.442]: Info: Trying encoder [quicksync]
[2025-01-08 12:40:19.837]: Info: ddprobe.exe 1 \\.\DISPLAY5 --verify-frame-capture returned 0x887A0026
[2025-01-08 12:40:21.121]: Info: ddprobe.exe 2 \\.\DISPLAY5 --verify-frame-capture returned 0x887A0027
[2025-01-08 12:40:21.956]: Info: ddprobe.exe 3 \\.\DISPLAY5 --verify-frame-capture returned 0x00000000
[2025-01-08 12:40:21.956]: Info: Set GPU preference: 3
[2025-01-08 12:40:22.475]: Error: Failed to locate an output device
[2025-01-08 12:40:22.679]: Info: Set GPU preference: 3
[2025-01-08 12:40:23.194]: Error: Failed to locate an output device
[2025-01-08 12:40:23.397]: Info: Encoder [quicksync] failed
[2025-01-08 12:40:23.397]: Error: Couldn't find any working encoder matching [quicksync]
[2025-01-08 12:40:23.397]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2025-01-08 12:40:23.398]: Info: Trying encoder [nvenc]
[2025-01-08 12:40:23.398]: Info: Set GPU preference: 3
[2025-01-08 12:40:23.914]: Error: Failed to locate an output device
[2025-01-08 12:40:24.128]: Info: Set GPU preference: 3
[2025-01-08 12:40:24.641]: Error: Failed to locate an output device
[2025-01-08 12:40:24.842]: Info: Encoder [nvenc] failed
[2025-01-08 12:40:24.843]: Info: Trying encoder [amdvce]
[2025-01-08 12:40:24.843]: Info: Set GPU preference: 3
[2025-01-08 12:40:25.350]: Error: Failed to locate an output device
[2025-01-08 12:40:25.556]: Info: Set GPU preference: 3
[2025-01-08 12:40:26.075]: Error: Failed to locate an output device
[2025-01-08 12:40:26.279]: Info: Encoder [amdvce] failed
[2025-01-08 12:40:26.281]: Info: Trying encoder [software]
[2025-01-08 12:40:26.282]: Info: Set GPU preference: 3
[2025-01-08 12:40:26.788]: Error: Failed to locate an output device
[2025-01-08 12:40:26.993]: Info: Set GPU preference: 3
[2025-01-08 12:40:27.507]: Error: Failed to locate an output device
[2025-01-08 12:40:27.711]: Info: Encoder [software] failed
[2025-01-08 12:40:27.712]: Error: Couldn't find any working encoder that meets HEVC/AV1 requirements
[2025-01-08 12:40:27.714]: Fatal: Unable to find display or encoder during startup.
[2025-01-08 12:40:27.714]: Fatal: Please ensure your manually chosen GPU and monitor are connected and powered on.
[2025-01-08 12:40:30.739]: Info: Trying to revert applied display device settings. API is available: true
[2025-01-08 12:40:30.741]: Info: Trying to change back the HDR states to:
{
  "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}": "Enabled"
}
[2025-01-08 12:40:30.805]: Info: Trying to change back the display modes to:
{
  "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}": {
    "refresh_rate": {
      "denominator": 1,
      "numerator": 165
    },
    "resolution": {
      "height": 1080,
      "width": 1920
    }
  }
}

  • Value 0 works fine, streaming is working.
Sunshine Log: GPU Preference is 0, works fine
[2025-01-08 12:45:01.527]: Info: Sunshine version: 0.0.0.e32cc83b91b98b0918c078ebb5331a02ec88ac5e
[2025-01-08 12:45:01.528]: Info: Package Publisher: LizardByte
[2025-01-08 12:45:01.528]: Info: Publisher Website: https://app.lizardbyte.dev
[2025-01-08 12:45:01.528]: Info: Get support: https://app.lizardbyte.dev/support
[2025-01-08 12:45:01.528]: Info: Provided workaround settings for SettingsManager:
{
  "hdr_blank_delay": null
}
[2025-01-08 12:45:01.534]: Info: Currently available display devices:
[
  {
    "device_id": "{7c0d6921-fd7a-5acb-92d9-e9e5cfea32f1}",
    "display_name": "\\\\.\\DISPLAY1",
    "friendly_name": "",
    "info": {
      "hdr_state": null,
      "origin_point": {
        "x": 0,
        "y": 0
      },
      "primary": true,
      "refresh_rate": {
        "type": "rational",
        "value": {
          "denominator": 2310880,
          "numerator": 138700000
        }
      },
      "resolution": {
        "height": 1080,
        "width": 1920
      },
      "resolution_scale": {
        "type": "rational",
        "value": {
          "denominator": 100,
          "numerator": 125
        }
      }
    }
  },
  {
    "device_id": "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}",
    "display_name": "",
    "friendly_name": "VDD by MTT",
    "info": null
  }
]
[2025-01-08 12:45:01.997]: Info: nvprefs: No need to modify application profile settings
[2025-01-08 12:45:01.997]: Info: nvprefs: Changed OGL_CPL_PREFER_DXPRESENT to OGL_CPL_PREFER_DXPRESENT_PREFER_ENABLED for base profile
[2025-01-08 12:45:02.069]: Info: Compiling shaders...
[2025-01-08 12:45:02.112]: Info: System tray created
[2025-01-08 12:45:02.257]: Info: Compiled shaders
[2025-01-08 12:45:02.267]: Info: Trying encoder [quicksync]
[2025-01-08 12:45:02.268]: Info: Set GPU preference: 0
[2025-01-08 12:45:02.793]: Error: Failed to locate an output device
[2025-01-08 12:45:03.009]: Info: Set GPU preference: 0
[2025-01-08 12:45:03.524]: Error: Failed to locate an output device
[2025-01-08 12:45:03.730]: Info: Encoder [quicksync] failed
[2025-01-08 12:45:03.730]: Error: Couldn't find any working encoder matching [quicksync]
[2025-01-08 12:45:03.730]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2025-01-08 12:45:03.732]: Info: Trying encoder [nvenc]
[2025-01-08 12:45:03.732]: Info: Set GPU preference: 0
[2025-01-08 12:45:04.245]: Error: Failed to locate an output device
[2025-01-08 12:45:04.451]: Info: Set GPU preference: 0
[2025-01-08 12:45:04.966]: Error: Failed to locate an output device
[2025-01-08 12:45:05.172]: Info: Encoder [nvenc] failed
[2025-01-08 12:45:05.175]: Info: Trying encoder [amdvce]
[2025-01-08 12:45:05.175]: Info: Set GPU preference: 0
[2025-01-08 12:45:05.690]: Error: Failed to locate an output device
[2025-01-08 12:45:05.894]: Info: Set GPU preference: 0
[2025-01-08 12:45:06.403]: Error: Failed to locate an output device
[2025-01-08 12:45:06.609]: Info: Encoder [amdvce] failed
[2025-01-08 12:45:06.610]: Info: Trying encoder [software]
[2025-01-08 12:45:06.610]: Info: Set GPU preference: 0
[2025-01-08 12:45:07.116]: Error: Failed to locate an output device
[2025-01-08 12:45:07.330]: Info: Set GPU preference: 0
[2025-01-08 12:45:07.851]: Error: Failed to locate an output device
[2025-01-08 12:45:08.066]: Info: Encoder [software] failed
[2025-01-08 12:45:08.066]: Error: Couldn't find any working encoder that meets HEVC/AV1 requirements
[2025-01-08 12:45:08.068]: Fatal: Unable to find display or encoder during startup.
[2025-01-08 12:45:08.068]: Fatal: Please ensure your manually chosen GPU and monitor are connected and powered on.
[2025-01-08 12:45:08.068]: Error: Video failed to find working encoder
[2025-01-08 12:45:08.084]: Info: Configuration UI available at [https://localhost:47990]
[2025-01-08 12:45:08.851]: Info: Registered Sunshine mDNS service
[2025-01-08 12:45:20.069]: Info: Trying to apply display device settings. API is available: true
[2025-01-08 12:45:20.070]: Info: Using the following configuration:
{
  "device_id": "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}",
  "device_prep": "EnsureOnlyDisplay",
  "hdr_state": "Disabled",
  "refresh_rate": {
    "type": "rational",
    "value": {
      "denominator": 1,
      "numerator": 60
    }
  },
  "resolution": {
    "height": 1080,
    "width": 1920
  }
}
[2025-01-08 12:45:20.072]: Info: Active topology before any changes:
[
  [
    "{7c0d6921-fd7a-5acb-92d9-e9e5cfea32f1}"
  ]
]
[2025-01-08 12:45:20.079]: Info: Currently available devices:
[
  {
    "device_id": "{7c0d6921-fd7a-5acb-92d9-e9e5cfea32f1}",
    "display_name": "\\\\.\\DISPLAY1",
    "friendly_name": "",
    "info": {
      "hdr_state": null,
      "origin_point": {
        "x": 0,
        "y": 0
      },
      "primary": true,
      "refresh_rate": {
        "type": "rational",
        "value": {
          "denominator": 2310880,
          "numerator": 138700000
        }
      },
      "resolution": {
        "height": 1080,
        "width": 1920
      },
      "resolution_scale": {
        "type": "rational",
        "value": {
          "denominator": 100,
          "numerator": 125
        }
      }
    }
  },
  {
    "device_id": "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}",
    "display_name": "",
    "friendly_name": "VDD by MTT",
    "info": null
  }
]
[2025-01-08 12:45:20.079]: Info: Will compute new display device topology from the following input:
  - initial topology: [["{7c0d6921-fd7a-5acb-92d9-e9e5cfea32f1}"]]
  - initial primary devices: ["{7c0d6921-fd7a-5acb-92d9-e9e5cfea32f1}"]
  - configuring unspecified device: false
  - device to configure: "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}"
  - additional devices to configure: []
[2025-01-08 12:45:20.079]: Info: Newly computed display device topology data:
  - topology: [["{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}"]]
  - change is needed: true
  - additional devices to configure: []
[2025-01-08 12:45:20.627]: Info: Changing display modes to:
{
  "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}": {
    "refresh_rate": {
      "denominator": 1,
      "numerator": 60
    },
    "resolution": {
      "height": 1080,
      "width": 1920
    }
  }
}
[2025-01-08 12:45:20.969]: Info: Changing HDR states to:
{
  "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}": "Disabled"
}
[2025-01-08 12:45:21.302]: Info: Trying encoder [quicksync]
[2025-01-08 12:45:21.303]: Info: Set GPU preference: 0
[2025-01-08 12:45:22.933]: Info: 
Device Description : NVIDIA GeForce GTX 1050 Ti
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x00001C8C
Device Video Mem   : 4004 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8113 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2025-01-08 12:45:22.934]: Info: Active GPU has HAGS disabled
[2025-01-08 12:45:22.934]: Info: Using realtime GPU priority
[2025-01-08 12:45:22.934]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 10
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
[2025-01-08 12:45:22.944]: Info: Desktop resolution [1920x1080]
[2025-01-08 12:45:22.944]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2025-01-08 12:45:22.945]: Info: Display refresh rate [60Hz]
[2025-01-08 12:45:22.945]: Info: Requested frame rate [60fps]
[2025-01-08 12:45:22.945]: Info: Encoder [quicksync] is not supported on this GPU
[2025-01-08 12:45:22.978]: Error: Couldn't find any working encoder matching [quicksync]
[2025-01-08 12:45:22.978]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2025-01-08 12:45:22.979]: Info: Trying encoder [nvenc]
[2025-01-08 12:45:22.979]: Info: Set GPU preference: 0
[2025-01-08 12:45:23.637]: Info: 
Device Description : NVIDIA GeForce GTX 1050 Ti
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x00001C8C
Device Video Mem   : 4004 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8113 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2025-01-08 12:45:23.638]: Info: Active GPU has HAGS disabled
[2025-01-08 12:45:23.638]: Info: Using realtime GPU priority
[2025-01-08 12:45:23.638]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 10
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
[2025-01-08 12:45:23.644]: Info: Desktop resolution [1920x1080]
[2025-01-08 12:45:23.644]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2025-01-08 12:45:23.645]: Info: Display refresh rate [60Hz]
[2025-01-08 12:45:23.645]: Info: Requested frame rate [60fps]
[2025-01-08 12:45:23.645]: Info: Creating encoder [h264_nvenc]
[2025-01-08 12:45:23.645]: Info: Color coding: SDR (Rec. 601)
[2025-01-08 12:45:23.645]: Info: Color depth: 8-bit
[2025-01-08 12:45:23.645]: Info: Color range: JPEG
[2025-01-08 12:45:23.800]: Info: NvEnc: created encoder H.264 P7 two-pass
[2025-01-08 12:45:23.867]: Info: Creating encoder [hevc_nvenc]
[2025-01-08 12:45:23.867]: Info: Color coding: SDR (Rec. 601)
[2025-01-08 12:45:23.867]: Info: Color depth: 8-bit
[2025-01-08 12:45:23.867]: Info: Color range: JPEG
[2025-01-08 12:45:24.046]: Info: NvEnc: created encoder HEVC P7 two-pass
[2025-01-08 12:45:24.119]: Info: Creating encoder [h264_nvenc]
[2025-01-08 12:45:24.119]: Info: Color coding: SDR (Rec. 601)
[2025-01-08 12:45:24.119]: Info: Color depth: 8-bit
[2025-01-08 12:45:24.119]: Info: Color range: JPEG
[2025-01-08 12:45:24.274]: Info: NvEnc: created encoder H.264 P7 yuv444 two-pass
[2025-01-08 12:45:24.385]: Info: Set GPU preference: 0
[2025-01-08 12:45:25.133]: Info: 
Device Description : NVIDIA GeForce GTX 1050 Ti
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x00001C8C
Device Video Mem   : 4004 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8113 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2025-01-08 12:45:25.133]: Info: Active GPU has HAGS disabled
[2025-01-08 12:45:25.133]: Info: Using realtime GPU priority
[2025-01-08 12:45:25.133]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 10
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
[2025-01-08 12:45:25.144]: Info: Desktop resolution [1920x1080]
[2025-01-08 12:45:25.144]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2025-01-08 12:45:25.144]: Info: Display refresh rate [60Hz]
[2025-01-08 12:45:25.144]: Info: Requested frame rate [60fps]
[2025-01-08 12:45:25.145]: Info: Creating encoder [hevc_nvenc]
[2025-01-08 12:45:25.145]: Info: Color coding: SDR (Rec. 709)
[2025-01-08 12:45:25.145]: Info: Color depth: 10-bit
[2025-01-08 12:45:25.145]: Info: Color range: JPEG
[2025-01-08 12:45:25.452]: Info: NvEnc: created encoder HEVC P7 yuv444 10-bit two-pass
[2025-01-08 12:45:25.595]: Info: 
[2025-01-08 12:45:25.595]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2025-01-08 12:45:25.595]: Info: 
[2025-01-08 12:45:25.595]: Info: Found H.264 encoder: h264_nvenc [nvenc]
[2025-01-08 12:45:25.595]: Info: Found HEVC encoder: hevc_nvenc [nvenc]
[2025-01-08 12:45:25.595]: Info: Executing [Desktop]
[2025-01-08 12:45:25.659]: Info: New streaming session started [active sessions: 1]
[2025-01-08 12:45:26.224]: Info: Audio capture format is [F32 48000 2.0]
[2025-01-08 12:45:26.226]: Info: Opus initialized: 48 kHz, 2 channels, 512 kbps (total), LOWDELAY
[2025-01-08 12:45:26.324]: Info: nvprefs: No need to modify application profile settings
[2025-01-08 12:45:26.324]: Info: nvprefs: No need to modify global profile settings
[2025-01-08 12:45:26.354]: Info: WLAN interface 0 is now in low latency mode
[2025-01-08 12:45:26.400]: Info: CLIENT CONNECTED
[2025-01-08 12:45:26.511]: Info: Set GPU preference: 0
[2025-01-08 12:45:26.858]: Info: Set GPU preference: 0
[2025-01-08 12:45:27.398]: Info: 
Device Description : NVIDIA GeForce GTX 1050 Ti
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x00001C8C
Device Video Mem   : 4004 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8113 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2025-01-08 12:45:27.398]: Info: Active GPU has HAGS disabled
[2025-01-08 12:45:27.398]: Info: Using realtime GPU priority
[2025-01-08 12:45:27.398]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 10
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
[2025-01-08 12:45:27.408]: Info: Desktop resolution [1920x1080]
[2025-01-08 12:45:27.408]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2025-01-08 12:45:27.408]: Info: Display refresh rate [60Hz]
[2025-01-08 12:45:27.408]: Info: Requested frame rate [60fps]
[2025-01-08 12:45:27.409]: Info: Creating encoder [hevc_nvenc]
[2025-01-08 12:45:27.409]: Info: Color coding: SDR (Rec. 709)
[2025-01-08 12:45:27.409]: Info: Color depth: 8-bit
[2025-01-08 12:45:27.409]: Info: Color range: JPEG
[2025-01-08 12:45:27.429]: Info: Capture format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2025-01-08 12:45:27.534]: Info: NvEnc: created encoder HEVC P7 two-pass
[2025-01-08 12:45:43.855]: Info: CLIENT DISCONNECTED
[2025-01-08 12:45:49.253]: Info: Trying to revert applied display device settings. API is available: true
[2025-01-08 12:45:49.256]: Info: Trying to change back the HDR states to:
{
  "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}": "Enabled"
}
[2025-01-08 12:45:49.321]: Info: Trying to change back the display modes to:
{
  "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}": {
    "refresh_rate": {
      "denominator": 1,
      "numerator": 165
    },
    "resolution": {
      "height": 1080,
      "width": 1920
    }
  }
}

  • Value 1 it is not working. Same as when value is -1, Moonlight throws error 503.
Sunshine Log: GPU Preference is 1, not working
[2025-01-08 12:50:20.171]: Info: Sunshine version: 0.0.0.e32cc83b91b98b0918c078ebb5331a02ec88ac5e
[2025-01-08 12:50:20.172]: Info: Package Publisher: LizardByte
[2025-01-08 12:50:20.172]: Info: Publisher Website: https://app.lizardbyte.dev
[2025-01-08 12:50:20.172]: Info: Get support: https://app.lizardbyte.dev/support
[2025-01-08 12:50:20.172]: Info: Provided workaround settings for SettingsManager:
{
  "hdr_blank_delay": null
}
[2025-01-08 12:50:20.178]: Info: Currently available display devices:
[
  {
    "device_id": "{7c0d6921-fd7a-5acb-92d9-e9e5cfea32f1}",
    "display_name": "\\\\.\\DISPLAY1",
    "friendly_name": "",
    "info": {
      "hdr_state": null,
      "origin_point": {
        "x": 0,
        "y": 0
      },
      "primary": true,
      "refresh_rate": {
        "type": "rational",
        "value": {
          "denominator": 2310880,
          "numerator": 138700000
        }
      },
      "resolution": {
        "height": 1080,
        "width": 1920
      },
      "resolution_scale": {
        "type": "rational",
        "value": {
          "denominator": 100,
          "numerator": 125
        }
      }
    }
  },
  {
    "device_id": "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}",
    "display_name": "",
    "friendly_name": "VDD by MTT",
    "info": null
  }
]
[2025-01-08 12:50:20.666]: Info: nvprefs: No need to modify application profile settings
[2025-01-08 12:50:20.666]: Info: nvprefs: Changed OGL_CPL_PREFER_DXPRESENT to OGL_CPL_PREFER_DXPRESENT_PREFER_ENABLED for base profile
[2025-01-08 12:50:20.736]: Info: Compiling shaders...
[2025-01-08 12:50:20.781]: Info: System tray created
[2025-01-08 12:50:20.926]: Info: Compiled shaders
[2025-01-08 12:50:20.937]: Info: Trying encoder [quicksync]
[2025-01-08 12:50:20.938]: Info: Set GPU preference: 1
[2025-01-08 12:50:21.451]: Error: Failed to locate an output device
[2025-01-08 12:50:21.655]: Info: Set GPU preference: 1
[2025-01-08 12:50:22.158]: Error: Failed to locate an output device
[2025-01-08 12:50:22.357]: Info: Encoder [quicksync] failed
[2025-01-08 12:50:22.358]: Error: Couldn't find any working encoder matching [quicksync]
[2025-01-08 12:50:22.358]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2025-01-08 12:50:22.359]: Info: Trying encoder [nvenc]
[2025-01-08 12:50:22.359]: Info: Set GPU preference: 1
[2025-01-08 12:50:22.866]: Error: Failed to locate an output device
[2025-01-08 12:50:23.071]: Info: Set GPU preference: 1
[2025-01-08 12:50:23.589]: Error: Failed to locate an output device
[2025-01-08 12:50:23.789]: Info: Encoder [nvenc] failed
[2025-01-08 12:50:23.790]: Info: Trying encoder [amdvce]
[2025-01-08 12:50:23.790]: Info: Set GPU preference: 1
[2025-01-08 12:50:24.304]: Error: Failed to locate an output device
[2025-01-08 12:50:24.506]: Info: Set GPU preference: 1
[2025-01-08 12:50:25.011]: Error: Failed to locate an output device
[2025-01-08 12:50:25.220]: Info: Encoder [amdvce] failed
[2025-01-08 12:50:25.222]: Info: Trying encoder [software]
[2025-01-08 12:50:25.222]: Info: Set GPU preference: 1
[2025-01-08 12:50:25.738]: Error: Failed to locate an output device
[2025-01-08 12:50:25.954]: Info: Set GPU preference: 1
[2025-01-08 12:50:26.465]: Error: Failed to locate an output device
[2025-01-08 12:50:26.668]: Info: Encoder [software] failed
[2025-01-08 12:50:26.669]: Error: Couldn't find any working encoder that meets HEVC/AV1 requirements
[2025-01-08 12:50:26.669]: Fatal: Unable to find display or encoder during startup.
[2025-01-08 12:50:26.670]: Fatal: Please ensure your manually chosen GPU and monitor are connected and powered on.
[2025-01-08 12:50:26.670]: Error: Video failed to find working encoder
[2025-01-08 12:50:26.678]: Info: Configuration UI available at [https://localhost:47990]
[2025-01-08 12:50:27.454]: Info: Registered Sunshine mDNS service
[2025-01-08 12:50:37.401]: Info: Trying to apply display device settings. API is available: true
[2025-01-08 12:50:37.401]: Info: Using the following configuration:
{
  "device_id": "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}",
  "device_prep": "EnsureOnlyDisplay",
  "hdr_state": "Disabled",
  "refresh_rate": {
    "type": "rational",
    "value": {
      "denominator": 1,
      "numerator": 60
    }
  },
  "resolution": {
    "height": 1080,
    "width": 1920
  }
}
[2025-01-08 12:50:37.402]: Info: Active topology before any changes:
[
  [
    "{7c0d6921-fd7a-5acb-92d9-e9e5cfea32f1}"
  ]
]
[2025-01-08 12:50:37.406]: Info: Currently available devices:
[
  {
    "device_id": "{7c0d6921-fd7a-5acb-92d9-e9e5cfea32f1}",
    "display_name": "\\\\.\\DISPLAY1",
    "friendly_name": "",
    "info": {
      "hdr_state": null,
      "origin_point": {
        "x": 0,
        "y": 0
      },
      "primary": true,
      "refresh_rate": {
        "type": "rational",
        "value": {
          "denominator": 2310880,
          "numerator": 138700000
        }
      },
      "resolution": {
        "height": 1080,
        "width": 1920
      },
      "resolution_scale": {
        "type": "rational",
        "value": {
          "denominator": 100,
          "numerator": 125
        }
      }
    }
  },
  {
    "device_id": "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}",
    "display_name": "",
    "friendly_name": "VDD by MTT",
    "info": null
  }
]
[2025-01-08 12:50:37.406]: Info: Will compute new display device topology from the following input:
  - initial topology: [["{7c0d6921-fd7a-5acb-92d9-e9e5cfea32f1}"]]
  - initial primary devices: ["{7c0d6921-fd7a-5acb-92d9-e9e5cfea32f1}"]
  - configuring unspecified device: false
  - device to configure: "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}"
  - additional devices to configure: []
[2025-01-08 12:50:37.406]: Info: Newly computed display device topology data:
  - topology: [["{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}"]]
  - change is needed: true
  - additional devices to configure: []
[2025-01-08 12:50:37.966]: Info: Changing display modes to:
{
  "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}": {
    "refresh_rate": {
      "denominator": 1,
      "numerator": 60
    },
    "resolution": {
      "height": 1080,
      "width": 1920
    }
  }
}
[2025-01-08 12:50:38.312]: Info: Changing HDR states to:
{
  "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}": "Disabled"
}
[2025-01-08 12:50:38.656]: Info: Trying encoder [quicksync]
[2025-01-08 12:50:38.656]: Info: Set GPU preference: 1
[2025-01-08 12:50:39.175]: Error: Failed to locate an output device
[2025-01-08 12:50:39.382]: Info: Set GPU preference: 1
[2025-01-08 12:50:39.895]: Error: Failed to locate an output device
[2025-01-08 12:50:40.109]: Info: Encoder [quicksync] failed
[2025-01-08 12:50:40.109]: Error: Couldn't find any working encoder matching [quicksync]
[2025-01-08 12:50:40.109]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2025-01-08 12:50:40.110]: Info: Trying encoder [nvenc]
[2025-01-08 12:50:40.110]: Info: Set GPU preference: 1
[2025-01-08 12:50:40.623]: Error: Failed to locate an output device
[2025-01-08 12:50:40.837]: Info: Set GPU preference: 1
[2025-01-08 12:50:41.355]: Error: Failed to locate an output device
[2025-01-08 12:50:41.563]: Info: Encoder [nvenc] failed
[2025-01-08 12:50:41.565]: Info: Trying encoder [amdvce]
[2025-01-08 12:50:41.566]: Info: Set GPU preference: 1
[2025-01-08 12:50:42.078]: Error: Failed to locate an output device
[2025-01-08 12:50:42.278]: Info: Set GPU preference: 1
[2025-01-08 12:50:42.784]: Error: Failed to locate an output device
[2025-01-08 12:50:42.985]: Info: Encoder [amdvce] failed
[2025-01-08 12:50:42.987]: Info: Trying encoder [software]
[2025-01-08 12:50:42.987]: Info: Set GPU preference: 1
[2025-01-08 12:50:43.501]: Error: Failed to locate an output device
[2025-01-08 12:50:43.715]: Info: Set GPU preference: 1
[2025-01-08 12:50:44.228]: Error: Failed to locate an output device
[2025-01-08 12:50:44.432]: Info: Encoder [software] failed
[2025-01-08 12:50:44.432]: Error: Couldn't find any working encoder that meets HEVC/AV1 requirements
[2025-01-08 12:50:44.434]: Fatal: Unable to find display or encoder during startup.
[2025-01-08 12:50:44.434]: Fatal: Please ensure your manually chosen GPU and monitor are connected and powered on.
[2025-01-08 12:50:47.462]: Info: Trying to revert applied display device settings. API is available: true
[2025-01-08 12:50:47.465]: Info: Trying to change back the HDR states to:
{
  "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}": "Enabled"
}
[2025-01-08 12:50:47.529]: Info: Trying to change back the display modes to:
{
  "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}": {
    "refresh_rate": {
      "denominator": 1,
      "numerator": 165
    },
    "resolution": {
      "height": 1080,
      "width": 1920
    }
  }
}

  • Value 2 works fine, streaming is working
Sunshine Log: GPU Preference is 2, works fine
[2025-01-08 12:55:20.960]: Info: Sunshine version: 0.0.0.e32cc83b91b98b0918c078ebb5331a02ec88ac5e
[2025-01-08 12:55:20.960]: Info: Package Publisher: LizardByte
[2025-01-08 12:55:20.960]: Info: Publisher Website: https://app.lizardbyte.dev
[2025-01-08 12:55:20.960]: Info: Get support: https://app.lizardbyte.dev/support
[2025-01-08 12:55:20.960]: Info: Provided workaround settings for SettingsManager:
{
  "hdr_blank_delay": null
}
[2025-01-08 12:55:20.967]: Info: Currently available display devices:
[
  {
    "device_id": "{7c0d6921-fd7a-5acb-92d9-e9e5cfea32f1}",
    "display_name": "\\\\.\\DISPLAY1",
    "friendly_name": "",
    "info": {
      "hdr_state": null,
      "origin_point": {
        "x": 0,
        "y": 0
      },
      "primary": true,
      "refresh_rate": {
        "type": "rational",
        "value": {
          "denominator": 2310880,
          "numerator": 138700000
        }
      },
      "resolution": {
        "height": 1080,
        "width": 1920
      },
      "resolution_scale": {
        "type": "rational",
        "value": {
          "denominator": 100,
          "numerator": 125
        }
      }
    }
  },
  {
    "device_id": "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}",
    "display_name": "",
    "friendly_name": "VDD by MTT",
    "info": null
  }
]
[2025-01-08 12:55:21.405]: Info: nvprefs: No need to modify application profile settings
[2025-01-08 12:55:21.405]: Info: nvprefs: Changed OGL_CPL_PREFER_DXPRESENT to OGL_CPL_PREFER_DXPRESENT_PREFER_ENABLED for base profile
[2025-01-08 12:55:21.476]: Info: Compiling shaders...
[2025-01-08 12:55:21.522]: Info: System tray created
[2025-01-08 12:55:21.664]: Info: Compiled shaders
[2025-01-08 12:55:21.675]: Info: Trying encoder [quicksync]
[2025-01-08 12:55:21.675]: Info: Set GPU preference: 2
[2025-01-08 12:55:22.313]: Error: DuplicateOutput() test failed [0x887A0004]
[2025-01-08 12:55:23.431]: Error: DuplicateOutput() test failed [0x887A0004]
[2025-01-08 12:55:23.453]: Error: Failed to locate an output device
[2025-01-08 12:55:23.651]: Info: Set GPU preference: 2
[2025-01-08 12:55:24.248]: Error: DuplicateOutput() test failed [0x887A0004]
[2025-01-08 12:55:25.379]: Error: DuplicateOutput() test failed [0x887A0004]
[2025-01-08 12:55:25.399]: Error: Failed to locate an output device
[2025-01-08 12:55:25.614]: Info: Encoder [quicksync] failed
[2025-01-08 12:55:25.614]: Error: Couldn't find any working encoder matching [quicksync]
[2025-01-08 12:55:25.614]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2025-01-08 12:55:25.616]: Info: Trying encoder [nvenc]
[2025-01-08 12:55:25.617]: Info: Set GPU preference: 2
[2025-01-08 12:55:26.213]: Error: DuplicateOutput() test failed [0x887A0004]
[2025-01-08 12:55:27.337]: Error: DuplicateOutput() test failed [0x887A0004]
[2025-01-08 12:55:27.357]: Error: Failed to locate an output device
[2025-01-08 12:55:27.558]: Info: Set GPU preference: 2
[2025-01-08 12:55:28.163]: Error: DuplicateOutput() test failed [0x887A0004]
[2025-01-08 12:55:29.282]: Error: DuplicateOutput() test failed [0x887A0004]
[2025-01-08 12:55:29.301]: Error: Failed to locate an output device
[2025-01-08 12:55:29.508]: Info: Encoder [nvenc] failed
[2025-01-08 12:55:29.509]: Info: Trying encoder [amdvce]
[2025-01-08 12:55:29.509]: Info: Set GPU preference: 2
[2025-01-08 12:55:30.113]: Error: DuplicateOutput() test failed [0x887A0004]
[2025-01-08 12:55:31.238]: Error: DuplicateOutput() test failed [0x887A0004]
[2025-01-08 12:55:31.256]: Error: Failed to locate an output device
[2025-01-08 12:55:31.459]: Info: Set GPU preference: 2
[2025-01-08 12:55:32.077]: Error: DuplicateOutput() test failed [0x887A0004]
[2025-01-08 12:55:33.212]: Error: DuplicateOutput() test failed [0x887A0004]
[2025-01-08 12:55:33.247]: Error: Failed to locate an output device
[2025-01-08 12:55:33.448]: Info: Encoder [amdvce] failed
[2025-01-08 12:55:33.451]: Info: Trying encoder [software]
[2025-01-08 12:55:33.451]: Info: Set GPU preference: 2
[2025-01-08 12:55:34.046]: Error: DuplicateOutput() test failed [0x887A0004]
[2025-01-08 12:55:35.210]: Error: DuplicateOutput() test failed [0x887A0004]
[2025-01-08 12:55:35.230]: Error: Failed to locate an output device
[2025-01-08 12:55:35.431]: Info: Set GPU preference: 2
[2025-01-08 12:55:36.027]: Error: DuplicateOutput() test failed [0x887A0004]
[2025-01-08 12:55:37.132]: Error: DuplicateOutput() test failed [0x887A0004]
[2025-01-08 12:55:37.169]: Error: Failed to locate an output device
[2025-01-08 12:55:37.371]: Info: Encoder [software] failed
[2025-01-08 12:55:37.372]: Error: Couldn't find any working encoder that meets HEVC/AV1 requirements
[2025-01-08 12:55:37.374]: Fatal: Unable to find display or encoder during startup.
[2025-01-08 12:55:37.374]: Fatal: Please ensure your manually chosen GPU and monitor are connected and powered on.
[2025-01-08 12:55:37.374]: Error: Video failed to find working encoder
[2025-01-08 12:55:37.391]: Info: Configuration UI available at [https://localhost:47990]
[2025-01-08 12:55:38.145]: Info: Registered Sunshine mDNS service
[2025-01-08 12:56:06.432]: Info: Trying to apply display device settings. API is available: true
[2025-01-08 12:56:06.433]: Info: Using the following configuration:
{
  "device_id": "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}",
  "device_prep": "EnsureOnlyDisplay",
  "hdr_state": "Disabled",
  "refresh_rate": {
    "type": "rational",
    "value": {
      "denominator": 1,
      "numerator": 60
    }
  },
  "resolution": {
    "height": 1080,
    "width": 1920
  }
}
[2025-01-08 12:56:06.435]: Info: Active topology before any changes:
[
  [
    "{7c0d6921-fd7a-5acb-92d9-e9e5cfea32f1}"
  ]
]
[2025-01-08 12:56:06.440]: Info: Currently available devices:
[
  {
    "device_id": "{7c0d6921-fd7a-5acb-92d9-e9e5cfea32f1}",
    "display_name": "\\\\.\\DISPLAY1",
    "friendly_name": "",
    "info": {
      "hdr_state": null,
      "origin_point": {
        "x": 0,
        "y": 0
      },
      "primary": true,
      "refresh_rate": {
        "type": "rational",
        "value": {
          "denominator": 2310880,
          "numerator": 138700000
        }
      },
      "resolution": {
        "height": 1080,
        "width": 1920
      },
      "resolution_scale": {
        "type": "rational",
        "value": {
          "denominator": 100,
          "numerator": 125
        }
      }
    }
  },
  {
    "device_id": "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}",
    "display_name": "",
    "friendly_name": "VDD by MTT",
    "info": null
  }
]
[2025-01-08 12:56:06.440]: Info: Will compute new display device topology from the following input:
  - initial topology: [["{7c0d6921-fd7a-5acb-92d9-e9e5cfea32f1}"]]
  - initial primary devices: ["{7c0d6921-fd7a-5acb-92d9-e9e5cfea32f1}"]
  - configuring unspecified device: false
  - device to configure: "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}"
  - additional devices to configure: []
[2025-01-08 12:56:06.440]: Info: Newly computed display device topology data:
  - topology: [["{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}"]]
  - change is needed: true
  - additional devices to configure: []
[2025-01-08 12:56:06.992]: Info: Changing display modes to:
{
  "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}": {
    "refresh_rate": {
      "denominator": 1,
      "numerator": 60
    },
    "resolution": {
      "height": 1080,
      "width": 1920
    }
  }
}
[2025-01-08 12:56:07.312]: Info: Changing HDR states to:
{
  "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}": "Disabled"
}
[2025-01-08 12:56:07.644]: Info: Trying encoder [quicksync]
[2025-01-08 12:56:07.645]: Info: Set GPU preference: 2
[2025-01-08 12:56:09.052]: Info: 
Device Description : NVIDIA GeForce GTX 1050 Ti
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x00001C8C
Device Video Mem   : 4004 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8113 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2025-01-08 12:56:09.053]: Info: Active GPU has HAGS disabled
[2025-01-08 12:56:09.053]: Info: Using realtime GPU priority
[2025-01-08 12:56:09.053]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 10
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
[2025-01-08 12:56:09.061]: Info: Desktop resolution [1920x1080]
[2025-01-08 12:56:09.061]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2025-01-08 12:56:09.061]: Info: Display refresh rate [60Hz]
[2025-01-08 12:56:09.061]: Info: Requested frame rate [60fps]
[2025-01-08 12:56:09.062]: Info: Encoder [quicksync] is not supported on this GPU
[2025-01-08 12:56:09.113]: Error: Couldn't find any working encoder matching [quicksync]
[2025-01-08 12:56:09.113]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2025-01-08 12:56:09.115]: Info: Trying encoder [nvenc]
[2025-01-08 12:56:09.115]: Info: Set GPU preference: 2
[2025-01-08 12:56:10.137]: Info: 
Device Description : NVIDIA GeForce GTX 1050 Ti
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x00001C8C
Device Video Mem   : 4004 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8113 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2025-01-08 12:56:10.138]: Info: Active GPU has HAGS disabled
[2025-01-08 12:56:10.138]: Info: Using realtime GPU priority
[2025-01-08 12:56:10.138]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 10
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
[2025-01-08 12:56:10.144]: Info: Desktop resolution [1920x1080]
[2025-01-08 12:56:10.144]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2025-01-08 12:56:10.144]: Info: Display refresh rate [60Hz]
[2025-01-08 12:56:10.144]: Info: Requested frame rate [60fps]
[2025-01-08 12:56:10.146]: Info: Creating encoder [h264_nvenc]
[2025-01-08 12:56:10.146]: Info: Color coding: SDR (Rec. 601)
[2025-01-08 12:56:10.146]: Info: Color depth: 8-bit
[2025-01-08 12:56:10.146]: Info: Color range: JPEG
[2025-01-08 12:56:10.307]: Info: NvEnc: created encoder H.264 P7 two-pass
[2025-01-08 12:56:10.433]: Info: Creating encoder [hevc_nvenc]
[2025-01-08 12:56:10.434]: Info: Color coding: SDR (Rec. 601)
[2025-01-08 12:56:10.434]: Info: Color depth: 8-bit
[2025-01-08 12:56:10.434]: Info: Color range: JPEG
[2025-01-08 12:56:10.614]: Info: NvEnc: created encoder HEVC P7 two-pass
[2025-01-08 12:56:10.706]: Info: Creating encoder [h264_nvenc]
[2025-01-08 12:56:10.706]: Info: Color coding: SDR (Rec. 601)
[2025-01-08 12:56:10.707]: Info: Color depth: 8-bit
[2025-01-08 12:56:10.707]: Info: Color range: JPEG
[2025-01-08 12:56:10.841]: Info: NvEnc: created encoder H.264 P7 yuv444 two-pass
[2025-01-08 12:56:10.965]: Info: Set GPU preference: 2
[2025-01-08 12:56:11.646]: Info: 
Device Description : NVIDIA GeForce GTX 1050 Ti
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x00001C8C
Device Video Mem   : 4004 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8113 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2025-01-08 12:56:11.647]: Info: Active GPU has HAGS disabled
[2025-01-08 12:56:11.647]: Info: Using realtime GPU priority
[2025-01-08 12:56:11.647]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 10
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
[2025-01-08 12:56:11.654]: Info: Desktop resolution [1920x1080]
[2025-01-08 12:56:11.654]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2025-01-08 12:56:11.654]: Info: Display refresh rate [60Hz]
[2025-01-08 12:56:11.654]: Info: Requested frame rate [60fps]
[2025-01-08 12:56:11.655]: Info: Creating encoder [hevc_nvenc]
[2025-01-08 12:56:11.655]: Info: Color coding: SDR (Rec. 709)
[2025-01-08 12:56:11.655]: Info: Color depth: 10-bit
[2025-01-08 12:56:11.655]: Info: Color range: JPEG
[2025-01-08 12:56:11.949]: Info: NvEnc: created encoder HEVC P7 yuv444 10-bit two-pass
[2025-01-08 12:56:12.066]: Info: 
[2025-01-08 12:56:12.066]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2025-01-08 12:56:12.066]: Info: 
[2025-01-08 12:56:12.066]: Info: Found H.264 encoder: h264_nvenc [nvenc]
[2025-01-08 12:56:12.066]: Info: Found HEVC encoder: hevc_nvenc [nvenc]
[2025-01-08 12:56:12.066]: Info: Executing [Desktop]
[2025-01-08 12:56:12.166]: Info: New streaming session started [active sessions: 1]
[2025-01-08 12:56:12.787]: Info: nvprefs: No need to modify application profile settings
[2025-01-08 12:56:12.787]: Info: nvprefs: No need to modify global profile settings
[2025-01-08 12:56:12.797]: Info: Audio capture format is [F32 48000 2.0]
[2025-01-08 12:56:12.805]: Info: Opus initialized: 48 kHz, 2 channels, 512 kbps (total), LOWDELAY
[2025-01-08 12:56:12.835]: Info: WLAN interface 0 is now in low latency mode
[2025-01-08 12:56:12.887]: Info: CLIENT CONNECTED
[2025-01-08 12:56:13.001]: Info: Set GPU preference: 2
[2025-01-08 12:56:13.296]: Info: Set GPU preference: 2
[2025-01-08 12:56:13.833]: Info: 
Device Description : NVIDIA GeForce GTX 1050 Ti
Device Vendor ID   : 0x000010DE
Device Device ID   : 0x00001C8C
Device Video Mem   : 4004 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8113 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2025-01-08 12:56:13.833]: Info: Active GPU has HAGS disabled
[2025-01-08 12:56:13.833]: Info: Using realtime GPU priority
[2025-01-08 12:56:13.833]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 10
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
[2025-01-08 12:56:13.839]: Info: Desktop resolution [1920x1080]
[2025-01-08 12:56:13.839]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2025-01-08 12:56:13.839]: Info: Display refresh rate [60Hz]
[2025-01-08 12:56:13.839]: Info: Requested frame rate [60fps]
[2025-01-08 12:56:13.840]: Info: Creating encoder [hevc_nvenc]
[2025-01-08 12:56:13.840]: Info: Color coding: SDR (Rec. 709)
[2025-01-08 12:56:13.840]: Info: Color depth: 8-bit
[2025-01-08 12:56:13.840]: Info: Color range: JPEG
[2025-01-08 12:56:13.871]: Info: Capture format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2025-01-08 12:56:13.950]: Info: NvEnc: created encoder HEVC P7 two-pass
[2025-01-08 12:56:26.816]: Info: CLIENT DISCONNECTED
[2025-01-08 12:56:32.481]: Info: Trying to revert applied display device settings. API is available: true
[2025-01-08 12:56:32.482]: Info: Trying to change back the HDR states to:
{
  "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}": "Enabled"
}
[2025-01-08 12:56:32.547]: Info: Trying to change back the display modes to:
{
  "{9acddf6d-43cc-576e-9aff-0c5fc80b4cc8}": {
    "refresh_rate": {
      "denominator": 1,
      "numerator": 165
    },
    "resolution": {
      "height": 1080,
      "width": 1920
    }
  }
}

@FrogTheFrog
Copy link
Collaborator Author

@RebelliousX ty for the testing!

@ReenigneArcher I have reverted the stupid test commit as it's not working as expected. The PR is now ready for final review.

@FrogTheFrog FrogTheFrog marked this pull request as ready for review January 8, 2025 19:17
@RebelliousX
Copy link

RebelliousX commented Jan 8, 2025

If I make a suggestion here too. The current WebUI is not really user friendly (or noob friendly).

Instead of asking the user to run dxgi-info.exe or audio-info.exe manually and fill the text boxes,
there should be drop down boxes (combo boxes) with available GPUs or Audio output devices and Monitors.

This can be done when Sunshine process first starts, it should run dxgi-info.exe and audio-info.exe
in the background and defaulting the output to a file, like

dxgi-info.exe >dxgi-info.txt

And then parse the output text files for avaliable GPUs, Audio Outputs and Available Monitors too.
Then feed that information into the WebUI.

The user shouldn't run these manually and should be able to select them from the WebUI.

Copy link

sonarqubecloud bot commented Jan 8, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
1 New issue
1 New Code Smells (required ≤ 0)
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@ReenigneArcher
Copy link
Member

@RebelliousX I think that can be considered in another PR. Can you add it as a feature request? https://github.com/orgs/LizardByte/discussions

@moi952
Copy link

moi952 commented Jan 8, 2025

If I make a suggestion here too. The current WebUI is not really user friendly (or noob friendly).

Instead of asking the user to run dxgi-info.exe or audio-info.exe manually and fill the text boxes, there should be drop down boxes (combo boxes) with available GPUs or Audio output devices and Monitors.

This can be done when Sunshine process first starts, it should run dxgi-info.exe and audio-info.exe in the background and defaulting the output to a file, like

dxgi-info.exe >dxgi-info.txt

And then parse the output text files for avaliable GPUs, Audio Outputs and Available Monitors too. Then feed that information into the WebUI.

The user shouldn't run these manually and should be able to select them from the WebUI.

For screen we have this PR #2490

But it would be great to have it for everything if we have the possibility to have the information.

@RebelliousX
Copy link

RebelliousX commented Jan 8, 2025

@RebelliousX I think that can be considered in another PR. Can you add it as a feature request? https://github.com/orgs/LizardByte/discussions

I will, it was not my intention to go off topic, I thought it was related to this that is why I mentioned this here. 👍🏻

@FrogTheFrog I believe the default value should be 0 instead of -1. I just tested this, and when the value is 0, you don't have to specify the Adapter Name and you can just leave it empty.

The streaming will be okay on both monitors (the physical and the virtual one) and on both GPUs (the dGPU -in my case the Nvidia GTX 1050ti, or the iGPU Intel UHD 630). What I mean by this, everything is chosen automatically and working fine when the value is 0.

If I specify the Virtual monitor (VDD which has dGPU attached to it) with UUID and leave Adapter Name empty, and default GPU preference is 0 then Sunshine selects the dGPU and correctly stream from the VDD and streaming is fine.

If I leave the Display Device Id and Adapter Name both empty, and default GPU preference is 0 then it will select the iGPU on the physical monitor and streaming is working fine.

The current default value of -1 is defaulting to 1 according to the logs from above and causes problems.

@FrogTheFrog
Copy link
Collaborator Author

I personally have no opinion on this. It probably works because VDD by MTT allows you to specify GPU or who knows... @ReenigneArcher opinions on this?

@RebelliousX
Copy link

RebelliousX commented Jan 8, 2025

I personally have no opinion on this. It probably works because VDD by MTT allows you to specify GPU or who knows... @ReenigneArcher opinions on this?

Yeah, I kind of agree, and it is hard for you to determine which is best since you don't have a hybrid GPU setup to test. But it seems value of 0 is safe. The current default value of -1 is defaulting to 1 according to the logs from above and causes problems.

Edit: Also what do you think about a drop down menu instead with values:

  • Sunshine will try to detect the best GPU ( -1 )
  • Let Windows try select the best GPU ( 0 )
  • First found GPU, e.g; iGPU ( 1 )
  • Second GPU if it exists, e.g; dGPU ( 2)

But again, -1 and 1 are the same according to the logs 🤔 So actual valid values are { 0, 1, 2 }.

@ReenigneArcher
Copy link
Member

I think the current numbering is correct. -1 is the current behavior if I understand correctly. 0 might not work for everyone, so I would rather not break things until we get more feedback on this.

Also what do you think about a drop down menu instead with values:

It would be difficult to have a drop down value, because there's no limit to how high the number can technically go.

@ReenigneArcher ReenigneArcher merged commit 6a233cb into LizardByte:master Jan 8, 2025
35 of 37 checks passed
@FrogTheFrog FrogTheFrog deleted the gpupref branch January 8, 2025 23:45
cgutman added a commit to cgutman/LB_Sunshine that referenced this pull request Jan 12, 2025
cgutman added a commit to cgutman/LB_Sunshine that referenced this pull request Jan 12, 2025
cgutman added a commit that referenced this pull request Jan 12, 2025
…aks DDA (#3530)

* Revert "feat(ddprobe): allow to manually specify gpu preference (#3521)"

This reverts commit 6a233cb.

* Keep display revert delay input type change from 6a233cb

* Remove ddprobe

* feat(capture/windows): hook APIs to avoid output reparenting that breaks DDA
qiin2333 pushed a commit to qiin2333/Sunshine-Foundation that referenced this pull request Jan 14, 2025
…aks DDA (LizardByte#3530)

* Revert "feat(ddprobe): allow to manually specify gpu preference (LizardByte#3521)"

This reverts commit 6a233cb.

* Keep display revert delay input type change from 6a233cb

* Remove ddprobe

* feat(capture/windows): hook APIs to avoid output reparenting that breaks DDA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants