GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Restart the brightness job after sleep on Intel Macs by Blizzeq · Pull Request #1915 · MonitorControl/MonitorControl

Conversation

@Blizzeq

@Blizzeq Blizzeq commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Fixes #1911

After display or system sleep, soberNow() restarted job() 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

  • Builds with xcodebuild -scheme MonitorControl -configuration Debug (signing disabled; with Xcode 27 I had to pass MACOSX_DEPLOYMENT_TARGET=12.0 on the command line, the project itself is unchanged).
  • SwiftFormat --lint: no issues. SwiftLint reports the same two existing opening_brace warnings in AppDelegate.swift as on main.
  • There's no test target, so I checked the control flow with a small standalone Swift model of job(), sleepNotification() and soberNow(). 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Blizzeq
Restart the brightness job after sleep on Intel Macs
ac29990
soberNow() only restarted job() when displays needed reconfiguration or on Apple silicon, so on Intel the loop that syncs brightness from the built-in display stayed stopped after display or system sleep. Restart it whenever no reconfiguration is pending; job(start:) already ignores the call if the loop is still running.

Fixes MonitorControl#1911
@Blizzeq Blizzeq mentioned this pull request Sep 24, 2026
Brightness sync never resumes after display/system sleep on Intel Macs (soberNow doesn't restart job) #1911
Open
3 tasks done
@waydabber waydabber added the in progress Issue currently being worked on label Sep 26, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

in progress Issue currently being worked on

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Brightness sync never resumes after display/system sleep on Intel Macs (soberNow doesn't restart job)

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Blizzeq @waydabber
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.