[GH-ISSUE #733] "Apply last saved values to display" not working #482

Closed
opened 2026-05-05 06:06:32 -06:00 by gitea-mirror · 7 comments
Owner

Originally created by @waydabber on GitHub (Oct 21, 2021).
Original GitHub issue: https://github.com/MonitorControl/MonitorControl/issues/733

Originally assigned to: @waydabber on GitHub.

Discussed in https://github.com/MonitorControl/MonitorControl/discussions/732

Originally posted by terabyte128 October 21, 2021
I just downloaded version 4.0.0 RC1 and I'm trying to use the "Apply last saved values to display" setting for an external monitor that doesn't preserve brightness after it shuts off. But it doesn't seem to be working. When I open the menu var icon for MonitorControl, it shows the correct brightness but the display doesn't actually update until I click on the slider bar.

Is there something I need to do to allow MonitorControl to monitor wake events? Or something else I'm missing?

For some more context: when I unplug the monitor then plug it back in, the brightness is set correctly. The issue only occurs upon wake from sleep. I'm not sure whether this is a bug or just a mistake on my part, so I'm happy to file a bug if it's the former case :)

Thanks.

Originally created by @waydabber on GitHub (Oct 21, 2021). Original GitHub issue: https://github.com/MonitorControl/MonitorControl/issues/733 Originally assigned to: @waydabber on GitHub. ### Discussed in https://github.com/MonitorControl/MonitorControl/discussions/732 <div type='discussions-op-text'> <sup>Originally posted by **terabyte128** October 21, 2021</sup> I just downloaded version 4.0.0 RC1 and I'm trying to use the "Apply last saved values to display" setting for an external monitor that doesn't preserve brightness after it shuts off. But it doesn't seem to be working. When I open the menu var icon for MonitorControl, it shows the correct brightness but the display doesn't actually update until I click on the slider bar. Is there something I need to do to allow MonitorControl to monitor wake events? Or something else I'm missing? For some more context: when I unplug the monitor then plug it back in, the brightness is set correctly. The issue only occurs upon wake from sleep. I'm not sure whether this is a bug or just a mistake on my part, so I'm happy to file a bug if it's the former case :) Thanks.</div>
gitea-mirror 2026-05-05 06:06:32 -06:00
Author
Owner

@waydabber commented on GitHub (Oct 21, 2021):

Hey @terabyte128 - indeed, this function works rather unrealiably. If the display is too slow to wake, MonitorControl might send the DDC restore command too early. I was able to reproduce this issue. I'll look into it.

<!-- gh-comment-id:948401973 --> @waydabber commented on GitHub (Oct 21, 2021): Hey @terabyte128 - indeed, this function works rather unrealiably. If the display is too slow to wake, MonitorControl might send the DDC restore command too early. I was able to reproduce this issue. I'll look into it.
Author
Owner

@terabyte128 commented on GitHub (Oct 21, 2021):

Thank you @waydabber! Let me know if there's anything I can do to help (though, I don't have much experience with Swift).

<!-- gh-comment-id:948818429 --> @terabyte128 commented on GitHub (Oct 21, 2021): Thank you @waydabber! Let me know if there's anything I can do to help (though, I don't have much experience with Swift).
Author
Owner

@waydabber commented on GitHub (Oct 21, 2021):

I am trying to fix this. Not easy though because of the inherent uncertainity regarding how various dispalys wake and when do they start receiving and applying DDC commands. What I am trying to do is if Apply last saved values to display is enabled, the app will issue DDC commands for about 10 more seconds every second (after the initial delay after sleep) - hopefully this will be enough to force the display to apply changes. This small change needs a lot of rework though.

If I committed the updated code to the experimental branch, you can help testing it if you can build the app via XCode to see if it works with your config (alternatively I can provide an unsigned build).

<!-- gh-comment-id:948893446 --> @waydabber commented on GitHub (Oct 21, 2021): I am trying to fix this. Not easy though because of the inherent uncertainity regarding how various dispalys wake and when do they start receiving and applying DDC commands. What I am trying to do is if `Apply last saved values to display` is enabled, the app will issue DDC commands for about 10 more seconds every second (after the initial delay after sleep) - hopefully this will be enough to force the display to apply changes. This small change needs a lot of rework though. If I committed the updated code to the `experimental` branch, you can help testing it if you can build the app via XCode to see if it works with your config (alternatively I can provide an unsigned build).
Author
Owner

@terabyte128 commented on GitHub (Oct 21, 2021):

Sure, I'd be happy to try and test. I do have Xcode installed.

<!-- gh-comment-id:948897199 --> @terabyte128 commented on GitHub (Oct 21, 2021): Sure, I'd be happy to try and test. I do have Xcode installed.
Author
Owner

@waydabber commented on GitHub (Oct 21, 2021):

Hey, I pushed an update to the experimental branch. Hopefully it will work (and will not break other stuff). If you were able to test it, let me know!

After sleep, there is a 5 second wait period, after that (depending on the depth of the sleep) a full display reconfiguration and then for 10 seconds you should see 10 additional attempts every second as the app tries to restore DDC luminance (and contrast if enabled). Volume is not affected (as it would annoyingly pop-up an OSD on LG displays).

You should see something like this in the console:

2021-10-21 21:21:41.514254+0200 MonitorControl[79090:2090028] Sober write action repeat for DDC - 10
2021-10-21 21:21:41.514349+0200 MonitorControl[79090:2090028] Restoring MonitorControl.Command.luminance DDC value 25 for LG Ultra HD
2021-10-21 21:21:42.614857+0200 MonitorControl[79090:2090028] Sober write action repeat for DDC - 9
2021-10-21 21:21:42.615070+0200 MonitorControl[79090:2090028] Restoring MonitorControl.Command.luminance DDC value 25 for LG Ultra HD
2021-10-21 21:21:43.705494+0200 MonitorControl[79090:2090028] Sober write action repeat for DDC - 8
2021-10-21 21:21:43.705704+0200 MonitorControl[79090:2090028] Restoring MonitorControl.Command.luminance DDC value 25 for LG Ultra HD
2021-10-21 21:21:44.798740+0200 MonitorControl[79090:2090028] Sober write action repeat for DDC - 7
2021-10-21 21:21:44.798951+0200 MonitorControl[79090:2090028] Restoring MonitorControl.Command.luminance DDC value 25 for LG Ultra HD
2021-10-21 21:21:45.893600+0200 MonitorControl[79090:2090028] Sober write action repeat for DDC - 6
2021-10-21 21:21:45.893806+0200 MonitorControl[79090:2090028] Restoring MonitorControl.Command.luminance DDC value 25 for LG Ultra HD
2021-10-21 21:21:46.993534+0200 MonitorControl[79090:2090028] Sober write action repeat for DDC - 5
2021-10-21 21:21:46.993750+0200 MonitorControl[79090:2090028] Restoring MonitorControl.Command.luminance DDC value 25 for LG Ultra HD
2021-10-21 21:21:48.093490+0200 MonitorControl[79090:2090028] Sober write action repeat for DDC - 4
2021-10-21 21:21:48.093701+0200 MonitorControl[79090:2090028] Restoring MonitorControl.Command.luminance DDC value 25 for LG Ultra HD
2021-10-21 21:21:49.193552+0200 MonitorControl[79090:2090028] Sober write action repeat for DDC - 3
2021-10-21 21:21:49.193764+0200 MonitorControl[79090:2090028] Restoring MonitorControl.Command.luminance DDC value 25 for LG Ultra HD
2021-10-21 21:21:50.293442+0200 MonitorControl[79090:2090028] Sober write action repeat for DDC - 2
2021-10-21 21:21:50.293649+0200 MonitorControl[79090:2090028] Restoring MonitorControl.Command.luminance DDC value 25 for LG Ultra HD
2021-10-21 21:21:51.393441+0200 MonitorControl[79090:2090028] Sober write action repeat for DDC - 1
2021-10-21 21:21:51.393648+0200 MonitorControl[79090:2090028] Restoring MonitorControl.Command.luminance DDC value 25 for LG Ultra HD

The display should be fully wake between the 5-15 seconds period after initiating wake this time and should receive the proper command. If the display cannot wake up in 15 seconds then it will not work (the period could of course be extended).

Thank you!

<!-- gh-comment-id:948934872 --> @waydabber commented on GitHub (Oct 21, 2021): Hey, I pushed an update to the experimental branch. Hopefully it will work (and will not break other stuff). If you were able to test it, let me know! After sleep, there is a 5 second wait period, after that (depending on the depth of the sleep) a full display reconfiguration and then for 10 seconds you should see 10 additional attempts every second as the app tries to restore DDC luminance (and contrast if enabled). Volume is not affected (as it would annoyingly pop-up an OSD on LG displays). You should see something like this in the console: ``` 2021-10-21 21:21:41.514254+0200 MonitorControl[79090:2090028] Sober write action repeat for DDC - 10 2021-10-21 21:21:41.514349+0200 MonitorControl[79090:2090028] Restoring MonitorControl.Command.luminance DDC value 25 for LG Ultra HD 2021-10-21 21:21:42.614857+0200 MonitorControl[79090:2090028] Sober write action repeat for DDC - 9 2021-10-21 21:21:42.615070+0200 MonitorControl[79090:2090028] Restoring MonitorControl.Command.luminance DDC value 25 for LG Ultra HD 2021-10-21 21:21:43.705494+0200 MonitorControl[79090:2090028] Sober write action repeat for DDC - 8 2021-10-21 21:21:43.705704+0200 MonitorControl[79090:2090028] Restoring MonitorControl.Command.luminance DDC value 25 for LG Ultra HD 2021-10-21 21:21:44.798740+0200 MonitorControl[79090:2090028] Sober write action repeat for DDC - 7 2021-10-21 21:21:44.798951+0200 MonitorControl[79090:2090028] Restoring MonitorControl.Command.luminance DDC value 25 for LG Ultra HD 2021-10-21 21:21:45.893600+0200 MonitorControl[79090:2090028] Sober write action repeat for DDC - 6 2021-10-21 21:21:45.893806+0200 MonitorControl[79090:2090028] Restoring MonitorControl.Command.luminance DDC value 25 for LG Ultra HD 2021-10-21 21:21:46.993534+0200 MonitorControl[79090:2090028] Sober write action repeat for DDC - 5 2021-10-21 21:21:46.993750+0200 MonitorControl[79090:2090028] Restoring MonitorControl.Command.luminance DDC value 25 for LG Ultra HD 2021-10-21 21:21:48.093490+0200 MonitorControl[79090:2090028] Sober write action repeat for DDC - 4 2021-10-21 21:21:48.093701+0200 MonitorControl[79090:2090028] Restoring MonitorControl.Command.luminance DDC value 25 for LG Ultra HD 2021-10-21 21:21:49.193552+0200 MonitorControl[79090:2090028] Sober write action repeat for DDC - 3 2021-10-21 21:21:49.193764+0200 MonitorControl[79090:2090028] Restoring MonitorControl.Command.luminance DDC value 25 for LG Ultra HD 2021-10-21 21:21:50.293442+0200 MonitorControl[79090:2090028] Sober write action repeat for DDC - 2 2021-10-21 21:21:50.293649+0200 MonitorControl[79090:2090028] Restoring MonitorControl.Command.luminance DDC value 25 for LG Ultra HD 2021-10-21 21:21:51.393441+0200 MonitorControl[79090:2090028] Sober write action repeat for DDC - 1 2021-10-21 21:21:51.393648+0200 MonitorControl[79090:2090028] Restoring MonitorControl.Command.luminance DDC value 25 for LG Ultra HD ``` The display should be fully wake between the 5-15 seconds period after initiating wake this time and should receive the proper command. If the display cannot wake up in 15 seconds then it will not work (the period could of course be extended). Thank you!
Author
Owner

@terabyte128 commented on GitHub (Oct 22, 2021):

I was able to confirm that this fixed the issue – thank you! It looks like my display picks up on the update on the second or third try.

<!-- gh-comment-id:949259916 --> @terabyte128 commented on GitHub (Oct 22, 2021): I was able to confirm that this fixed the issue – thank you! It looks like my display picks up on the update on the second or third try.
Author
Owner

@waydabber commented on GitHub (Oct 22, 2021):

Great! Thanks for the testing! :)

<!-- gh-comment-id:949293429 --> @waydabber commented on GitHub (Oct 22, 2021): Great! Thanks for the testing! :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/MonitorControl#482
No description provided.