mirror of
https://github.com/MonitorControl/MonitorControl.git
synced 2026-05-15 22:01:08 -06:00
[GH-ISSUE #1648] App may crash on wake from sleep or display connect/disconnect #915
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#915
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 @Anywhere-Music-Player on GitHub (Oct 7, 2024).
Original GitHub issue: https://github.com/MonitorControl/MonitorControl/issues/1648
Originally assigned to: @waydabber on GitHub.
Before opening the issue, have you...?
Describe the bug
After sleep, then wake up when I press F1/F2 brightness just drops to like 0% and stopped to respond, no changes at all.
Have to restart app to make it work. Well, I mean any way of changing brightness is not working, with sliders for example.
Steps to reproduce
Expected behavior
Brightness should always work.
Anything else?
No response
Environment Information (please complete the following information)
@waydabber commented on GitHub (Oct 7, 2024):
Can't seem to reproduce this. Let's see if there are at least some other users reporting this issue, otherwise it might be a configuration specific problem or interference with some other app possibly difficult to track down.
@Anywhere-Music-Player commented on GitHub (Oct 7, 2024):
Oh, sorry, forgot to mention, chance of this like happens only ~once per last 3 days so far.
This bug was also with previous version, but less often I'd say.. so I don't think it just something new.
Will update if this happens again, but I'm 100% sure that this is some bug. At the same time I've running my old app https://github.com/Volodymyr-13/NativeDisplayBrightness and when Monitor Control doesn't work, NativeDisplayBrightness works.
@waydabber commented on GitHub (Oct 7, 2024):
No problem, thanks for the info. I did not make any changes in the app logic at all, just focused on compatibility updates. So it makes sense if this happened with previous versions as well.
@lerschiboi commented on GitHub (Oct 9, 2024):
Not sure if it's the same problem, but since Sequoia, Monitor Control is always closed when I wake my computer from sleep. I have to start it again and then everything works fine again. 🤷
@waydabber commented on GitHub (Oct 9, 2024):
Are you using the latest version @lerschiboi?
@Anywhere-Music-Player commented on GitHub (Oct 9, 2024):
@waydabber Oh yeah, me too, it's not 100% chance, but I'd say it's like 30% of chance at least.
After wake - app crashed. Had to open it, yea.
@lerschiboi commented on GitHub (Oct 9, 2024):
Version 4.2.0 7048
True, just noticed that it's not after every wake, but happens quite a lot
@Anywhere-Music-Player commented on GitHub (Oct 9, 2024):
And actually this happens to me for like at least 6+ months so this is an old bug.
@lerschiboi commented on GitHub (Oct 9, 2024):
Well, I was rocking MacOS 14.4 for quite a long time before updating to 15.0, and it was only then that I started noticing the crashes. But maybe they were introduced with an earlier MacOS version that I didn't update to
@waydabber commented on GitHub (Oct 9, 2024):
(note: 4.2.0 is not the latest version)
@Anywhere-Music-Player commented on GitHub (Oct 9, 2024):
And this and bug I reported is like the same, after wake was on any of those versions and I’m always updating to the very latest. So old version or new, situation remains the same…
@onekiloparsec commented on GitHub (Oct 12, 2024):
I confirm I have the same behavior. Back from sleep, the app is not running anymore, as far as I can tell, every time (or close). I'am running macOS Sequioa
15.0.1and MonitorControl4.2.0 Build 7048. With Spotlight, it's quite easy to relaunch, but it would be nice to not have to. :-)@waydabber commented on GitHub (Oct 12, 2024):
Note: 4.2.0 is not properly compatible with Sequoia, make sure you use the latest version. But other than that the issue might be valid on some configs as others pointed out. If I can get an ips crash log (of 4.3.3), I can check where the app crashed and probably fix it.
@onekiloparsec commented on GitHub (Oct 12, 2024):
Oh thanks, I will update. Note that I didn't know 4.3.3 was available, because it didn't appear when checking for updates...

@DarNattpi commented on GitHub (Oct 21, 2024):
I faced same issue, I use MC 4.3.3 and my macos is 15.0.1
@waydabber commented on GitHub (Oct 22, 2024):
Again: if I can get an ips crash log (of 4.3.3), I can check where the app crashed and probably fix it. :)
@Anywhere-Music-Player commented on GitHub (Oct 22, 2024):
For me it’s not crashing in all last cases.. but just stopping to work.. so maybe need some debug log or so?
@waydabber commented on GitHub (Oct 22, 2024):
Oh, I see. Two issues seem to be conflated here.
@Anywhere-Music-Player commented on GitHub (Oct 22, 2024):
Oh sorry, I found it finally! it crashes for me too:
MonitorControl-2024-10-21-004416.ips.zip
@waydabber commented on GitHub (Oct 24, 2024):
Thanks @Volodymyr-13!
@waydabber commented on GitHub (Oct 24, 2024):
I analyzed the crash log, the crash occurs because of a rather unprofessional way of handling the contents of the percentage output when it is shown. The issue will probably go away showing percentages is turned off (unless there is an other crash hidden by this one). I fixed the issue so this should work better in the next release.
@Anywhere-Music-Player commented on GitHub (Oct 26, 2024):
@waydabber thanks, for now I'll try to disable % and test this until release.
@Anywhere-Music-Player commented on GitHub (Nov 13, 2024):
@waydabber @waydabber Hi, so all this time after I disabled % in the menu - the app worked well after sleep.
But today this happened again:
@waydabber commented on GitHub (Nov 13, 2024):
I don't think this is the same issue as it is not an app crash.
@Anywhere-Music-Player commented on GitHub (Nov 13, 2024):
I think the same, but these are like very related things, because they occur at this very moment, which was originally described in this bug. Now it is difficult to investigate this, maybe there is some log that the monitor keeps... to see what is happening there..?
Hmm, this now happens very often for me now.. looks like I need to reboot macOS to "fix" this... will not do that yet..
@Anywhere-Music-Player commented on GitHub (Nov 21, 2024):
@waydabber, for the first time ever, this issue has occurred after a long time since I woke up my MacBook.
Randomly, whenever I adjust the brightness (which I used to do and it worked well), it drops to 0% and stops working immediately. Only restarting the app helps. Interestingly, if I close the app and immediately start it again, it won't run. I need to take a delay of about 2-3 seconds before starting it again, and then it starts and works.
@jmedina21 commented on GitHub (Nov 21, 2024):
I am experiencing a similar issue, when I mute and unmute it stays muted, I have to restart the app, and the monitor restarts automatically.

Steps to reproduce
Mute
Unmute
Expected behavior
It should unmute
Anything else?
No response
Environment Information (please complete the following information)
@Anywhere-Music-Player commented on GitHub (Nov 21, 2024):
Thats kind of different issue, I have it too, but forgot to report it, since I almost never used Mute, just accidentally pressing it).
I think you better to create a new bug report..
@Anywhere-Music-Player commented on GitHub (Nov 22, 2024):
@waydabber crashed today again(with disabled % all this time).
MonitorControl-2024-11-22-130821.ips.zip
@waydabber commented on GitHub (Nov 22, 2024):
This is a different issue. The crash log comes from a place where the system tries to convert a value (probably brightness) to a DDC output based on the scaling curve and min/max DDC values. Is there any special configuration/change made in the Advanced section for the display? I can add some sanitization and safety checks to the variables involved in general but without the exact circumstances I have no way of knowing what exactly is the root cause.
For future reference, here is the symbolicated ips. MonitorControl-2024-11-22-130821_symbolicated.ips.zip
@Anywhere-Music-Player commented on GitHub (Nov 22, 2024):
Nope, I never opened advanced settings until now, and this bug just randomly occurred after waking the system from sleep. Only one thing changed recently: due to the russian orcs attacking my country with ballistic rockets a couple of days ago, we now have blackouts. This left the monitor without power while the MacBook continued on battery. Maybe the system couldn’t read the monitor’s values properly then.
@Anywhere-Music-Player commented on GitHub (Dec 5, 2024):
@waydabber I think this bug should be renamed, since I've disabled percentages at all and still got the same crash after wake. This is just crash when like monitor connect/disconnect for sure, but it's not due to % enabled/disabled.
MonitorControl-2024-12-05-144909.ips.zip
@waydabber commented on GitHub (Dec 5, 2024):
Indeed, this is a different crash (apparently a wrong value was saved to preferences and the app has trouble converting it to a DDC value. Not sure why and how though.
@waydabber commented on GitHub (Dec 5, 2024):
(note: the symbolicated IPS crashes exactly the same way as this https://github.com/MonitorControl/MonitorControl/issues/1648#issuecomment-2493600520).
You should open a different issue for this as this is a different problem which is not yet fixed.
@Anywhere-Music-Player commented on GitHub (Dec 5, 2024):
Situation was - MacBook was on power and monitor too, the power down, MacBook awake(just show Lock Screen) then when power came back, only after that I unlocked MacBook so to continue working with external monitor on power.
@waydabber commented on GitHub (Dec 5, 2024):
No problem, I am not sure exactly why the situation arises, but clearly a wrong value is being used. I just need to add some protections and clamping to make sure that particular line does not fail.
@waydabber commented on GitHub (Dec 18, 2024):
https://github.com/MonitorControl/MonitorControl/issues/1706
@Anywhere-Music-Player commented on GitHub (Jan 24, 2025):
@waydabber so the issue continues, awake from sleep = crash.
Try start app again - crash, start again - changing brightness doesn't work, start again - crash, start again - now all works.
% of brightness never enabled now for all this time.
MonitorControl-2025-01-24-115914.zip
@waydabber commented on GitHub (Jan 24, 2025):
Yep, this seems to be the same (not % related) crash as above.
@mateusz-plociennik commented on GitHub (Aug 31, 2025):
I have built

4.3.3from sources and caught a fatal error:MonitorControl/MenuHandler.swift:50: Fatal error: Unexpectedly found nil while unwrapping an Optional value@waydabber commented on GitHub (Sep 2, 2025):
Yeah, that
currentDisplay!there is not nice at all, this should be fixed. The code is a bit outdated.