I have a Lenovo Thinkpad X1 yoga, which has an OLED display. This means the brightness isn't set in the usual way, but luckily you can get around that with scripts using xrandr --brightness. Specifically, I have a script set up that listens for brightness changes and then uses xrandr to implement them. Unfortunately, this does not take into account color temperature, and so does not pick up changes from Gnome Night Light. Where does Night Light store its current settings, and how does one get access to them? Or better yet, is there a way to convince Night Light to use xrandr to set brightness?

NB: This is not a duplicate of this question. OLED displays do not respond to the usual way of setting brightness. So Night Light by itself only changes the color temperature, but not the brightness. On the other hand, I can set the brightness with xrandr, but this overrides the color temperature. Can I get Night Light to use xrandr to set brightness instead of the standard method? Or, failing that, how do I read out Night Light's settings to set the correct temperature and brightness myself?

  • You can use this bash script to set brightness based on internet daily dawn and dusk times for your city: askubuntu.com/questions/894460/… Feb 1, 2018 at 11:26
  • @WinEunuuchs2Unix: Thanks, but that has two problems. First, that script uses intel_backlight to set brightness, which doesn't work for OLED screens. Second, that script only changes brightness, whereas I want to set the color temperature, as Night Light does. Feb 1, 2018 at 20:22
  • The point of the script is you could change Intel backlight command to xrandr quite easily. But bash isn`t for everyone I guess. Feb 1, 2018 at 22:45

1 Answer 1


redshift has a feature that lets you apply brightness on OLED screens on top of a color temperature. It is done like this:

redshift -m randr:screen=$oled_screen -P -O $temperature -b $brightness

$brightness is a value between 0.1 and 1.0. It's the same value you would set to xrandr --brightness, but redshift prevents values lower than 0.1, while xrandr allows for lower values, even 0.0 (pitch black).

$temperature is the temperature of the night light filter, 6500 for default, unchanged daylight values, 3500 is a common night filter value.

OLED Linux takes full advantage of this, to bring smooth brightness changes and night light together on OLED displays. To use this in GNOME, disable GNOME's built in Night Light feature and setup OLED Linux to your liking.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.