Skip to content
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

Add support for CTM (color transformation matrix) #89

Closed
sfiedler0 opened this issue Sep 30, 2024 · 10 comments
Closed

Add support for CTM (color transformation matrix) #89

sfiedler0 opened this issue Sep 30, 2024 · 10 comments

Comments

@sfiedler0
Copy link

I am currently working on Asahi Linux with Hyprland. Everything works perfectly, except for night light. After some research I found AsahiLinux/docs#67.
The mentioned gammastep issue had a comment pointing to an issue in wlroots. As Hyprland is independent now (and uses aquamarine which does the gamma LUT stuff), I thought it'd be a great idea to implement the CTM here too.

@vaxerski
Copy link
Member

hm, the problem is that wl-sunset et al that control this on hyprland via the wlr gamma protocol can only provide a ramp, not a matrix. How would we control the amount of red-shifting?

@sfiedler0
Copy link
Author

sfiedler0 commented Oct 1, 2024

I don't know exactly how KDE did it, but they have CTM support merged: https://invent.kde.org/plasma/kwin/-/merge_requests/3296

@vaxerski
Copy link
Member

vaxerski commented Oct 1, 2024

they dont have to support stuff like wl-sunset though (and they dont)

while we do

@sfiedler0
Copy link
Author

sfiedler0 commented Oct 1, 2024

They seem to have updated some gamma control code too though. So it looks like they use the CTM through gammaControl if I interpreted the C++ code right (I like programming, but not in C++).

@vaxerski
Copy link
Member

vaxerski commented Oct 1, 2024

no, they didnt

@sfiedler0
Copy link
Author

So CTM control is ready for a new wlr protocol?

@vaxerski
Copy link
Member

vaxerski commented Oct 7, 2024

wlr makes no sense (we arent wlr anymore)

I'd either:

  • find out a method to convert gamma ramps to a ctm
  • ditch the external apps altogether, just make the ctm a configurable thing in the config
  • make a new hyprland protocol for ctm - could actually be nice with a hyprland-provided utility for night light

@vaxerski
Copy link
Member

vaxerski commented Oct 7, 2024

looking at drm support it seems that all drivers support CTMs. Well, all that matter. AMD, Nvidia, Intel.

@vaxerski
Copy link
Member

vaxerski commented Oct 7, 2024

I'll try to draft a protocol later today if I don't forget at hyprland-protocols. Ping me tomorrow if I don't

@vaxerski
Copy link
Member

vaxerski commented Oct 7, 2024

closing this as aquamarine is done. Hyprland see hyprwm/Hyprland#8023, client see https://github.com/hyprwm/hyprsunset.

If you compile from 8023 you should be able to use hyprsunset no problem, tested on my machine, but lmk if it works on apple.

cheers

@vaxerski vaxerski closed this as completed Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants