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

Feature: Add Wayland support #55

Open
schmittlauch opened this issue Mar 27, 2014 · 139 comments · May be fixed by #568
Open

Feature: Add Wayland support #55

schmittlauch opened this issue Mar 27, 2014 · 139 comments · May be fixed by #568

Comments

@schmittlauch
Copy link

schmittlauch commented Mar 27, 2014

I use a Jolla phone with SailfishOS which already uses Wayland as display server. One thing I'm really missing is color shift in the dark. Is there something similar to the X server extension used for Wayland?

@maandree
Copy link
Contributor

Check if it is possible load xwayland on your phone, it should work transparently then. It does not look like support for colour adjustments have been added to Wayland yet, or at least I have not been able to find the API. Personally I am eagerly waiting for Wayland and Haiku to add colour adjustments support.

@genodeftest
Copy link
Contributor

redshift doesn't work on XWayland (here on Fedora 21 Alpha under wayland/gnome-session) at least without any changes.

According to http://lists.freedesktop.org/archives/wayland-devel/2014-February/ (via: https://en.wikipedia.org/wiki/RandR ) there is a randr extension in wayland since February, but I didn't find any API or cli tool for it.

@maandree
Copy link
Contributor

Running grep -rni randr over the source code for Wayland and Weston reveals that there is no RandR support merged into either Wayland or Weston. However the reference for Wayland's support in the Wikipedia article contains mailing list posts with patches to add RandR support in Weston, nothing about RandR support in Wayland however (probably elsewhere).

In March I did successfully run Redshift in XWayland, so I don't know what has happened. (Have not retried.)

@ghost
Copy link

ghost commented Oct 19, 2014

As the OP is running Sailfish I thought it would be worth mentioning that it is now possible to run XWayland on it (http://talk.maemo.org/showthread.php?t=93828&page=2), so if you get the chance please do try if you can get Redshift to work (until it's possible to run Redshift on Wayland directly).

@pazooki
Copy link

pazooki commented Dec 22, 2014

redshift is broken on Fedora 21: Gnome Wayland

~ $ redshift -l 55.7:12.6 -t 5700:3600 -g 0.8 -m vidmode -v &
Location: 55.700001, 12.600000
Temperatures: 5700K at day, 3600K at night
Brightness: 1.00:1.00
Gamma: 0.800, 0.800, 0.800
Xlib:  extension "XFree86-VidModeExtension" missing on display ":1".
X request failed: XF86VidModeQueryVersion
Failed to start adjustment method vidmode

@maandree
Copy link
Contributor

Have you tried -m randr?

@pazooki
Copy link

pazooki commented Dec 22, 2014

Ya:

$ redshift -l 55.7:12.6 -t 5700:3600 -g 0.8 -m randr
Screen 1 could not be found.
Failed to start adjustment method randr.
Job 1, “redshift -l 55.7:12.6 -t 5700:3600 -g 0.8 -m randr &” has ended

@rubdos
Copy link

rubdos commented Dec 22, 2014

I'm also running Sailfish and I'd be interested too in this feature. Any updates on Wayland supporting randr?

@maandree
Copy link
Contributor

@pazooki

Try removing your redshift.conf. Most people with
two or more monitors do not have a "Screen 1",
only "Screen 0"; they usually have a "CRTC 1"
in "Screen 0".

@maandree
Copy link
Contributor

@rubdos

It looks like there still is no support in Wayland and that Weston only supports it but utilising colord.
So it looks like XWayland is still required, which does (or atleast did in March) support RandR.

@pazooki
Copy link

pazooki commented Dec 22, 2014

now it doesn't do anything, it just wait after running the commnad.

@maandree
Copy link
Contributor

Are you running a virtual or physical machine?
Does xgamma or xrandr work for you?

@pazooki
Copy link

pazooki commented Dec 22, 2014

I'm running it on my laptop, it's not a virtual machine.

~ $ redshift -l 55.7:12.6 -t 5700:3600 -g 0.8 -m xrandr
Unknown adjustment method `xrandr'.
~ $ redshift -l 55.7:12.6 -t 5700:3600 -g 0.8 -m xgamma
Unknown adjustment method `xgamma'.

@maandree
Copy link
Contributor

Ok.
I meant to programs xrandr and xgamma. For example xgamma -gamma 0.8.

@pazooki
Copy link

pazooki commented Dec 22, 2014

this is what I'm getting

~ $ xgamma -gamma 0.8
Xlib:  extension "XFree86-VidModeExtension" missing on display ":1".
Unable to query video extension version
~ $ xrandr
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 8192 x 8192
XWAYLAND0 connected 1280x800+0+0 260mm x 160mm
   [email protected]   0.00*+

@maandree
Copy link
Contributor

How about xrandr --output XWAYLAND0 --gamma 0.8:0.8:0.8?

@pazooki
Copy link

pazooki commented Dec 22, 2014

I think that made a difference. no errors

@maandree
Copy link
Contributor

How about redshift -O 4500 -m randr?

@pazooki
Copy link

pazooki commented Dec 22, 2014

it didn't do anything

@maandree
Copy link
Contributor

That's weird.

@genodeftest
Copy link
Contributor

$ redshift -l 49:11 -t 3500:4000 works fine under Fedora 21 + X.org – at least for me.

@lispykid
Copy link

I am also on Jolla. Will see if can test this over the holidays.

@Mikaela
Copy link

Mikaela commented Feb 7, 2015

Jolla/Sailfish here too, did anyone test this? Comments only talk about testing, but I don't see successful result.

@giucam
Copy link

giucam commented Feb 7, 2015

It will not work with xrandr and xwayland, since the screen is managed by the wayland compositor, and there is no wayland protocol to se the color temperature (yet).
http://lists.freedesktop.org/archives/wayland-devel/2015-January/019578.html

@genodeftest
Copy link
Contributor

Can this (theoretically) be done by gamma factors?

@genodeftest
Copy link
Contributor

randr and vidmode are not supported on wayland.
Another possibility is using DDC/CI with ddccontrol:
http://ddccontrol.sourceforge.net/
https://github.com/ddccontrol/

@giucam
Copy link

giucam commented May 2, 2015

I've written the support for some wayland compositors here: giucam@d3f54ed
The thing to be aware of is that it uses a protocol extension not in core Wayland, and at the moment the only compositor i know that implements it is this (wip): https://github.com/giucam/orbital/tree/gamma

This surely could be implemented in lipstick so that would answer the OP's question, however first i think it is necessary to understand the security implications. In the wayland world clients must not have the ability to screw the user interface, and a protocol like that could surely allow clients to do so.
Either we need some way to mark redshift as trusted or some way for the compositor to cope with malicious/bugged clients.

@jonls
Copy link
Owner

jonls commented May 2, 2015

@giucam That's very cool. It seems that your protocol does gamma adjustments directly. Would it be possible to have the protocol instead only allow adjusting the color temperature or perhaps a color overlay? Perhaps such a scheme could be more easily limited to avoid the security issues?

@giucam
Copy link

giucam commented May 2, 2015

@jonls It could work with the temperature directly, but i guess that would mean the compositors would need to do what colorramp.c does themselves. I don't really know anything about color management so that was easier for me, but it sure could be possible. I'm not sure that solves the security issue, though.
And not sure what you mean with a color overlay...

@cecton
Copy link

cecton commented Aug 15, 2018

There is an app called "Tint Overlay" for SailfishOS. https://openrepos.net/content/coderus/tint-overlay

@claudep
Copy link

claudep commented Jun 8, 2019

I just wanted to say thanks to @prahal and his gnomerr branch which saved my day (Debian 10 - GNOME 3.30).

@CubeTheThird
Copy link

Look like there's talks of adding colour profile calibration functionality to Wayland (see here), so we may eventually see redshift working on there too.

@mariusa
Copy link

mariusa commented Jul 5, 2019

More details here, hope these are useful?
https://gitlab.freedesktop.org/wayland/wayland/issues/99

@PiotrKozimor
Copy link

For anyone struggling with installation on Fedora 30:

$ sudo dnf install gnome-desktop3-devel
$ sudo dnf install glib2-devel

will install packages necessary for make process.
GLIB and GNOMEDESKTOP3 are required for gnomerr mode.

Analyze output of ./configure script to check if these are correctly recognised.

@prahal
Copy link

prahal commented Dec 11, 2019

gnomerr method : Updated vs master + fixes for gnome-shell 3.34
https://github.com/prahal/redshift/tree/add-gnomerr-method-v0.2

@Arnaudv6
Copy link

Kwin's proprietary gamma correction system, much like GNOME's proprietary gamma correction system, is only relevant in the context of each and not for the broader Wayland ecosystem.

As quickly written by @ddevault, please consider the broader wayland ecosystem.
we'd still have a chance to sway gnome and kde devs.

@Arnaudv6
Copy link

Please consider merging https://github.com/minus7/redshift/tree/wayland in.

@dvzrv
Copy link

dvzrv commented Apr 18, 2020

@jonls is this still happening? Six years have passed...

@hippi777
Copy link

hi all! :D

is there any1 here who knows anything about efforts on enlightenment? :D (with wayland primarily, but if it works on x, then i would appreciate any info about that as well. (previously i used mate, and now i really miss it!))

many thx for any help and for this nice gem! :)

@CubeTheThird
Copy link

is there any1 here who knows anything about efforts on enlightenment? :D (with wayland primarily, but if it works on x, then i would appreciate any info about that as well. (previously i used mate, and now i really miss it!))

There are several forks working on wayland support (some of which that seem to work), but it works fine under X, as that is what it was built around. The ones from minus7 and CameronNemo seem to be referenced here and there.

@hippi777
Copy link

tldr: nothing important here

@CubeTheThird ahh, so many thx!!! :) u just gave me back my belief in humanity, as when i rarely dare to ask for help, then mostly it yields something next to no help and waste of time :D

btw a fast duckduckgo gave no relevant info, and ive seen no straightforward info around those forks, but i obtained them to make it happen on my own whenever i will have some time to breathe :D (however at least i can see thx to redshift; otherwise currently im just in the middle of a big migration, so i also couldnt check it out)

@WhyNotHugo
Copy link
Contributor

The Arch User Repos package this fork, which has been working fine for me (using swaywm) for months.

@nkeor
Copy link

nkeor commented May 1, 2020

The Arch User Repos package this fork, which has been working fine for me (using swaywm) for months.

FreeBSD is applying that fork's commit when they build the package (Makefile), and it's working well on Sway 1.4

BTW it's this PR: #663

@WhyNotHugo
Copy link
Contributor

I do think this project is dead though. Last commit was over a year ago.

Hopefully someone might fork it and bring it back to life -- in the meantime, that fork is perfectly usable.

@hippi777
Copy link

hippi777 commented May 3, 2020

abandonware!=deadware; that will turn out to be true or not when it wont work anymore if ppl will fix it or not, while the pending issues probably belong to those who dont care enough, not to the happy users :D

@fourstepper
Copy link

I do think this project is dead though. Last commit was over a year ago.

Hopefully someone might fork it and bring it back to life -- in the meantime, that fork is perfectly usable.

What's stopping you from using this at it's state/packaging for your favorite distro?

@jonjonw
Copy link

jonjonw commented May 20, 2020

@prahal Thanks for the gnomerr fork! Is there any way to restrict it to specific display(s) on a screen?
ie, an equivilant to:

[randr]
crtc=0,2

@prahal
Copy link

prahal commented May 24, 2020

@jonjonw gnomerr is based on randr plugin. I was not aware of the config syntax for the crtc handling. Thanks for the pointer.

All that is required is change the section from randr to gnomerr.

[gnomerr]
crtc=0,2

@WhyNotHugo
Copy link
Contributor

What's stopping you from using this at it's state/packaging for your favorite distro?

This exact issue. I don't think there's been any activity on this repository in general though. The fork kinda works for me, so I guess that's good enough. 🤷

@bmltp
Copy link

bmltp commented Jun 10, 2020

We have got Night Shift in Gnome, I hope it provides same service as Redshift.

Gnome 3 36 2
Night Light

@mariusa
Copy link

mariusa commented Jun 10, 2020

It doesn't. redshift makes the screen less bright, which is critical. With gnome Night Shift, one gets a bright redlight screen.
https://bugzilla.gnome.org/show_bug.cgi?id=784810

@auscompgeek
Copy link

GNOME's night light also does not adjust colour temperature during the day.

@AnwarShah
Copy link

Anything new?

@CameronNemo
Copy link
Contributor

A fork, gammastep, exists with some light fixes to the PR linked above. https://gitlab.com/chinstrap/gammastep

@dvzrv
Copy link

dvzrv commented Aug 11, 2020

@CameronNemo thanks for the link. I have now moved gammastep to Arch Linux' [community] repository instead.

I don't believe this ticket will go anywhere and I'll unsubscribe.

@WhyNotHugo
Copy link
Contributor

I'd suggest others needing this feature just jump onto gammastep, seems to do just what everyone here is asking. Good luck!

@link2xt
Copy link

link2xt commented Oct 27, 2020

Another alternative: https://sr.ht/~kennylevinsen/wlsunset/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.