5

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?

1 Answers1

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.

Law
  • 156