16

Can anyone tell me how to automatically dim my monitors when it gets dark at night?

Nifle
  • 34,203
  • 26
  • 108
  • 137
  • This could be accomplished using a cronjob with a simple script (at least under Linux). Maybe I'll write such a thing when I get home. – Bobby Jun 07 '10 at 09:54
  • Hey @Bobby, did you get home? ;) Just, wondering if you have that script? – nocibambi Jan 25 '21 at 14:18
  • 1
    Nope, never made it home...anyway, the easiest why would be to use Redshift directly. For example: `redshift -b 0.8:0.1 -l 8:50 -t 6500:6500`. This will keep the color temperature as is, but dim the monitor from 0.8 during the day to 0.1 during the night. Of course, swap out the location for your own. This has the upside to adjust automatically when it comes to time of day, instead of having to calculate that in a script. – Bobby Jan 25 '21 at 19:47
  • @nocibambi I also extended Nifles answer on that matter. – Bobby Jan 25 '21 at 20:26

6 Answers6

15

One app to try

f.lux™ Better lighting...for your computer

it makes the color of your computer's display adapt to the time of day, warm at night and like sunlight during the day.

Available for XP/Vista/7, OSX and linux

Nifle
  • 34,203
  • 26
  • 108
  • 137
  • This one is fine – Martin Marconcini Jun 09 '10 at 11:29
  • I can't recommend F.lux enough! – Canha Aug 03 '12 at 20:53
  • 2
    At least the OS X version of Flux doesn't currently allow changing the brightness. The only thing it can do is increase the color temperature at night (or day). – Lri Aug 03 '12 at 22:42
  • 4
    It appears the Windows version also doesn't do brightness dimming, but just color temperature. Both _together_ are essential though, and f.lux at least has done the complicated and rare half of doing the color side - automatically no less. The question is, what app can automatically DARKEN the screen on a schedule (and/or with hotkeys for up/down)? –  Jun 28 '14 at 09:25
  • 1
    Doesn't currently work with monitors attached via port replicators. – Magellan Oct 14 '14 at 02:15
  • 2
    Flux is a great app but it does not solve the asked question. Flux merely shifts the color spectrum, does nothing for brightness. – Jason L. Mar 17 '17 at 01:38
7

None of the currently suggested solutions actually change the brightness of the monitor automatically at night. Especially if you are on a desktop setup changing the brightness of each of your monitors is a pain.

This utility from Nirsoft allows you to change monitor variables from the command line. By creating a tasks in Windows' Task Scheduler to run at a certain times you could set your monitors brightness to progressively lower values.

However that solution is not completely seamless. If you're OK with using freeware to solve this issue, ClickMoniterDDC is a GUI that can change the brightness of monitors at certain times and far more.

Momizer
  • 151
  • 1
  • 5
6

You can use Dimmer for Windows to lower the brightness itself between 5% and 95% opacity.

f.lux is great, but it just doesn't do enough; you can use it in combination with Dimmer, though.

Mateen Ulhaq
  • 3,452
  • 6
  • 35
  • 56
  • 1
    dimmer actually changes the colors of the pixel – JinSnow Oct 03 '19 at 04:50
  • 1
    Dimmer is nice, but it has no automatic timing feature and it will not gradually dim the display. You can rig up a script or batch file, to be executed with Task Scheduler, that would add these features. But it would be best to have them built in. – user697473 Mar 05 '20 at 13:20
4

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.

By default Redshift does not directly dim the picture, but instead shifts the color into red. We can disable the color shifting by using -t 6500:6500 as parameter. Additionally, with -b we can set the brightness of the image to use, for example -b 0.8:0.1 will dim the image from 0.8 during the day, to 0.1 during the night.

Of course, all this does not change the settings of the monitor itself, it can only adjust the image that is being send to monitor. If your monitor is configured to be too bright, even a dark gray might be too bright in the night.

Bobby
  • 8,944
  • 3
  • 37
  • 45
Nifle
  • 34,203
  • 26
  • 108
  • 137
3

I have written a program which does exactly this:

Changes monitor brightness (not colour temperature) based on the time of sunset and sunrise:

It is available here: https://github.com/jacob-pro/solar-screen-brightness

It works for both external displays (DDC/CI) and laptop screens, on Windows & Linux.

jacob_pro
  • 171
  • 5
  • If you are on MacOS I think https://github.com/alin23/Lunar will do what you are looking for – jacob_pro Nov 07 '21 at 15:42
  • There is unfortunately an issue where using DDC too often will wind up making some monitors stop working. It has to do with the monitor writing the settings. It's the reason f.lux does not use DDC. https://forum.justgetflux.com/topic/7701/control-monitor-bluelightlevel-and-brightness-directly-with-ddc-ci-protocol/3 – trlkly Nov 20 '21 at 12:02
  • @trlkly I have not actually ever seen any evidence that this absurd claim is true! In the case of my monitors changing brightness via DDC/CI doesn't persist into the monitor settings, it is only temporary whilst it is connected. – jacob_pro Nov 21 '21 at 14:42
0

If you're using Linux, ddcutil can change a monitor's actual brightness. This should work for any monitors that support that capability via Display Data Channel (DDC has been around for some time, so I suspect it would be widely supported). I use ddcutil to automatically adjust my monitor based on the ambient light level sampled from a webcam.