-
-
Notifications
You must be signed in to change notification settings - Fork 957
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. |
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. |
The wiki settings for steam, |
Testing with Shadow of the Tomb Raider and Wine 9.22: it may be an issue with NVIDIA cards, but I lose several things: being able to use >60fps, as well as DLSS entirely, in the initial settings menu. Upon activating HDR then attempting to launch, the entire game crashes. |
how big of a task is this because i might want to contribute |
I am also a bit out of the scope of the knowledge required here in terms of how it is related to the desktop, but. Will or should the desktop (the windows) be rendered also in the HDR mode (in other words, can/should we be able to enable the HDR mode for the desktop itself)? Does it even make sense? It is done in windows, so I don't know what we should have in Linux. Another thing, as a positive answer to the first question, is we should somehow set the luminosity limits for the UI of the desktop elements rendered then? |
This is what they (and i) was talking about earlier, the option |
Also, this might be worth following to fellow firefox users browsing this thread |
Yeah, I'd love to work on some of the tone mapping for base SDR content, I'm not too sure how much work it'll be. Still unsure if I can get the HDR content working in any game right now though, having a ton of issues. |
Hey, I just tried this with the xx_color_management_v4 config variable, but the colors seem undersaturated unless I do hdr = true, which makes them oversaturated as expected EDIT: the colors are actually just a lot brighter, but still undersaturated. |
On KDE, If I launch Path of Exile 2 with gamescope --hdr-enabled -f -- %command% I can select HDR in game. (as long as HDR is enabled in KDE display settings). On Hyprland, even with xx_color_management variable enabled I cannot select HDR in-game. I also tried with wide_gamut and hdr enabled with no change. Is there some additional magic KDE is doing here? |
KDE has a builtin layer similar to https://github.com/Zamundaaa/VK_hdr_layer. On HL it should be installed manually. |
Gamescope injects DXVK_HDR automatically: Inspecting the process on Kwin I can see DXVK_HDR=1 is set. On Hyprland it is not. (forcing it doesn't help either). I'll keep messing with my hyprland config, maybe there's some settings I have breaking it |
i just gave it a try. A few things i've notices: 1: if i don't turn on experimental:wide_color_gamut, my hdr content looks really washed out. I need to turn it on (meaning i'm also forced into YCbCr) after enabling wide_color_gamut, restarting my system has fixed the issue of my screen only running at 60hz and the issue where the YCbCr colors looked weird. edit: |
maybe related? hyprwm/aquamarine#127
I'm not experiencing framerate drops with with |
#9064 if someone is willing to jump into this rabbit hole |
I can't tell the frame rate drops yet, I haven't actually managed to get anything to run with HDR yet natively. I'm going to test with media players instead of games now though. And yea, I'll probably hop on the colour translation protocol coding 🫡 |
I've been able to test a few things using an RTX 3090 plugged into an HDR monitor. My system's graphics info➜ inxi --graphics Graphics: Device-1: NVIDIA GA102 [GeForce RTX 3090] driver: nvidia v: 565.77 Device-2: Advanced Micro Devices [AMD/ATI] Raphael driver: amdgpu v: kernel Display: wayland server: X.org v: 1.21.1.15 with: Xwayland v: 24.1.4 compositor: Hyprland v: 0.46.0-115-ga6b26371 driver: X: loaded: modesetting,nvidia dri: radeonsi gpu: nvidia,nvidia-nvswitch resolution: 3440x1440~175Hz API: EGL v: 1.5 drivers: nvidia platforms: gbm,wayland,x11,surfaceless,device API: OpenGL v: 4.6.0 vendor: nvidia v: 565.77 renderer: NVIDIA GeForce RTX 3090/PCIe/SSE2 API: Vulkan v: 1.4.303 drivers: N/A surfaces: xcb,xlib,wayland Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo de: kscreen-console,kscreen-doctor gpu: nvidia-settings,nvidia-smi wl: wayland-info,wlr-randr x11: xdpyinfo, xprop, xrandr
|
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