[GH-ISSUE #154] Unexpected change of brightness after display was asleep #111

Closed
opened 2026-05-05 05:04:53 -06:00 by gitea-mirror · 15 comments
Owner

Originally created by @BreiteSeite on GitHub (Nov 26, 2019).
Original GitHub issue: https://github.com/MonitorControl/MonitorControl/issues/154

Originally assigned to: @waydabber on GitHub.

Steps to reproduce

  1. Have MacBook in Clamshell mode w/ LG UltraFine 5K Display connected
  2. Ensure MonitorControl.app is NOT running
  3. Set Brightness to 100%
  4. Open MonitorControl.app
  5. Reduce brightness to (for example) 30%
  6. Put display to sleep (Via external keyboard: Control–Shift–Media Eject)
  7. Wake-Up Display via pressing any button on the keyboard

Expected Result

  • Brightness of the display still (for example) 30%
  • Slider in MonitorControl is at 30%
  • Decreasing Brightness sets brightness to 29%

Actual Result

  • Brightness is 100% (the value set w/o MonitorControl running)
  • Slider in MonitorControl is at 30%
  • Decreasing Brightness sets brightness to 29%

Observations

It looks like there are two places that have display-brightness state: macOS (or the LG display itself) and MonitorControl. When waking the display from sleep, it uses the brightness from the macOS/LG-Display state. When adjusting the brightness (with MonitorControl open), it then sets the display brightness to the state managed by MonitorControl

Suggested Fix

  • If observation is correct, it would be probably best to not store an additional brightness state besides the brightness state of macOS/external display itself
  • Or: if possible always set the macOS/external display brightness-state as well when setting MonitorControls brightness (not sure if that's possible via DDC)

Suggested Workaround

  • Reset brightness to MonitorControl's state after application detected the display has been woken up (might induce flicker if the display starts with macOS/own brightness before MonitorControl has a change to reset the brightness)

Additional Information

Model Identifier: MacBookPro13,3
Display: LG UltraFine 5k

$ brew cask list --versions | grep -i monitorcontrol
monitorcontrol 1.7.1

$ sw_vers                                             
ProductName:	Mac OS X
ProductVersion:	10.15.1
BuildVersion:	19B88

$ system_profiler -detailLevel full SPDisplaysDataType
Graphics/Displays:

    Intel HD Graphics 530:

      Chipset Model: Intel HD Graphics 530
      Type: GPU
      Bus: Built-In
      VRAM (Dynamic, Max): 1536 MB
      Vendor: Intel
      Device ID: 0x191b
      Revision ID: 0x0006
      Automatic Graphics Switching: Supported
      gMux Version: 4.0.29 [3.2.8]
      Metal: Supported, feature set macOS GPUFamily2 v1

    Radeon Pro 455:

      Chipset Model: AMD Radeon Pro 455
      Type: GPU
      Bus: PCIe
      PCIe Lane Width: x8
      VRAM (Total): 2 GB
      Vendor: AMD (0x1002)
      Device ID: 0x67ef
      Revision ID: 0x00c7
      ROM Revision: 113-C980AF-908
      VBIOS Version: 113-C9801AP-028
      EFI Driver Version: 01.A0.908
      Automatic Graphics Switching: Supported
      gMux Version: 4.0.29 [3.2.8]
      Metal: Supported, feature set macOS GPUFamily2 v1
      Displays:
        LG UltraFine:
          Resolution: 6400 x 3600
          UI Looks like: 3200 x 1800
          Framebuffer Depth: 30-Bit Color (ARGB2101010)
          Main Display: Yes
          Mirror: Off
          Online: Yes
          Rotation: Supported
          Automatically Adjust Brightness: No
          Connection Type: DisplayPort
Originally created by @BreiteSeite on GitHub (Nov 26, 2019). Original GitHub issue: https://github.com/MonitorControl/MonitorControl/issues/154 Originally assigned to: @waydabber on GitHub. # Steps to reproduce 1. Have MacBook in Clamshell mode w/ LG UltraFine 5K Display connected 2. Ensure MonitorControl.app is NOT running 3. Set Brightness to 100% 4. Open MonitorControl.app 5. Reduce brightness to (for example) 30% 6. Put display to sleep (Via external keyboard: [Control–Shift–Media Eject](https://support.apple.com/en-us/HT201236)) 7. Wake-Up Display via pressing any button on the keyboard # Expected Result * Brightness of the display still (for example) 30% * Slider in MonitorControl is at 30% * Decreasing Brightness sets brightness to 29% # Actual Result * Brightness is 100% (the value set w/o MonitorControl running) * Slider in MonitorControl is at 30% * Decreasing Brightness sets brightness to 29% # Observations It looks like there are two places that have display-brightness state: macOS (or the LG display itself) and MonitorControl. When waking the display from sleep, it uses the brightness from the macOS/LG-Display state. When adjusting the brightness (with MonitorControl open), it then sets the display brightness to the state managed by MonitorControl # Suggested Fix * If observation is correct, it would be probably best to not store an additional brightness state besides the brightness state of macOS/external display itself * Or: if possible always set the macOS/external display brightness-state as well when setting MonitorControls brightness (not sure if that's possible via DDC) # Suggested Workaround * Reset brightness to MonitorControl's state after application detected the display has been woken up (might induce flicker if the display starts with macOS/own brightness before MonitorControl has a change to reset the brightness) # Additional Information Model Identifier: MacBookPro13,3 Display: LG UltraFine 5k ``` $ brew cask list --versions | grep -i monitorcontrol monitorcontrol 1.7.1 $ sw_vers ProductName: Mac OS X ProductVersion: 10.15.1 BuildVersion: 19B88 $ system_profiler -detailLevel full SPDisplaysDataType Graphics/Displays: Intel HD Graphics 530: Chipset Model: Intel HD Graphics 530 Type: GPU Bus: Built-In VRAM (Dynamic, Max): 1536 MB Vendor: Intel Device ID: 0x191b Revision ID: 0x0006 Automatic Graphics Switching: Supported gMux Version: 4.0.29 [3.2.8] Metal: Supported, feature set macOS GPUFamily2 v1 Radeon Pro 455: Chipset Model: AMD Radeon Pro 455 Type: GPU Bus: PCIe PCIe Lane Width: x8 VRAM (Total): 2 GB Vendor: AMD (0x1002) Device ID: 0x67ef Revision ID: 0x00c7 ROM Revision: 113-C980AF-908 VBIOS Version: 113-C9801AP-028 EFI Driver Version: 01.A0.908 Automatic Graphics Switching: Supported gMux Version: 4.0.29 [3.2.8] Metal: Supported, feature set macOS GPUFamily2 v1 Displays: LG UltraFine: Resolution: 6400 x 3600 UI Looks like: 3200 x 1800 Framebuffer Depth: 30-Bit Color (ARGB2101010) Main Display: Yes Mirror: Off Online: Yes Rotation: Supported Automatically Adjust Brightness: No Connection Type: DisplayPort ```
gitea-mirror 2026-05-05 05:04:53 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@cantchooseaname8 commented on GitHub (Dec 1, 2019):

I can report the same issue. My MacBook Pro is always in clamshell mode. Whenever it wakes up from sleep, MonitorControl appears to have forgotten the settings. The brightness has changed, but also the volume becomes extremely loud when it was originally set to the lowest setting before the computer going to sleep. It seems to happen every time and I can't find a workaround to get it to work. After waking up, the monitor turns on for about 5 seconds and then flickers with a black screen for about 1 second before working as normal. I'm not sure if that is related.

<!-- gh-comment-id:560136113 --> @cantchooseaname8 commented on GitHub (Dec 1, 2019): I can report the same issue. My MacBook Pro is always in clamshell mode. Whenever it wakes up from sleep, MonitorControl appears to have forgotten the settings. The brightness has changed, but also the volume becomes extremely loud when it was originally set to the lowest setting before the computer going to sleep. It seems to happen every time and I can't find a workaround to get it to work. After waking up, the monitor turns on for about 5 seconds and then flickers with a black screen for about 1 second before working as normal. I'm not sure if that is related.
Author
Owner

@JoniVR commented on GitHub (Dec 2, 2019):

Hi @BreiteSeite

Thanks for the detailed description of your issue, it really helps a lot!

If I understand you correctly, what you're seeing is intended behaviour.

It looks like there are two places that have display-brightness state: macOS (or the LG display itself) and MonitorControl.

This is correct. We save the display values in the app as a fallback because for some monitors it's not possible to read their actual values from the display, you can only control them.

So in case reading values (polling) fails, we use the last known value as a fallback. This is likely what's happening in your case.

I do have a question for you; is MonitorControl actually automatically changing your brightness to it's last known value when you start it? Because if that's the case then that's probably something we need to fix.

We could also give you a setting to disable the fallback, but that's probably not going to change much, if we don't use a fallback all sliders will just go to 0 and that'll be what you see every time you start the app.

Suggested solutions:

  • You can try going to the Advanced Preferences and increase the Polling Mode or use a longer delay, those things can possibly solve your reading issues. For more info read the Wiki page on these settings.

  • Try a tool like ddcctl to verify that you can actually poll your display, if that works we know it's probably going to be a setting or an issue with MonitorControl.

<!-- gh-comment-id:560380288 --> @JoniVR commented on GitHub (Dec 2, 2019): Hi @BreiteSeite Thanks for the detailed description of your issue, it really helps a lot! If I understand you correctly, what you're seeing is intended behaviour. > It looks like there are two places that have display-brightness state: macOS (or the LG display itself) and MonitorControl. This is correct. We save the display values in the app as a fallback because for some monitors it's not possible to read their actual values from the display, you can only control them. So in case reading values (polling) fails, we use the last known value as a fallback. This is likely what's happening in your case. I do have a question for you; is MonitorControl actually automatically changing your brightness to it's last known value when you start it? Because if that's the case then that's probably something we need to fix. We could also give you a setting to disable the fallback, but that's probably not going to change much, if we don't use a fallback all sliders will just go to 0 and that'll be what you see every time you start the app. ### Suggested solutions: * You can try going to the Advanced Preferences and increase the `Polling Mode` or use a longer delay, those things can possibly solve your reading issues. For more info read the [Wiki page](https://github.com/the0neyouseek/MonitorControl/wiki/Advanced-Preferences) on these settings. * Try a tool like [ddcctl](https://github.com/kfix/ddcctl) to verify that you can actually poll your display, if that works we know it's probably going to be a setting or an issue with MonitorControl.
Author
Owner

@cantchooseaname8 commented on GitHub (Dec 2, 2019):

I noticed some additional behavior. Based on your response, it does appear to be saving the last known value. I have the volume set on a low setting. When the computer wakes up and I start playing music, it keeps the volume on the same low setting. However, as soon as I touch the volume keys on my keyboard, the volume jumps to a very high volume (probably around 50%) and it starts being adjusted from there instead of being adjusted from the last known value. Is that intended? Would there be any way to override this so that the volume is adjusted from the last known value instead of jumping to a much higher number and then adjusting it from that? I increased the polling but still noticed the same behavior. Hopefully I'm explaining this correctly. Let me know if I'm not making any sense. Thanks for all of your help!

<!-- gh-comment-id:560490761 --> @cantchooseaname8 commented on GitHub (Dec 2, 2019): I noticed some additional behavior. Based on your response, it does appear to be saving the last known value. I have the volume set on a low setting. When the computer wakes up and I start playing music, it keeps the volume on the same low setting. However, as soon as I touch the volume keys on my keyboard, the volume jumps to a very high volume (probably around 50%) and it starts being adjusted from there instead of being adjusted from the last known value. Is that intended? Would there be any way to override this so that the volume is adjusted from the last known value instead of jumping to a much higher number and then adjusting it from that? I increased the polling but still noticed the same behavior. Hopefully I'm explaining this correctly. Let me know if I'm not making any sense. Thanks for all of your help!
Author
Owner

@BreiteSeite commented on GitHub (Dec 3, 2019):

@JoniVR

I do have a question for you; is MonitorControl actually automatically changing your brightness to it's last known value when you start it? Because if that's the case then that's probably something we need to fix.

No it doesn't.

You can try going to the Advanced Preferences and increase the Polling Mode or use a longer delay, those things can possibly solve your reading issues. For more info read the Wiki page on these settings.

Tried increasing polling to heavy and also to enable Longer Delay. Both did not change the behaviour.

Try a tool like ddcctl to verify that you can actually poll your display, if that works we know it's probably going to be a setting or an issue with MonitorControl.

Will try that when i have some spare time.

What would work very nice for me would be to exclude the 5K from MonitorControls handling. Meaning it just doesn't care/interfere and let the native stuff doing its thing. Than it would work like a charm. Because my other LG display (not a UltraFine) works very nicely with this app.

Do you think this would be possible as a feature? Because right now, when i "disable" the UltraFine in MonitorControl settings, i cannot control brightness or volume at all. I wish it would just disable MonitorControls side of things and let the original macOS/display stuff doing its work.

<!-- gh-comment-id:560941860 --> @BreiteSeite commented on GitHub (Dec 3, 2019): @JoniVR > I do have a question for you; is MonitorControl actually automatically changing your brightness to it's last known value when you start it? Because if that's the case then that's probably something we need to fix. No it doesn't. > You can try going to the Advanced Preferences and increase the Polling Mode or use a longer delay, those things can possibly solve your reading issues. For more info read the Wiki page on these settings. Tried increasing polling to heavy and also to enable Longer Delay. Both did not change the behaviour. > Try a tool like ddcctl to verify that you can actually poll your display, if that works we know it's probably going to be a setting or an issue with MonitorControl. Will try that when i have some spare time. What would work very nice for me would be to exclude the 5K from MonitorControls handling. Meaning it just doesn't care/interfere and let the native stuff doing its thing. Than it would work like a charm. Because my other LG display (not a UltraFine) works very nicely with this app. Do you think this would be possible as a feature? Because right now, when i "disable" the UltraFine in MonitorControl settings, i cannot control brightness or volume _at all_. I wish it would just disable MonitorControls side of things and let the original macOS/display stuff doing its work.
Author
Owner

@peterclary commented on GitHub (Dec 20, 2019):

I have a similar problem with my Philips 499P9. Quitting MonitorControl and restarting it makes everything work exactly as expected.

<!-- gh-comment-id:568127617 --> @peterclary commented on GitHub (Dec 20, 2019): I have a similar problem with my Philips 499P9. Quitting MonitorControl and restarting it makes everything work exactly as expected.
Author
Owner

@cantchooseaname8 commented on GitHub (Dec 21, 2019):

I’ve been running a script that restarts MonitorControl upon waking from sleep. I haven’t noticed this issue anymore since doing that. It appears that MonitorControl doesn’t work as expected when waking from sleep.

<!-- gh-comment-id:568210782 --> @cantchooseaname8 commented on GitHub (Dec 21, 2019): I’ve been running a script that restarts MonitorControl upon waking from sleep. I haven’t noticed this issue anymore since doing that. It appears that MonitorControl doesn’t work as expected when waking from sleep.
Author
Owner

@BreiteSeite commented on GitHub (Dec 21, 2019):

@cantchooseaname8 would you mind sharing the script?

<!-- gh-comment-id:568212003 --> @BreiteSeite commented on GitHub (Dec 21, 2019): @cantchooseaname8 would you mind sharing the script?
Author
Owner

@peterclary commented on GitHub (Dec 21, 2019):

I was able to reliably reproduce the issue yesterday, both when the system woke from sleep, and when using the screensaver hot corner. I was able to observe that the jump to maximum brightness seemed to be done by MonitorControl, because when I quit MonitorControl I no longer saw that jump. However, since quitting and restarting MonitorControl it has worked perfectly. I've tried to provoke the problem again by putting it to max brightness, quitting it, restarting the system, etc. but at the moment it's working perfectly.

<!-- gh-comment-id:568219281 --> @peterclary commented on GitHub (Dec 21, 2019): I was able to reliably reproduce the issue yesterday, both when the system woke from sleep, and when using the screensaver hot corner. I was able to observe that the jump to maximum brightness seemed to be done by MonitorControl, because when I quit MonitorControl I no longer saw that jump. However, since quitting and restarting MonitorControl it has worked perfectly. I've tried to provoke the problem again by putting it to max brightness, quitting it, restarting the system, etc. but at the moment it's working perfectly.
Author
Owner

@cantchooseaname8 commented on GitHub (Jan 10, 2020):

@cantchooseaname8 would you mind sharing the script?

Sorry for the delayed response. I am using an app called Power Manager. You can trigger it to run the following script upon waking up:

#!/usr/bin/osascript
-- Paste your AppleScript here.
tell application "MonitorControl"
quit
end tell
delay 1.0
tell application "MonitorControl"
activate
end tell

<!-- gh-comment-id:573078792 --> @cantchooseaname8 commented on GitHub (Jan 10, 2020): > @cantchooseaname8 would you mind sharing the script? Sorry for the delayed response. I am using an app called Power Manager. You can trigger it to run the following script upon waking up: #!/usr/bin/osascript -- Paste your AppleScript here. tell application "MonitorControl" quit end tell delay 1.0 tell application "MonitorControl" activate end tell
Author
Owner

@spin0za commented on GitHub (Apr 1, 2020):

The same happened to me today. Last night I set the brightness to 0, and today after waking my Mac I found the brightness slider is at 60% (while the actual value is still 0). With this gap existing, I cannot maximize the brightness even if the slider is at its max. Having to restart the app to have the slider set to the true value.

<!-- gh-comment-id:606984160 --> @spin0za commented on GitHub (Apr 1, 2020): The same happened to me today. Last night I set the brightness to 0, and today after waking my Mac I found the brightness slider is at 60% (while the actual value is still 0). With this gap existing, I cannot maximize the brightness even if the slider is at its max. Having to restart the app to have the slider set to the true value.
Author
Owner

@riconeitzel commented on GitHub (May 4, 2020):

Please note that there was in Bug in an earlier version of macos which has been fixed a few weeks ago!

<!-- gh-comment-id:623745350 --> @riconeitzel commented on GitHub (May 4, 2020): Please note that there was in Bug in an earlier version of macos which has been fixed a few weeks ago!
Author
Owner

@acousticbiker commented on GitHub (Aug 26, 2020):

I'm having the same issue using a Philips 329P9H with a MacBook Air in clamshell mode connected via USB C to the monitor. For me, when I wake the Mac from sleep, the monitor is brighter than what I had set before the Mac fell asleep (I'm guessing 50% or so), the brightness slider is in the appropriate place (25% or so), and then goes back to where I previously set it after I press F1 to decrease brightness. Quitting/restarting the app didn't fix it for me.

<!-- gh-comment-id:681042579 --> @acousticbiker commented on GitHub (Aug 26, 2020): I'm having the same issue using a Philips 329P9H with a MacBook Air in clamshell mode connected via USB C to the monitor. For me, when I wake the Mac from sleep, the monitor is brighter than what I had set before the Mac fell asleep (I'm guessing 50% or so), the brightness slider is in the appropriate place (25% or so), and then goes back to where I previously set it after I press F1 to decrease brightness. Quitting/restarting the app didn't fix it for me.
Author
Owner

@waydabber commented on GitHub (Aug 19, 2021):

Some displays reset their brightness after they enter sleep mode. I have a Lenovo display that does this as well. MonitorControl does not restore brightness after wake to the previous levels but tries to read current levels which fail on many displays that do not handle the ddc read request.

I plan to add an advanced option to restore the previously saved brightness levels to the display after resume.

<!-- gh-comment-id:901998464 --> @waydabber commented on GitHub (Aug 19, 2021): Some displays reset their brightness after they enter sleep mode. I have a Lenovo display that does this as well. MonitorControl does not restore brightness after wake to the previous levels but tries to read current levels which fail on many displays that do not handle the ddc read request. I plan to add an advanced option to restore the previously saved brightness levels to the display after resume.
Author
Owner

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

Btw, I just see that this issue is about LG UltraFine. These are strange displays are they apparently support both DDC and MCCS USB protocols (which Apple uses to control the display) and some has an ambient light sensor as well.

This issue will be fully resolved once the following is implemented:

https://github.com/MonitorControl/MonitorControl/issues/364

Since we track this issue there, I'll close this issue. Thank you!

<!-- gh-comment-id:903133914 --> @waydabber commented on GitHub (Aug 21, 2021): Btw, I just see that this issue is about LG UltraFine. These are strange displays are they apparently support both DDC and MCCS USB protocols (which Apple uses to control the display) and some has an ambient light sensor as well. This issue will be fully resolved once the following is implemented: https://github.com/MonitorControl/MonitorControl/issues/364 Since we track this issue there, I'll close this issue. Thank you!
Author
Owner

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

(the right solution here is to use Apple's DisplayServices to get the current display brightness and change it based on the updated value, just like we do with internal displays).

<!-- gh-comment-id:903134043 --> @waydabber commented on GitHub (Aug 21, 2021): (the right solution here is to use Apple's DisplayServices to get the current display brightness and change it based on the updated value, just like we do with internal displays).
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#111
No description provided.