Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Slider sets itself off #76

Open
pflanzenandi opened this issue Oct 13, 2020 · 7 comments
Open

Slider sets itself off #76

pflanzenandi opened this issue Oct 13, 2020 · 7 comments

Comments

@pflanzenandi
Copy link

The slider moves to the left by itself since v. 17.0. The dimming of the screen light is not affected by this.

slider1

image

  • OS:Ubuntu 20.04
  • GNOME Version: 3.36.3
@kiyui
Copy link
Owner

kiyui commented Oct 13, 2020

@pflanzenandi I have actually noticed that it may shift a bit to either direction when logging into GNOME and directly previewing the aggregate menu. Is this what you mean or are there other ways to reproduce it?

@pflanzenandi
Copy link
Author

I cannot reproduce it exactly. But the slider always moves to the off position aka to the left on itself.
On an entire working day, I might look at this menu once an hour. And each time the slider has moved to the left (off).

In principle, this is only a cosmetic (annoying) bug, because the Night Light value is not changed by it.

I also connect my laptop via HDMI to an external monitor. Maybe this is the trigger.

@kiyui kiyui self-assigned this Oct 13, 2020
@kiyui
Copy link
Owner

kiyui commented Oct 13, 2020

Mm thanks, I'll try to observe this and figure out what causes it 😅

@julienfalque
Copy link

I have a similar issue but for me the slider is moved to the right instead of left (maybe because I enabled "Swap slider axis"). It seems to happen everytime I reboot or wake from suspend.

@pflanzenandi
Copy link
Author

@kiyui

I think the bug only occurs, if the slider is fully extended to the right.

@kiyui
Copy link
Owner

kiyui commented Oct 15, 2020

@pflanzenandi by fully extended to the right you mean that the night light is effectively disabled right? That might be an indicator, though I've added some logs so I can actually confirm it locally.

Compared to the previous release, v15, the slider now listens to changes from D-Bus so that even if the settings in GNOME Control Centre are changed, it should reflect on the slider.

Perhaps this shift is due to how GNOME tweens the night light over time, and the "Permanent night light" span of ∓6 hours may be too much. Another thing I can think of perhaps how I'm calculating the slider percentage, const percent = (this._proxy.Temperature - minimum) / (maximum - minimum) plus the mix of uint32 and double types 🤔

@kiyui
Copy link
Owner

kiyui commented Oct 23, 2020

The cause is actually quite simple and I did note it before:

The following is a representation of how the "Temperature" value updates over time when the slider is moved where,

  • The first x is the initial D-Bus value
  • The second x is the first value the proxy reports
  • The third x is the final value the proxy reports

A line graph spanning from 3540 to 1818 with 3 cross marks at 3538, 3521, and 1820

The unmarked head and tail span of the line is the actual system GSettings value

The only real fix for this would be to either,

  • Note the final "resting" temperature (time-sensitive & hacky, probably needs RxJS 🤪)
  • Ignore minor changes in temperature

I'm gonna note this as not really a bug™, but am open to suggestions or fixes

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

No branches or pull requests

3 participants