Automatically enable/disable HDR display mode to sync with client HDR #149
Replies: 0 comments 41 replies
|
https://github.com/Codectory/AutoActions This program can temporarily solve the problem. Of course, it would be better if Sunshine were improved. |
|
@comienzo2093 This helps, but detecting whether the incoming client is SDR or HDR is still not possible, you would have to create custom shortcuts for Steam which seems Silly An option would be to make Sunshine run a user-provided command line when the client and server HDR settings are mismatched (and pass the client's setting as a parameter) |
|
Alright, here's a workaround that kind of sucks but at least will get you going:
Do: Undo: Create a new entry "Steam Big Picture - HDR", except set "Do" to Edit: This is assuming you prefer your normal monitor usage to be HDR => On, if that isn't the case adjust accordingly! |
|
Posting another workaround. On Windows 11, the Xbox Game Bar (Win + G) tool enables the key bind "Win + ALT + B" for toggling HDR. It also lets you create a new binding for toggling HDR. I created a new keybind "CTRL + F13" to toggle HDR (since I don't have an F13 on my keyboard, this won't conflict with anything?) I found a command prompt script that is able to simulate key strokes as well:
^ = CTRL (https://ss64.com/vb/sendkeys.html) Finally, I made a new entry in Sunshine to toggle HDR off when I connect, and back on when I disconnect: This avoids downloading any sketchy code (other than that one line .BAT file I posted to send a keystroke). You shouldn't need to download any external code that you may not trust since we're relying on the Xbox Game Bar application to handle toggling HDR, which is installed on Windows 11 by default. |
|
lol I shared the code, it's not that sketchy :P |
|
Of note that it's not just windows that you should take care of controlling, but potentially the drivers helper libraries too. |
|
To send the keystrokes will only toggle the current HDR mode on the host. I used nircmd to send win+alt+b as do and undo until i found this solution via the dll-thing. |
This comment was marked as spam.
This comment was marked as spam.
|
I kind of disagree that this is a feature request? When I connect to my computer, the colors are often blown out and wrong. That is not a "feature" to have the colors be correct, that is basic functionality that is now broken in HDR. |
This comment was marked as spam.
This comment was marked as spam.
|
@Nonary @anaisbetts EDIT: |
|
I think that there shouldn't be an option in sunshine but in moonlight like this: |
@anaisbetts I think you may have stumbled upon a latent bug in our handling of Advanced Color SDR displays. While HDR can't be streamed color-accurately to SDR clients, clients with HDR enabled should always be able to receive color-accurate SDR streams (and should adjust their display mode accordingly to the HDR state of the host). In other words, it's expected to be fine to leave HDR enabled in Moonlight all the time, regardless of the state of HDR on the host. I have a fix for this issue in #1178 |
|
isn't this rather a bug in Moonlight which would have to do tonemapping if it receives a HDR signal from the server, but the client only has SDR capability? Or would tonemapping add to much additional latency? Because at the end of the day, sunshine clients (like moonlight) basically are just fancy low latency video players, and any other video player processing HDR content on a SDR screen also has to do tonemapping. |
|
Has this been worked on? I'm still getting overblown colors if i don't manually disable HDR on the host computer before connecting |


Uh oh!
There was an error while loading. Please reload this page.
Is there an existing issue for this?
Is your issue described in the documentation?
Is your issue present in the nightly release?
Describe the Bug
Similar to Gamestream, the new HDR support in nightly works when the PC and client agree on whether HDR should be enabled, but when they do not, color is distorted. This makes using HDR difficult in an environment with both HDR and SDR clients, because the colors will always be distorted on either one device or the other one without manual intervention.
Expected Behavior
Additional Context
Some gross code to do this can be found at https://github.com/fandangos/AutoHDR
Host Operating System
Windows
Operating System Version
10.0.25281.1000
Architecture
64 bit
Sunshine commit or version
LizardByte/Sunshine@bcd5188
Package
Windows - installer
GPU Type
Nvidia
GPU Model
NVIDIA GeForce RTX 3080
GPU Driver/Mesa Version
527.19
Capture Method (Linux Only)
No response
Relevant log output
No response
All reactions