mirror of
https://github.com/MonitorControl/MonitorControl.git
synced 2026-10-23 08:07:35 -06:00
[PR #1915] Restart the brightness job after sleep on Intel Macs #1332
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#1332
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?
📋 Pull Request Information
Original PR: https://github.com/MonitorControl/MonitorControl/pull/1915
Author: @Blizzeq
Created: 9/24/2026
Status: 🔄 Open
Base:
main← Head:fix/1911-restart-job-after-sleep📝 Commits (1)
ac29990Restart the brightness job after sleep on Intel Macs📊 Changes
1 file changed (+5 additions, -3 deletions)
View changed files
📝
MonitorControl/Support/AppDelegate.swift(+5 -3)📄 Description
Fixes #1911
After display or system sleep,
soberNow()restartedjob()only when the displays needed reconfiguration or on Apple silicon. On an Intel Mac with no reconfiguration the loop that ended during sleep never came back, so syncing brightness from the built-in display stopped until a relaunch, as @LuisMa9L traced in the issue. This restarts the job in that case too and keeps the AVServices update Apple silicon only.job(start:)already returns early when the loop is still running, so a quick wake does not start a second loop.Testing
xcodebuild -scheme MonitorControl -configuration Debug(signing disabled; with Xcode 27 I had to passMACOSX_DEPLOYMENT_TARGET=12.0on the command line, the project itself is unchanged).--lint: no issues. SwiftLint reports the same two existingopening_bracewarnings inAppDelegate.swiftas onmain.job(),sleepNotification()andsoberNow(). Before the change, Intel with no reconfiguration and the loop stopped during sleep ends with no running job; after it, every combination of architecture, reconfiguration and wake timing ends with exactly one running loop. I'm on Apple silicon, so I couldn't reproduce the Intel case on hardware.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.