Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix disable resetting color+temp continuously #719

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mfontani
Copy link

To reproduce without this patch:

  1. run ./src/redshift -v in a terminal
  2. in another terminal, pkill -USR1 redshift
    ... which ought to disable its processing altogether, once completed
    ... but doesn't :(
  3. while it's disabled, manually set the brightness:
    xrandr --output HDMI2 --brightness 0.5
  4. after a few seconds (default is 5secs between iterations), the
    brightness (and temp) jumps up again despite redshift being disabled

With this patch, instead - the resetting of colour and temperature is
done only once after the program's been disabled, and subsequent changes
of brightness or temperature etc. via a separate xrandr while the
program is disabled have the desired effect (i.e. they stick instead of
being reset by a "disabled" redshift program).

Once the program is re-enabled again (i.e. via another pkill -USR1 redshift), the program is again allowed to make changes to brightness
and temperature, as it ought to be able to.

To reproduce without this patch:

1. run `./src/redshift -v` in a terminal
2. in another terminal, `pkill -USR1 redshift`
   ... which ought to disable its processing altogether, once completed
   ... but doesn't :(
3. while it's disabled, manually set the brightness:
    `xrandr --output HDMI2 --brightness 0.5`
4. after a few seconds (default is 5secs between iterations), the
   brightness (and temp) jumps up again despite redshift being disabled

With this patch, instead - the resetting of colour and temperature is
done only once after the program's been disabled, and subsequent changes
of brightness or temperature etc. via a separate `xrandr` while the
program is disabled have the desired effect (i.e. they stick instead of
being reset by a "disabled" redshift program).

Once the program is re-enabled again (i.e. via another `pkill -USR1
redshift`), the program is again allowed to make changes to brightness
and temperature, as it ought to be able to.
@jonls jonls self-requested a review May 16, 2019 18:01
@belugame
Copy link

belugame commented Sep 9, 2019

Hope to see this merged soon. It currently makes it hard to control the brightness of an external screen with e.g. xrandr --output HDMI-1 --brightness 0.5 cause the change is reset after few seconds.

@@ -685,6 +686,7 @@ run_continual_mode(const location_provider_t *provider,
if (verbose && disabled != prev_disabled) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This conditional is wrong, see https://gitlab.com/chinstrap/gammastep/-/issues/2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants