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

{Request} Delay before setting brightness #8

Open
ritujb opened this issue Sep 5, 2018 · 8 comments
Open

{Request} Delay before setting brightness #8

ritujb opened this issue Sep 5, 2018 · 8 comments

Comments

@ritujb
Copy link

ritujb commented Sep 5, 2018

Is it possible to add an option to set the saved brightness after a set Delay such that critical programs (MSI dragon center in my case) which don't let this program work properly can be used in conjuction with it.

I use Dragon Center to set a manual fan control hence it is necessary.

Something like::
Load current brightness level(also monitor brightness change) -> Wait for power source change event -> Source Changed -> Delay -> Set the previously loaded brightness value for current source

Hope you can impement this.

@jay
Copy link
Contributor

jay commented Sep 6, 2018

If there is another program setting the brightness there will be a race condition.

@ritujb
Copy link
Author

ritujb commented Sep 6, 2018

Yeah I know. I will manually determine after how much time the other program sets the brightness and then set a delay just greater than that time, so that this program can set the desired brightness.

@jay
Copy link
Contributor

jay commented Sep 6, 2018

What I'm saying though is there is still a race condition. I suggest if you don't like what the other program is doing with your brightness then contact them and ask for a way to disable that feature.

@ritujb
Copy link
Author

ritujb commented Sep 6, 2018

I don't understand.
Why would there be still a race condition if we set the brightness after the other program has already done its deed.

The program itself doesn't have any control for brightness, I just found that when I close it, then your program runs properly.

@jay
Copy link
Contributor

jay commented Sep 6, 2018

There's just no guarantee if another program is also changing the brightness. You're assuming it will already be done. The program may still set the brightness after (or again, after).

@ritujb
Copy link
Author

ritujb commented Sep 6, 2018

I assure you that it won't. It only changes changes brightness after approx 1 seconds of a power source event is detected. If you can modify this program to add a custom delay through command line options, I can overcome that.

@ritujb
Copy link
Author

ritujb commented Sep 6, 2018

NVM, I have done it using AutoIt

jay added a commit to jay/LinkBrightness that referenced this issue Sep 6, 2018
@jay
Copy link
Contributor

jay commented Sep 6, 2018

Ok. I went ahead and implemented the option in branch opt_syncdelay (diff) in my repo. In my opinion delaying the sync is a bad idea and should not be added to the official version.

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

No branches or pull requests

2 participants