-
-
Notifications
You must be signed in to change notification settings - Fork 951
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
Support color management protocols #8715
Conversation
ref #4933 |
I'd also mark this as draft |
Frog CM can be tested. Most of the gaming stuff https://wiki.archlinux.org/title/KDE#HDR should work the same. I use https://github.com/Zamundaaa/VK_hdr_layer Will only work with successfully parsed EDID and fullscreen applications. |
idek how to test it or how to spot the difference. Only piece of equipment I have with hdr is my laptop |
|
well then I can't test. My monitors are old, garbage TN panels. No HDR here. |
Nice work @UjinT34 I tried mpv and Silent Hill 2, they seem work. But I need to manually set I will try to compare the color with KDE later. EDIT: I was wrong, I don't need to enable desktop hdr. |
I confirmed it's working in MPV using the following demo: https://4kmedia.org/lg-new-york-hdr-uhd-4k-demo/ Log samples:
I tested the video simultaneously in Hyprland and i3, switching between them to compare on the same monitor (AG322QC4). With hyprshade disabled, there was a subtle but noticeable difference - the colors were more vivid on Hyprland. To verify, I relaunched it from the main branch and performed the same comparison. This time, I observed no difference compared to i3, confirming that the changes made to aquamarine and hyprland were successful. Well done @UjinT34 ! Regarding the last log entry in the sample, was |
Fixed it |
i have access to an (ex-) xRite i1 DisplayPro colorimeter. is there anything in particular you'd want me to test? displaycal offers profile verification using a firefox window. would ff be colour managed here? i think not.. otherwise i could verify. |
Exact same for me. |
ya its expected behavior, but still wanna mitigate it somehow though also
so that would be another thing that we need to work on AQ? |
Added support @vaxerski should be ready for merging. Nothing to do here from the protocol perspective. At least until https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/14 is merged and some CM is ready. |
Great work getting this set up! I like using it already. Something I want to mention though and want to double check: Is this something other's experience with it? Running an Intel Arc using Xe so want to check if its a driver level issue. |
@Trimutex I have 2 HDR monitors. After playing HDR content (mpv or games), one can't go back to sdr, the other can but the color is over-saturated. To workaround it, I cycled I personally patch aquamarine to enable wide_gammut only when hdr metadata is exist |
Does this happen in kwin? This code creates hdr metadata and submits it for each frame. Same as kwin. It is the only thing I suspect to cause any cpu issues. Doesn't happen to me on nvidia. Note that some kwin settings might persist after kwin exits, better to disable hdr before exiting. If HDR mode is not cleared than it is likely a driver or a monitor bug. Cycling |
Maybe related to https://gitlab.freedesktop.org/drm/amd/-/issues/3357 |
Tested on KDE Plasma 6, the CPU usage increase doesn't occur there. Hyprland usage increases to 100% and stays there requiring a restart, affecting stuff like cursor movement as if the desktop is struggling. Maybe this is a driver bug that Plasma accounts for? Not too sure where to check deeper on what's keeping Hyprland busy. Side note to clarify: HDR toggle works and it clearly goes back to SDR, Hyprland CPU usage just stays at the 100%. |
needs aq dep bump, passing ci (possibly pull aq git) and resolving of the cpu issue. I'll test the MR later today or tomorrow and review this |
Some additional notes:
|
I have tested the MR and it... seems to work more or less. Although I don't really use HDR and stuff, I can clearly see the colorspace difference when enabling HDR and target colorspace vs not doing so. No-HDR one is overexposed and too bright. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we ball |
That's impressive. AFAIK, only kwin supported HDR, until now |
I am curious about this: do we need support from Firefox/Chromium/etc to enable us to view YouTube (or any other streaming content) in HDR? |
As far as I understand the wayland client needs to support HDR, so in the case of linux, yes Firefox needs to support the underlying protocol, before you can "just use" HDR on youtube in Firefox, atleast (I don't use chrome). |
So dynamic HDR should be supported by Hyprland as of this merge? Or is this just the color management protocols that got fixed up? Static HDR is still crispy fried oversaturation for me, just tryna get on the same page with regards to this PR as I'm a little new here to hyprland :) |
I'm not really a 'developer' so take my words with a grain of salt but to reiterate - if the client supports it then it will work. Just based on the naming scheme alone, I would hazard a guess that this supports the CM protocols, nothing more, nothing less. Further implementations beyond CM protocol support surely require more code to be written - either in hyprland, or in the wayland client. |
It supports CM protocols and passes hdr metadata as is. Should be enough for HDR10 which is static. Afaik HDR10+ (dynamic) isn't supported by the linux kernel. |
YO i was literally just thinking "i wonder if there is any progress on hyprland hdr", i see that this has been merged, click, DAMN |
yo wtf why these colours look goofy asf |
everything is incredibly oversaturated with experimental:hdr set to true, ebdbb2 looks almost neon highlighter yellow, tbf probably a monitor issue as its a fucking LG Ultragear scam hdr monitor |
Forcing it on is still quite crispy, it seems. In terms of passing metadata onto other applications, I'll test with some games and video apps in a bit 🫡 |
There is no tone mapping if you force it on. It's for testing for now. Will be usable with some CM. |
Describe your PR, what does it fix/add?
Add support for color management protocols xx-color-management-v4 and frog-color-management-v1. Will only store and pass color management properties. The actual CM should be implemented by someone else with means to verify that it works as expected. Passing hdr metadata without processing should be enough for fullscreen gaming.
experimental:wide_color_gamut
sets the colorspace toBT2020_RGB
. Might not be needed.experimental:xx_color_management_v4
enables both protocols. Requires restart.experimental:hdr
forces hdr in desktop mode. Will look weird without proper CM.Works only with correctly parsed EDID CTA-861 block. Will not work with hdr data from DisplayID blocks.
Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
Mostly copied code from other protocols. Might mess with pointers, have some redundant stuff and miss some bits.
Tested only the frog protocol. Most of the clients support both or frog only and will choose frog by default.
Is it ready for merging, or does it need work?
Ready. Requires hyprwm/aquamarine#112