mirror of
https://github.com/MonitorControl/MonitorControl.git
synced 2026-10-23 08:07:35 -06:00
[GH-ISSUE #1911] Brightness sync never resumes after display/system sleep on Intel Macs (soberNow doesn't restart job) #1312
Labels
No labels
Status: Abandoned
arm64
beta
beta
bug
done
duplicate
enhancement
feedback needed from reporter
in progress
information
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#1312
Loading…
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 @LuisMa9L on GitHub (Sep 22, 2026).
Original GitHub issue: https://github.com/MonitorControl/MonitorControl/issues/1911
Before opening the issue, have you...?
Describe the bug
On an Intel Mac, "Sync brightness changes from built-in display" works after launch, but stops for good after the first display sleep or system sleep. The app keeps running and keyboard brightness control still works, yet ambient light sensor changes are no longer synced to the external display until MonitorControl is relaunched. Same symptom as #922 and #1372 (both closed); still present in v4.4.0 and on
main.Cause (from reading the v4.4.0 source,
AppDelegate.swift):sleepNotification()incrementssleepID, so the nextjob()tick exits ("MonitorControl job died because of sleep or reconfiguration."). On wake,soberNow()only restarts the job in two cases:On Intel, when no display reconfiguration happened during sleep, neither branch runs, so
job()is never restarted.Suggested fix: restart the job regardless of architecture.
job(start:)already guards against a second loop viajobRunning.Workaround: relaunching MonitorControl a few seconds after
NSWorkspace.screensDidWakeNotification/didWakeNotification(I use a small LaunchAgent) restores sync.Side note, possibly a separate issue: with smooth brightness transitions enabled and combined hardware/software dimming, I got the "Is f.lux or similar running?" alert right after a relaunch. From the code,
restoreSwBrightnessForAllDisplays(async: true)animates the gamma in the background while the firstjob()tick callsOtherDisplay.setBrightness()->checkGammaInterference(), which can read the half-animated gamma table as interference (and resets software brightness to 1). With smooth transitions disabled it didn't happen again in my tests.Steps to reproduce
pmset displaysleepnow), wait a few seconds, wake them.Log captured with
/usr/bin/log stream --info --predicate 'process == "MonitorControl"'during step 3:No "MonitorControl job started." follows. In earlier runs, sync stayed dead for 20+ minutes until a manual relaunch.
Expected behavior
After waking, brightness sync resumes automatically, as the Apple Silicon branch of
soberNow()already does, without relaunching the app.Anything else?
No response
Environment Information (please complete the following information)
@Blizzeq commented on GitHub (Sep 24, 2026):
Thanks for tracing this. I opened #1915 with the fix you suggested.