jonls / redshift

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.
http://jonls.dk/redshift
GNU General Public License v3.0
5.92k stars 429 forks source link

Screen sometimes briefly turns back to normal temperature #143

Closed chtenb closed 9 years ago

chtenb commented 9 years ago

I'm using redshift-gtk on Ubuntu 14.04.

Sometimes when I do something, like starting a movie, deleting a file, starting a youtube video, the screens turns back to the normal temperature for a few seconds. Then it turns to the redshifted temperature again. This can be quite disturbing, especially if the difference in temperature is big.

Any ideas on what might cause this?

ghost commented 9 years ago

Sounds like #16, can you confirm that?

Brottweiler commented 9 years ago

This never happens for me except when closing some OpenGL games, or open nvidia-settings for example.

Playing a movie, redshift does not apply to the movie (which i think is good) but it's still running and is applied to everything else. deleting a file, starting a youtube video doesn't affect redshift at all for me.

chtenb commented 9 years ago

It's not exactly like #16, since this is specific to minecraft, while I'm having this problem in a lot more situations. Also I can not reproduce the issue consistently.

Brottweiler commented 9 years ago

@Chiel92 In that issue, it was because I especially noticed it with minecraft. It happens with other OpenGL games, and opening nvidia-settings. So it sounds related.

chtenb commented 9 years ago

Yes, it definitely is related, but it might not be the same since the description in #16 sound like it is consistently reproducible.

In any case, if it is impossible to lock the gamma ramps, would it still be possible to shorten the restoration time? That would reduce the pain to my eyes already. :)

lg188 commented 9 years ago

It currently happens to me in these programs/games: VLC (video only), Battle.net launcher, Diablo 3. But it doesn't happen on mpv.

maandree commented 9 years ago

VLC does not change the temperature for me.

jonls commented 9 years ago

The issue in #16 is not specific to Minecraft and as you note, it is impossible for redshift to lock the gamma ramps, so we can't really consider that part of the issue a bug in Redshift. You can try to ask the maintainers of the other program if they really need to reset the gamma ramps.

The current time between updates in Redshift is 5 seconds so that is the longest time that you would have to wait for the restoration of the redshift effect. There is a tradeoff between CPU/power usage and time between updates. We don't want to wake up too often as that can force a CPU out of its sleep state and increase power usage. Also, there used to be a problem where some (closed source) video drivers would spend enormous amounts of time to adjust the gamma ramps (I don't know if this is much of a problem anymore).

I think we could introduce a configuration option to set the update interval even lower but users have to be made aware of the tradeoff.

jonls commented 9 years ago

I'm closing this issue now. I have opened #154 to track the possible workaround of lowering the time between gamma adjustments.