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

Almost working (but not quite) #5

Open
YoungGriff14 opened this issue Jan 9, 2018 · 10 comments
Open

Almost working (but not quite) #5

YoungGriff14 opened this issue Jan 9, 2018 · 10 comments

Comments

@YoungGriff14
Copy link

Firstly, I think this is a great idea and you're doing god's work.

Secondly, the console says that is changing the brightness every time I alter it. But when I unplug/plug in there are two console messages. The first one does the right thing, states the new brightness source which is equal to the old brightness and says 'Already in sync'. However, the message is then repeated, but with brightness level of the new power source last time it was used, and the brightness reverts to that level.

I've tried looking through the source code but my knowledge of C#/programming in general is very limited. I can try and provide any information to see where it's/I'm going wrong, however equally if you can't be bothered with this issue I understand!

I'm running Windows 10 and I downloaded the exe directly.

@HubKing
Copy link
Owner

HubKing commented Jan 9, 2018

I will test it on my laptop within this week and fix it.

@HubKing HubKing self-assigned this Jan 9, 2018
@HubKing HubKing added the bug label Jan 9, 2018
@jay
Copy link
Contributor

jay commented Jan 9, 2018

Are you running any other program that may also be setting the brightness? Are you running the most recent version of LinkBrightness, v1.1.6537.17456? How often is this issue reproducible? For example if you plug/unplug 5 times does the same thing happen all 5 times? Can you run the program in verbose mode (use command line switch /verbose), reproduce, and then paste that output here?

edit: I'm unable to reproduce this on a laptop running Windows 10 and using the most recent LinkBrightness, v1.1.6537.17456.

@YoungGriff14
Copy link
Author

YoungGriff14 commented Jan 9, 2018

I don't think any other program would be setting the brightness, and the issue happens every time the power source changes. Sorry for seeming a little dumb, but how do I go about using these command line switches? I can't type in the LinkBrightness console window and I wouldn't know what to type in the Windows command prompt, and how do I see the version number?

Edit: Managed to find the version number and yes it's the most recent version.

@YoungGriff14
Copy link
Author

Managed to get the commands working, not sure if this is the done thing but I'll just dump all the verbose output here, I can reformat or change the comment if needs be. The bug occurred quite a few times here, there's a nice example of it occurring right at the end.

============ [2018-01-09 10:27:08 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 40
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:08 PM] ============
Current power source: DC
AC brightness: 40
DC brightness: 40
Already in sync.

============ [2018-01-09 10:27:14 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 40
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:14 PM] ============
Current power source: AC
AC brightness: 40
DC brightness: 40
Already in sync.

============ [2018-01-09 10:27:14 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 95
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:14 PM] ============
Current power source: AC
AC brightness: 95
DC brightness: 95
Already in sync.

============ [2018-01-09 10:27:20 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 95
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:20 PM] ============
Current power source: DC
AC brightness: 95
DC brightness: 95
Already in sync.

============ [2018-01-09 10:27:20 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 40
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:20 PM] ============
Current power source: DC
AC brightness: 40
DC brightness: 40
Already in sync.

============ [2018-01-09 10:27:22 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 40
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:22 PM] ============
Current power source: AC
AC brightness: 40
DC brightness: 40
Already in sync.

============ [2018-01-09 10:27:22 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 95
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:22 PM] ============
Current power source: AC
AC brightness: 95
DC brightness: 95
Already in sync.

============ [2018-01-09 10:27:26 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 85
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:26 PM] ============
Current power source: AC
AC brightness: 85
DC brightness: 95
Changing DC brightness to 85.

============ [2018-01-09 10:27:27 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 75
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:27 PM] ============
Current power source: AC
AC brightness: 75
DC brightness: 85
Changing DC brightness to 75.

============ [2018-01-09 10:27:27 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 65
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:27 PM] ============
Current power source: AC
AC brightness: 65
DC brightness: 75
Changing DC brightness to 65.

============ [2018-01-09 10:27:27 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 55
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:27 PM] ============
Current power source: AC
AC brightness: 55
DC brightness: 65
Changing DC brightness to 55.

============ [2018-01-09 10:27:27 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 45
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:27 PM] ============
Current power source: AC
AC brightness: 45
DC brightness: 55
Changing DC brightness to 45.

============ [2018-01-09 10:27:28 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 35
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:28 PM] ============
Current power source: AC
AC brightness: 35
DC brightness: 45
Changing DC brightness to 35.

============ [2018-01-09 10:27:28 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 25
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:28 PM] ============
Current power source: AC
AC brightness: 25
DC brightness: 35
Changing DC brightness to 25.

============ [2018-01-09 10:27:29 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 15
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:29 PM] ============
Current power source: AC
AC brightness: 15
DC brightness: 25
Changing DC brightness to 15.

============ [2018-01-09 10:27:32 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 15
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:32 PM] ============
Current power source: DC
AC brightness: 15
DC brightness: 15
Already in sync.

============ [2018-01-09 10:27:32 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 40
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:32 PM] ============
Current power source: DC
AC brightness: 40
DC brightness: 40
Already in sync.

============ [2018-01-09 10:27:35 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 50
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:35 PM] ============
Current power source: DC
AC brightness: 40
DC brightness: 50
Changing AC brightness to 50.

============ [2018-01-09 10:27:35 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 60
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:35 PM] ============
Current power source: DC
AC brightness: 50
DC brightness: 60
Changing AC brightness to 60.

============ [2018-01-09 10:27:36 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 70
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:36 PM] ============
Current power source: DC
AC brightness: 60
DC brightness: 70
Changing AC brightness to 70.

============ [2018-01-09 10:27:36 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 80
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:36 PM] ============
Current power source: DC
AC brightness: 70
DC brightness: 80
Changing AC brightness to 80.

============ [2018-01-09 10:27:37 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 90
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:37 PM] ============
Current power source: DC
AC brightness: 80
DC brightness: 90
Changing AC brightness to 90.

============ [2018-01-09 10:27:39 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 100
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:39 PM] ============
Current power source: DC
AC brightness: 90
DC brightness: 100
Changing AC brightness to 100.

============ [2018-01-09 10:27:44 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 100
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:44 PM] ============
Current power source: AC
AC brightness: 100
DC brightness: 100
Already in sync.

============ [2018-01-09 10:27:44 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 15
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:44 PM] ============
Current power source: AC
AC brightness: 15
DC brightness: 15
Already in sync.

@jay
Copy link
Contributor

jay commented Jan 9, 2018

I think something else is changing/syncing the brightness. Are you running another copy of LinkBrightness at the same time or on a different user account? If not check for a 3rd party program that would be causing it.

An example from the beginning:

============ [2018-01-09 10:27:14 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 40
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:14 PM] ============
Current power source: AC
AC brightness: 40
DC brightness: 40
Already in sync.

============ [2018-01-09 10:27:14 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 95
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:14 PM] ============
Current power source: AC
AC brightness: 95
DC brightness: 95
Already in sync.

When a brightness event is received Windows will update either the AC or DC brightness depending on which is the current power source, or occasionally neither one of them (if there's some power saving measure for example). In that section though we can see both are already updated to 95, which is exactly what Windows doesn't do on its own, and what this program is designed to compensate for. That is why I suspect other software on your computer may be doing the syncing.

Another example from later on:

============ [2018-01-09 10:27:29 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 15
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:29 PM] ============
Current power source: AC
AC brightness: 15
DC brightness: 25
Changing DC brightness to 15.

============ [2018-01-09 10:27:32 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 15
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:32 PM] ============
Current power source: DC
AC brightness: 15
DC brightness: 15
Already in sync.

============ [2018-01-09 10:27:32 PM] ============
Received WmiMonitorBrightnessEvent.
Active : True
Brightness : 40
InstanceName : DISPLAY\CMN15CA\4&20ec8fa9&0&UID265988_0

============ [2018-01-09 10:27:32 PM] ============
Current power source: DC
AC brightness: 40
DC brightness: 40
Already in sync.

During that section it appears you switched from AC power to DC power, and at the time of the switch both were already set to 15. Yet in the same second another brightness event is received at 40 and is somehow already in sync. Did you switch to 40 at that time? For example did you plug it in and then immediately increase the brightness?

What version of Windows 10 are you using? (run winver)

@jay
Copy link
Contributor

jay commented Jan 10, 2018

Based on a re-read of the logs just now it's possible that there is no program other than a single instance of LinkBrightness doing the syncing, and instead what is happening is some 3rd party software is changing the power plan. That would explain why it went from 15 AC to DC 40 since at the beginning we can see it was DC 40, so maybe some program (or Windows?) is restoring that power plan.

@HubKing HubKing removed their assignment Jan 10, 2018
@HubKing HubKing added enhancement and removed bug labels Jan 10, 2018
@HubKing HubKing assigned HubKing and unassigned HubKing Jan 10, 2018
@HubKing
Copy link
Owner

HubKing commented Jan 10, 2018

Is it possible to assign this to you, "Jay".

@jay
Copy link
Contributor

jay commented Jan 10, 2018

Is it possible to assign this to you, "Jay".

I don't know. If my name doesn't show up in Assignees you can try typing it in and see what happens. It's not necessary though since we can both follow it and comment without being assigned.

@YoungGriff14
Copy link
Author

Windows version is 1709 (OS Build 16299.192). Every time it changes the brightness level on changing the power source, it changes it back to the previous level on that power source, so somewhere the computer/some software is remembering that brightness value every time. I'll try and have a search for what could be changing it, thanks very much for your help and thanks for making this program!

@jay
Copy link
Contributor

jay commented Jan 10, 2018

No problem. If you find out what's causing it please let us know so that we can add that information to the readme for other users.

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

No branches or pull requests

3 participants