The blue light emitted by most electronic devices, is known for having a negative impact on our sleep. We could simply quit using each of our electronic devices after dark, as an attempt to improve our sleep. However, since that is not really convenient for most of us, a better way is to adjusts the color temperature of your screen according to your surroundings. One of the most popular ways to achieve this is with the Redshift utility. Jon Lund Steffensen , the creator of Redshift, describes his program in the following way:
Redshift adjusts the color temperature of your screen according to your surroundings. This may help your eyes hurt less if you are working in front of the screen at night.
The Redshift utility only works in the X11 session on Fedora Workstation. So if you’re using Fedora 24, Redshift will work with the default login session. However, on Fedora 25, the default session at login is Wayland, so you will have to use the GNOME shell extension instead. Note, too that the GNOME Shell extension also works with X11 sessions.
Redshift is in the Fedora’s repos, and thus, all we have to do to install is run this command:
sudo dnf install redshift
The package also provides a GUI. To use this, install
instead. Remember, though, that the utility only works on X11 sessions.
Using the Redshift utility
Run the utility from the command line with a command like the following:
redshift -l 23.6980:133.8807 -t 5600:3400
In the above command, the -l 23.6980:133.8807 means we are informing Redshift that our current location is 23.6980° S, 133.8807° E. The -t 5600:3400 declares that during the day you want a colour temperature of 5600, and 3400 at night.
The temperature is proportional to the amount of blue light emitted: a lower temperature, implies a lower amount of blue light. I prefer to use 5600K (6500K is neutral daylight) during the day, and 3400K at night (anything lower makes me feel like I’m staring at a tomato), but feel free to experiment with it.
If you don’t specify a location, Redshift attempts to use the Geoclue method in order to determine your location coordinates. If this method doesn’t work, you could use multiple websites and online maps to find the coordinates.
Don’t forget to set Redshift as an autostart command, and to check Jon’s website for more information.
Redshift GNOME Shell extension
The utility does not work when running the Wayland display server (which is standard in Fedora 25). Fortunately, there is a handy GNOME Shell extension that will do the same job. To install, run the the following commands
sudo dnf copr enable mystro256/gnome-redshift sudo dnf install gnome-shell-extension-redshift
After installing from the COPR repo, log out and log back in of your Fedora Workstation, then enable it in the GNOME Tweak tool. For more information, check the gnome-redshift copr repo, or the github repo.
After enabling the extension, a little sun (or moon) icon appears in the top right of your GNOME shell. The extension also provides a settings dialog to tweak the times of the redshift and the temperature.
Redshift could be seen as the open-source variant of F.lux. There is a linux version of F.lux now. You could consider using it if you don’t mind using closed-source software, or if Redshift doesn’t work properly.
Twilight for Android
Twilight is similar to Redshift, but for Android. It makes reading on your smartphone or tablet late at night more comfortable.
This is the Redshift GUI version for KDE. You can find more information on github.
GNOME Shell extension should be on official repository. This piece of software is a must!
For Android there is also Red Moon, https://github.com/raatmarien/red-moon
Unlike Twilight it is open source.
Thanks for mentioning this. For Android, there is also Yet Another Auto Brightness (YAAB) which automatically adjusts screen brightness to correspond with the amount of light its camera senses. YAAB and Red Moon can be used together by setting “Dim level” to 0% and turning off “Lower brightness” in Red Moon’s settings.
Open source alternative to Twilight for Android:
You can use Redshift with Wayland too, but it takes some work for the time being.
Nice. I’ve been using xflux but it stopped working after xorg server updated to 1.19.1. It’s good to know this software and it works for me.
Thank you for the detailed instructions to add Redshift as a Gnome shell extension under Wayland. I needed that!
Works like a charm!
I’m also using Redshift on Fedora 24, with no problem. The only gripe I have is that this requieres a internet conenction to work/activate. Without Geoclue it’s helpless.
While back when I was using flux on Ubuntu, once setup,it would work properly even with NO INTERNET .
Making this internet-dependant makes it less practical for people who use computers offline .
I thought that Flatpak could/would solve such issues. For example apps based on specific distro, like f.lux and PacketTracer 7.0 from Cisco that are compatible with Ubuntu, could work in Fedora with the use of Flatpak.
But it doesn’t seem that to be the case.
Ed: Setting the provider to ‘manual’ & entering your latitude/longitude allow you to use redshift offline (you can put those values into ~/.config/redshift.conf like:
Just FYI: This is not limited to “Fedora Workstation” which is simply just Fedora with Gnome. The article should reflect that this also works on Fedora 25 Plasma 5 default install, which uses X11.
For KDE Plasma the linked plasmoid is outdated… We have an applet for Plasma in official repository: https://apps.fedoraproject.org/packages/plasma-applet-redshift-control
So just dnf install plasma-applet-redshift-control and add it to your panel 😉
I wonder how many people are using my copr. I just popped it on there for personal use and before you know it, I see blog posts popping up.
Note that the GNOME extension works for both Wayland and XOrg, so if you still use X and f.lux or redshift gives you issues, you can always give the extension a shot. For example, I used to use redshift but I found it would flicker a lot.
Regarding the Redshift GNOME Shell extension; its Github page (https://github.com/benzea/gnome-shell-extension-redshift) explicitly warns users:
I can also see the GNOME bug 741224 still open, which would seem to imply that such a patch is needed. (https://bugzilla.gnome.org/show_bug.cgi?id=741224, left somehow in limbo, with an ambiguous comment from November last year).
So, are the instructions in this post enough to have the GNOME version of redshift working ? If the daemon patching is required, the process is far more involved than the guide above would indicate. Making this clear either way would be very helpful.
Regarding the “Redshift GNOME Shell extension”: its Github page (https://github.com/benzea/gnome-shell-extension-redshift) warn users that:
Is this sill the case ? If yes, then the steps are far more involved than what the guide above would indicate. Please clarify.
The copr repo ships a patched version of gnome-settings-daemon:
Wayland solution worked out of the box, thanks! But I would like to have more general brightness adjustment, not just along this physical color scale. Or at least have a 2-dimensional color and intensity scale.
Many screens have LED backlights with very limited brightness adjust possibilities. One can use dark themes, but that always creates some mess somewhere when you want to use an older application that doesn’t adapt properly or when you do remote desktop/VNC, etc, a generic way of getting it everywhere would be much better.
I have been trying earlier to go through the gnome accessibility settings to adjust brightness on the screen from SW but that did not work for me (bug filed). I suppose you could go through the color profile stuff to hack it in but that’s a bit painful and kind of backwards.
Or you could just turn off your devices and leave them in another room (than your bedroom) when going to sleep.
Nice idea of promoting something like Redshift but unfortunately useless. Under a default configuration, it simply wouldn’t work with the most recent Fedora release.
Recommending third-party repositories for Fedora seem not cool either…
In my defence, I am a fedora dev, but the copr is ultimately a hacky interim solution until someone can come along and properly implement it in GNOME.