-
Notifications
You must be signed in to change notification settings - Fork 429
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
Wayland support (wlr_gamma_control_unstable_v1
)
#663
Conversation
Looks like the backported pkg.m4 I reverted breaks the build on Ubuntu 14.04. Meh. |
I can confirm this is working on sway 1.0 with a dual monitor setup, using both internal intel graphics on i915 and nvidia 970m with nouveau, while using prime. great job guys! |
I'm using this successfully as well, on an XPS 9370 with Intel integration i915. I do have one small bit of feedback -- Would it be possible to sniff sway/wlroots and default to using the |
@colemickens I tried to make the autodetect work for Wayland but at least when running Wayland on one tty and X11 on another it doesn't work on X11 anymore |
@minus7, just realized my own package updated and I didn't notice. Turns out your detection change works well for me (but I also don't run X11 and Wayland simultaneously. Presumably that's a rare scenario.) Thanks for this PR, would be great to see it merged! 👍 |
I've tried this on latest sway and wlroots master (swaywm/sway@cf6edaf and swaywm/wlroots@cf6edaf) and I noticed the following problems:
Otherwise it's working pretty good. |
Yes. This is by design. Instead, the oneshot mode should be replaced by a constant mode. I've heard macOS has the same issue.
No idea what could cause this. I can't reproduce. Maybe related to your graphics driver. |
@emersion The tearing is even more visible if running using oneshot mode (which just blinks briefly). By tearing I mean only the gamma itself is affected, not the applications themselves. There will be a tearline with differing color temperatures above/under. Likely because changes in the gamma ramps are not synchronized with vblank like everything else? Perhaps discussion of this issue in particular should move to the wlroots issue tracker, though? |
I "rebased and squashed" this. That makes it look a lot saner. Honestly, it was a nightmare of branches and merges. I had to resort to CC @Lourens-Rich @martinetd @breznak @t-8ch @giucam: Most of you have code in this :D |
Would be cool to see this merged, @jonls. Seems like a few people already use this branch through the AUR. @xantoz: The oneshot issue has been addressed by @martinetd by making it behave like on macOS/Quartz and simply blocking. There's a better solution under discussion in #690 |
TBH at this point it might be better to establish a proper fork. |
Only if the maintainers of that fork commit resources to keeping it up to date with the upstream. Otherwise we'll just end up with a further proliferation of these working-at-some-point branches and PRs. (Although I commend @minus7 for recognizing all the previous authors for their work in this particular patch.) The wlroots project seems like the obvious place for such a fork, if you have the bandwidth for it. |
Considering that there were ~15 commits during last year, I don't think keeping up with upstream is really an issue. @jonls just seems to be lacking time to review PRs. Unfortunately there's no other maintainer, so this project is kind of stuck. |
Oh, I didn't know about #704; someone made the effort of squashing the changes there already. I'm using Redshift on sway, so I'll keep maintaining my branch. |
(To follow up my comment in #704) I use redshift-wlr-gamma-control-git package, which uses minus7's wayland branch, and it works like a charm with AMDGPU driver on Sway now. @e00E Does it work for you too with minus7's wayland branch? |
Works since Linux 5.1 (I noticed since I downgraded to 5.0 for a moment) |
I'm using Linux 5.1.4 with Mesa 19.0.5. Yes, it looks like it was a bug in Linux 5.0. |
@x0rg How? The AUR package fails to build, didn't touch the pkgbuild or the source.
|
@freed00m: IDK, it works with
|
There's still two things bothering me with this patch:
|
Thx, I really must find what is the missing dep or what is causing my setup to fail. This is my log. redshift-wlr-gamma-control-git-1.12.r25.geecbfed-1-x86_64-build.log |
@freed00m: I have found this: bitlbee/bitlbee-facebook#49 (comment) |
It doesn't reproduce there, thank you very much! |
This has been open since 2018, and it seems like this repo hasn't been maintained much since then. Does anyone have the time/resources to maintain a fork? Or is the maintainer just slow? Not really sure what's up. |
@clarfon I may have some cycles available. See the master branch here https://github.com/CameronNemo/redshift |
Works as expected with both sway and wayfire master branches. |
Tested with Hikari and works fine |
@CameronNemo is there no chance to get this merged? |
This isn't CameronNemo's repo here. He made fork where it is merged (and redshift got renamed to gammastep after removing windows/mac support, with readme pointing to a gitlab repo that doesn't exist and no way to create issues...), but the only one who can make changes here is @jonls when he can find time to get around it. |
If I cleaned up my repo and marked a release, would anyone be willing to package it for:
? |
Would this be a “permanent” fork? I.e. do you have the interest and time availability to merge future work by the original upstream, or continue to develop it your own way? I would much prefer if we could somehow convince the principal (@jonls ?) upstream to merge this so that development efforts are consolidated in one place. Forks are great when upstream becomes unresponsive, but they're annoying to maintain in parallel and have a bad habit of running out of steam and becoming outdated once the original issue was satisfied... |
The original intention was to make it a permanent fork, but seeing as @jonls has been active in the past few weeks perhaps I need to adjust my trajectory. My biggest concern with a permanent fork would be missing out on the dbus service work that is going on in another fork (https://github.com/dkondor/redshift/tree/dbus_new). But I cannot wait any longer for a release with wayland support. I will fork by the end of the month and mark a release -- it is just a matter of whether that fork intends to stay in sync with upstream or not. I would hope some distros pick it up, because I know many people want wayland support, but that happening is not a blocker to me forking. I do appreciate @jonls activity in the past few weeks, responding to issues and reviewing PRs. I have a few questions for him:
|
@CameronNemo yes, I'm happy to take care of the nix package. |
For Arch Linux, I've just submitted @CameronNemo's fork (gammastep) to the AUR as gammastep-git. |
What a coincidence. I just put some finishing touches on the branch, made the gitlab repository public, and tagged a release. I did most of it last night but wanted to sleep on it. |
Sweet! I've pushed it to the AUR as gammastep, and have removed gammastep-git from the AUR. |
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.
Needed to apply a couple of commits on top of this.
int create_tmpfile_cloexec(char *tmpname) { | ||
int fd; | ||
mode_t prev_umask = umask(0066); | ||
#ifdef HAVE_MKOSTEMP |
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.
Will this ever be defined? There is no AC_CHECK_FUNCS([mkostemp]) in the configure.ac file.
https://gitlab.com/chinstrap/gammastep/-/commit/47502deb942dff764d9f896f1004eaaa9c3cf4ef
return -1; | ||
} | ||
|
||
#ifdef WLR_HAS_POSIX_FALLOCATE |
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.
This should be HAVE_POSIX_FALLOCATE, and see above
return -1; | ||
} | ||
|
||
void *ptr = mmap(NULL, total_bytes, |
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.
if gamma_size is 0 (i.e. when the output does not support setting gamma), the total_bytes will be zero and mmap will error with EINVAL.
https://gitlab.com/chinstrap/gammastep/-/commit/fdfec2bfb4ee8a44ae503a7c63a073453a17f176
… gopass Add intel-undervolt, kubectx, wf-recorder gammastep ticket: jonls/redshift#663
… gopass Add intel-undervolt, kubectx, wf-recorder gammastep ticket: jonls/redshift#663
FYI, I wrote a patch that updates redshift's AppArmor profile to make it work with this PR. |
ping @jonls , would be great to have this reviewed/merged |
@rustycl0ck We've all migrated over to the https://gitlab.com/chinstrap/gammastep fork |
Another alternative (with less features) is [wlsunset|https://sr.ht/~kennylevinsen/wlsunset/]. I'll close this MR since I don't use nor maintain it anymore. |
deprecated by gammastep jonls/redshift#663 (comment)
This continues the work from #568, replacing
gamma_control
with the newerwlr_gamma_control_unstable_v1
. This newer protocol changes how gamma ramps are passed to support some graphics card + monitor combinations that have large gamma ramps. The old protocol was limited to 4096 bytes for gamma ramps which the new one avoids by passing ramps via a file descriptor. A snippet of MIT-licensed code from Weston has been added for that.I'd like to get this merged upstream to not have it drag on longer. I can squash the changes if you want.
wlroots-based compositors already support this.