Giter Site home page Giter Site logo

HDR support about twinkle-tray HOT 21 OPEN

xanderfrangos avatar xanderfrangos commented on May 18, 2024 7
HDR support

from twinkle-tray.

Comments (21)

lulle2007200 avatar lulle2007200 commented on May 18, 2024 4

@xanderfrangos I am starting to work on adding HDR support (unless you are already doing that?).
Basic idea is:
If there is atleast one monitor with HDR enabled, add an SDR brightness slider to the taskbar menu.
Clamp the SDR slider to the smallest peak brightness over all HDR monitors and the highest minim brightness over all HDR monitors, additionally make the range adjustabel in settings, those values come from monitor EDID or from OS default if EDID is not available.
For all monitors with HDR enabled, hide or grey out their "own" brightness slider by default, add a setting to show it anyway.
Additionally, a HDR toggle per monitor could be added.

Let me know what you think about this.

from twinkle-tray.

xanderfrangos avatar xanderfrangos commented on May 18, 2024 3

@lulle2007200 I'm not actively working on it. A PR for it would be very welcome. Are you working off the master or beta branch? In the beta branch I've added more code related to dynamically adding user-controlled sliders per-monitor. It might make sense to piggyback off of that instead of having it use separate logic/UI/settings for just the one slider. The HDR (well, SDR-in-HDR) slider could also replace the brightness slider and work off the existing "linked levels" and "normalize brightness" features. Either way, I'm sure the feature would make several users happy.

If you can get the code for updating the SDR brightness working per-display, I can get it wired up to the UI if needed.

from twinkle-tray.

lulle2007200 avatar lulle2007200 commented on May 18, 2024 2

@xanderfrangos Brightness of SDR content can be controlled programatically (see my answer here), HDR brightness cant be controlled by "design".

from twinkle-tray.

lightingman117 avatar lightingman117 commented on May 18, 2024 2

IMO, this is super complicated and while it would be lovely to fix in the future.

I don't think it would be worth the immediate effort. Dev time is precious.

Let's consider the use-case scenarios.
-Gaming - HDR looks glorious
-Movies - HDR is useful
-TV - eh?
-YT - eh?
-Work [spreadsheets]- eh?
-Other - who cares

I mainly want HDR to operate how f.lux works [disable for full-screen apps] (in reverse).

Enable HDR when full-screen apps are running. Disable when not (use brightness control).

HDR would now auto-enable (and f.lux would auto-disable) at the same time when I launch a game or a movie in full-screen.

This solves a few things:

  1. reduced dev time
    (ain't got time for dat)

  2. HDR functions as intended by developers
    (no fancy overrides/scaling)

  3. fixes several open tickets #447 #419 #316 #260
    (yay dopamine)

  4. gets a 'fix' in the hands of users sooner rather than later
    "Don't chase perfection when good will do." -someone

My 2cents

Thanks for awesome software!

from twinkle-tray.

lulle2007200 avatar lulle2007200 commented on May 18, 2024 2

I don't agree. Implementing the HDR on-off switching properly and correctly is not simple either and i don't think it requires less resources to implement. Besides that, why would you want to limit HDR to fullscreen (games)? YT and other platforms can deliver HDR content just fine, i might want to watch some content in one window while doing other stuff in another. Just straight up dismissing windowed HDR content seems a little too far.

Having what you propose is better than nothing, but it's only a workaround and doesn't really solve the original issue imo (not being able to control SDR brightness with HDR enabled).

from twinkle-tray.

lulle2007200 avatar lulle2007200 commented on May 18, 2024 2

Yeah, i am on the beta branch.

If you can get the code for updating the SDR brightness working per-display

Im currently researching how to do that. If it is possible to set per monitor, it'd make sense to just replace the slider for HDR monitors.

from twinkle-tray.

wywywywy avatar wywywywy commented on May 18, 2024 1

Ok I've found the registry key that the setting changes (tested on Win 11).

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\MonitorDataStore\DELA1E4#G7IYMxgwAAgX_10_07E6_A1\SDRWhiteLevel

The value is from 1000 (0%) to 3500 (50%) to 6000 (100%) in dec.

Once the SystemSettings.exe has changed the registry value, it calls something in D3D12 to actually apply the change.

I hope this is somewhat useful.

from twinkle-tray.

xanderfrangos avatar xanderfrangos commented on May 18, 2024 1

@wywywywy That might actually help. Thanks!

The only HDR display I have at the moment seems to control HDR brightness via DDC/CI, which is not normal. So someone else will have to look into this further for now.

from twinkle-tray.

xanderfrangos avatar xanderfrangos commented on May 18, 2024

Odd. I have an HDR monitor and the brightness slider works fine. I have no idea what controls that "HDR/SDR" bar and I don't think it affects true HDR content. Only SDR. I would assume the registry controls it, but I can't find any documentation on where/how it's stored.

from twinkle-tray.

musm avatar musm commented on May 18, 2024

Is your monitor 10-bit? Here are the other setting on that same page
image

from twinkle-tray.

musm avatar musm commented on May 18, 2024

This doesn't really help: https://support.microsoft.com/en-us/windows/hdr-and-wcg-color-settings-in-windows-10-2d767185-38ec-7fdc-6f97-bbc6c5ef24e6
Sadly I also wasn't able to find anything in the regsitry.

from twinkle-tray.

xanderfrangos avatar xanderfrangos commented on May 18, 2024

I haven't found much on my own either. Without access to a bunch of HDR monitors, I don't know that I'll be able to do much about this. In a future update, I'll allow users to exclude their monitor from Twinkle Tray. So at least HDR displays can be excluded.

If anyone can provide DDC/CI information about their own HDR display, documentation about adjusting HDR programmatically, or a PR for this feature, it would be greatly appreciated.

from twinkle-tray.

drewchurch avatar drewchurch commented on May 18, 2024

@xanderfrangos I just dug through procmon when making the HDR toggle and can't find anything that stands out.. it's very chatty at about 47k lines in just a few seconds. If there's anything I can look for, LMK.

Also, how can I provide you DDC/CI info? I've got two HDR compatible displays from different major manufacturers.

from twinkle-tray.

catshitz avatar catshitz commented on May 18, 2024

relevant issue here: couldn't reset back to normal mode brightness after turning on & off HDR mode (not the windows fake one but the true HDR mode in a game or a movie),
for example, when I finished playing RE3R in true HDR mode, the monitor will automatically come back to normal mode after I shut the game down(let's say the brightness in HDR is 70 and normal mode 20), at first the twinkle-tray doesn't effect anything until you click it on the traybar and call out its panel, then it'll somehow think you'are still in the HDR mode and automatically set your monitor brightness "back" to 70, which really is some flawness that needs to be fixed.

from twinkle-tray.

FlyingFaller avatar FlyingFaller commented on May 18, 2024

Also would like to see HDR support added if possible. Makes the app unusable because I like to keep Windows HDR enabled.

from twinkle-tray.

kev007 avatar kev007 commented on May 18, 2024

I recently upgraded to Windows 11 and the brightness control of my HDR monitor stopped working. As soon as I turn off HDR, it works again. Even the v1.14-beta1 version does not allow the control that the stable version did on Windows 10.

from twinkle-tray.

wywywywy avatar wywywywy commented on May 18, 2024

It appears that every 1000 equals 80 nit, although I kind of question that because my screen is supposed to be 400 nit max rather than 480 nit.

Anyway I found out how to get the SDR balance through the Win32 API. I think that to be able to set the SDR balance we'll have to make a call to the display driver.

Data structure: https://docs.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-displayconfig_sdr_white_level

Get: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-displayconfiggetdeviceinfo

Set: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-displayconfigsetdeviceinfo

from twinkle-tray.

xanderfrangos avatar xanderfrangos commented on May 18, 2024

@xanderfrangos Brightness of SDR content can be controlled programatically (see my answer here), HDR brightness cant be controlled by "design".

That's great! Thank you for sharing. I'm not sure when I'll have a chance to look into this again, but it's great to finally have a working example.

from twinkle-tray.

lulle2007200 avatar lulle2007200 commented on May 18, 2024

For HDR brightness control, you could adjust the (reported) peak luminance in color profile, but that is a hacky solution at best and most HDR applications and games ignore that anyway and roll their own brightness calibration.

I've also left some more info that may be relevant on the issue over at Monitorian, see link above.

from twinkle-tray.

T0biasCZe avatar T0biasCZe commented on May 18, 2024

Acts as a proxy and adjust the slider shown in the image above.
Right now I can mess around with the brightness slier in Twinkle tray, but it looks like it's corrupting my monitors brightness setting (which are disabled)

thats just your monitor. it depends on the specific monitor. For example on my samsung oddysey, I can control the screen brightness in the OSD menu when HDR is on
so twinkle tray should control the brightness when hdr is on on compatible monitors

from twinkle-tray.

ChiIIBiII avatar ChiIIBiII commented on May 18, 2024

Hey, having this feature would be awesome, how is it coming along? Maybe I'll have a look at it too. In the meantime, I wanted to point out that there is a script here that is adjusting sdr 'brightness' over multiple monitors if that helps

from twinkle-tray.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.