mirror of
https://github.com/MonitorControl/MonitorControl.git
synced 2026-05-15 14:15:55 -06:00
[GH-ISSUE #1287] HDR is occasionally disabled upon resume from sleep #734
Labels
No labels
Status: Abandoned
arm64
beta
beta
bug
done
duplicate
enhancement
feedback needed from reporter
in progress
invalid
investigating
known Issue
monitor Issue
pull-request
translation
unable to reproduce
unreleased
x86
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/MonitorControl#734
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kohlschuetter on GitHub (Jan 15, 2023).
Original GitHub issue: https://github.com/MonitorControl/MonitorControl/issues/1287
Before opening the issue, have you...?
Describe the bug
When I resume my 14" M1 MacBook Pro from sleep, my external monitor's HDR state is lost occasionally.
Sometimes, all I need to do is to re-enable it through System Preferences. Sometimes, the HDR checkbox is not present (in which case disconnecting/reconnecting the USB-C cable works).
I've managed to re-enable HDR through
SkyLight.frameworkusing the "hoder" tool I just wrote [1] (hat tip to @joevt [2] for pointing at the right commands)Maybe you could add a preference to MonitorControl to always re-enable HDR on a per-display basis?
Steps to reproduce
Expected behavior
HDR state should not be changed (this may be a system-level bug we have to work around)
Anything else?
[1] https://github.com/kohlschuetter/hoder
[2] https://github.com/joevt/AllRez
Environment Information (please complete the following information)
@waydabber commented on GitHub (Jan 20, 2023):
Hi there,
Note: there is a fully supported and documented way to reliably detect if the display supports HDR (check if an XDR display is in not in an SDR preset or if the external display is currently in HDR mode) - it's best to use this: you need to check the potential EDR range - simply check if NSScreen's
maximumPotentialExtendedDynamicRangeColorComponentValuefor the given display is greater than1.0(this means there is an EDR headroom available which for third party displays is always a fixed number, for XDR it is changing relative to current hardware brightness levels). You can even subscribe to a notification if this changes. An other, less professional but still technically supported way for Apple Silicon is to get the display data from the I/O registry tree and check ifSupportsHDRGammaEOTFis1- this should work for external displays. The third option is to use undocumented stuff like SkyLight framework (update: I rechecked the issue, it seems to work fine after all) or the the MonitorPanel framework and check againstpreferHDRModesbut that framework is a huge resource burden.I'm saying these as input if you are willing to implement this feature in MonitorControl as a contributor. :)
Anyways, I implemented this feature in BetterDisplay if you are interested:
@waydabber commented on GitHub (Jan 20, 2023):
(note: forgot to add - right, there is really no public API to switch the display to HDR mode which is crazy, you can do it using SkyLight or MonitorPanel).