Skip to content

protocols: Don't update hdr metadata if image description is unchanged#9776

Merged
vaxerski merged 1 commit into
hyprwm:mainfrom
PlasmaPower:frog-cm-eq-update
Mar 30, 2025
Merged

protocols: Don't update hdr metadata if image description is unchanged#9776
vaxerski merged 1 commit into
hyprwm:mainfrom
PlasmaPower:frog-cm-eq-update

Conversation

@PlasmaPower

Copy link
Copy Markdown
Contributor

Describe your PR, what does it fix/add?

Gamescope sends a new frog color management protocol set_render_intent, set_known_container_color_volume, and set_known_transfer_function every commit. Previously, this would trigger a modeset every commit, despite the new image description being equal to the old image description.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

I'm not familiar with color management so it might be good to get @UjinT34's review, but this PR does fix the issue for the user who reported it on Discord.

Is it ready for merging, or does it need work?

Ready for merging

@vaxerski vaxerski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks reasonable to me, but I'll wait for ujin's input

@UjinT34

UjinT34 commented Mar 29, 2025

Copy link
Copy Markdown
Contributor

lgtm

Won't help if client keeps spamming different image descriptions. Might happen to gamescope with mangohud. Looks like it alternates between the game and mangohud layer but always ends up with the same description. If something throws it off then it may result in non-working hdr or constant sdr - hdr switching.

@PlasmaPower

Copy link
Copy Markdown
Contributor Author

I think the different settings are on different subsurfaces so it's fine. It at least fixed the issue for the user who reported it and whose logs we've been looking at. There might be a second issue of how to deal with multiple subsurfaces but this at least fixes the performance part.

@UjinT34

UjinT34 commented Mar 29, 2025

Copy link
Copy Markdown
Contributor

I think the different settings are on different subsurfaces so it's fine. It at least fixed the issue for the user who reported it and whose logs we've been looking at. There might be a second issue of how to deal with multiple subsurfaces but this at least fixes the performance part.

cm, hdr and cm_fs_passthrough = 0 will handle everything. Might be less performant and will look differently in some cases. I am not sure which hdr variant is correct. Might be neither. Passthrough works the same as before CM shader. CM shader in theory should provide a more correct result given that monitor settings. EDID and CM shader math are correct. Passthrough is unreliable because clients usually ignore monitor capabilities.

@UjinT34 UjinT34 mentioned this pull request Mar 29, 2025
@vaxerski vaxerski merged commit 86c279d into hyprwm:main Mar 30, 2025
WhySoBad pushed a commit to WhySoBad/Hyprland that referenced this pull request Apr 3, 2025
crthpl pushed a commit to crthpl/Hyprland that referenced this pull request Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants