External display brightness resets after sleep

You dim the monitor, close the lid, come back — and it is bright again. Or you switch resolution, or unplug the cable, and the same thing happens. Nothing in System Settings puts it back, because nothing in the system owns that value.

What is actually happening

On a third-party panel, brightness and contrast live in the monitor itself, reached over DDC/CI; when a panel does not implement DDC/CI, the only thing anything can control is the CoreGraphics gamma table. Either way the value is not stored by macOS. Waking from sleep, changing resolution or reconnecting a display all mean the display is reconfigured, and whatever you had set is simply gone — the panel falls back to its own default.

Why the obvious fix does not work

The obvious fix is to watch for the wake notification and write the value back. That fails, and the reason is specific: a panel needs a moment after wake before it answers DDC/CI at all. Replay the instant the notification arrives and the write is thrown away — which is why so many homemade wake scripts appear to work sometimes and not others.

What a reliable implementation does instead is wait (we use 2.5 seconds), then write, and if the write does not take, retry. Our retry ladder is 1 s, then 2 s, then 4 s. The panel is also allowed to be genuinely absent from the bus for the first try — that is not an error, it is the normal order of events.

This is not theory: it is the comment on SelfHealEngine.wakeDelay in our source, and the reason the feature exists at all.

What works today

If brightness does not come back at all

That is a different fault — the panel may not implement DDC/CI, or the cable or the port may not carry it. The way to tell them apart is in DDC/CI not responding.

Related

DDC/CI not responding: isolating display, cable or port · Which Mac display app should you use? An honest comparison · Verify our claims yourself

Colours look washed out after dimming?

Text looks blurry? Check which mode you are in