[GH-ISSUE #1178] MonitorControl fails to launch, instead displays "Illegal instructions" on STDOUT/STDERR #686

Closed
opened 2026-05-05 06:30:14 -06:00 by gitea-mirror · 11 comments
Owner

Originally created by @meermanr on GitHub (Sep 15, 2022).
Original GitHub issue: https://github.com/MonitorControl/MonitorControl/issues/1178

Before opening the issue, have you...?

  • Searched for existing issues
  • Looked through the wiki
  • Updated MonitorControl to the latest version (if applicable)

Describe the bug

MonitorControl fails to launch when I am connected to three external displays at work, which are described in detail below. Attempting to launch while connected to these displays results in:

robmee01@C02F2508MD6R ~ OSX↑·9|+1
$ /Applications/MonitorControl.app/Contents/MacOS/MonitorControl

Illegal instructions

However, it was working on these same displays connected the same way last week, although I did have to relaunch it a couple of times to get it working. It works fine when connected to a single Dell UP3216Q at home, so this issues appears to be cause by the monitors that are connected, rather than being a fundamentally broken installation.

Steps to reproduce

  1. (Be me with my setup, apparently :) )
  2. Wonder why TouchBar gestures to change brightness on the external monitor are instead changing the brightness of the native retina display
  3. Notice that MonitorControl's icon is no longer in the menu bar
  4. Attempt to launch it via ⌘+Space, typing MonitorControl, accepting the auto-completion of MonitorControl.app and press return. Nothing happens.
  5. Open a terminal and run open /Applications/MonitorControl.app. Nothing happens.
  6. In the same terminal, run /Applications/MonitorControl.app/Contents/MacOS/MonitorControl

Result:

robmee01@C02F2508MD6R ~ OSX↑·9|+1
$ /Applications/MonitorControl.app/Contents/MacOS/MonitorControl

Illegal instructions

Expected behavior

MonitorControl would launch, as evidenced by all three external displays changing their brightness and the MonitorControl icon appearing in the menu bar, and brightness gestures on my TouchBar triggering brightness changes on the screen with the cursor.

Or, alternatively, displaying an error that only some of my displays can be controlled and others cannot (.. for "reasons").

Anything else?

Output from System Report > Hardware -> Graphics/Displays:

AMD Radeon Pro 5500M:

  Chipset Model:	AMD Radeon Pro 5500M
  Type:	GPU
  Bus:	PCIe
  PCIe Lane Width:	x16
  VRAM (Total):	8 GB
  Vendor:	AMD (0x1002)
  Device ID:	0x7340
  Revision ID:	0x0040
  ROM Revision:	113-D3220E-190
  VBIOS Version:	113-D32206U1-020
  Option ROM Version:	113-D32206U1-020
  EFI Driver Version:	01.A1.190
  Automatic Graphics Switching:	Supported
  gMux Version:	5.0.0
  Metal Family:	Supported, Metal GPUFamily macOS 2
  Displays:
Colour LCD:
  Display Type:	Built-In Retina LCD
  Resolution:	3072x1920 Retina
  Framebuffer Depth:	30-Bit Colour (ARGB2101010)
  Main Display:	Yes
  Mirror:	Off
  Online:	Yes
  Automatically Adjust Brightness:	No
  Connection Type:	Internal
EA275WMi:
  Resolution:	1920x1080 (1080p FHD - Full High Definition)
  UI Looks like:	1920 x 1080 @ 60.00Hz
  Framebuffer Depth:	30-Bit Colour (ARGB2101010)
  Display Serial Number:	5X100126NB  
  Mirror:	Off
  Online:	Yes
  Rotation:	Supported
  Adapter Type:	Thunderbolt/DisplayPort
EA274WMi:
  Resolution:	1440 x 2560
  UI Looks like:	1440 x 2560 @ 60.00Hz
  Framebuffer Depth:	30-Bit Colour (ARGB2101010)
  Display Serial Number:	46102290NB  
  Mirror:	Off
  Online:	Yes
  Rotation:	270
  Adapter Type:	Apple USB-C Digital AV Adapter
  Adapter Firmware Version:	2.35
S27H85x:
  Resolution:	1920x1080 (1080p FHD - Full High Definition)
  UI Looks like:	1920 x 1080 @ 60.00Hz
  Framebuffer Depth:	30-Bit Colour (ARGB2101010)
  Display Serial Number:	H4ZJ502990  
  Mirror:	Off
  Online:	Yes
  Rotation:	Supported
  Connection Type:	Thunderbolt/DisplayPort

Messages from Console.app, filtered by process:MonitorControl while reproducing the issue:

default	10:53:13.673484+0100	MonitorControl	CHECKIN: pid=77982
default	10:53:13.682774+0100	MonitorControl	CHECKEDIN: pid=77982 asn=0x0-0x272272 foreground=0
default	10:53:13.688082+0100	MonitorControl	FRONTLOGGING: version 1
default	10:53:13.688245+0100	MonitorControl	Registered, pid=77982 ASN=0x0,0x272272
default	10:53:13.693197+0100	MonitorControl	BringForward: pid=77982 asn=0x0-0x272272 bringForward=0 foreground=0 uiElement=1 launchedByLS=0 modifiersCount=0 allDisabled=0
default	10:53:13.694221+0100	MonitorControl	Current system appearance, (HLTB: 1), (SLS: 0)
default	10:53:13.697038+0100	MonitorControl	No persisted cache on this platform.
default	10:53:13.698189+0100	MonitorControl	Failed to copy the SysCfgDict MG key with error: 0
default	10:53:13.698163+0100	MonitorControl	Received configuration update from daemon (initial)
default	10:53:13.703017+0100	MonitorControl	Post-registration system appearance: (HLTB: 1)
default	10:53:13.782352+0100	MonitorControl	NSApp cache appearance:
-NSRequiresAquaSystemAppearance: 0
-appearance: (null)
-effectiveAppearance: <NSCompositeAppearance: 0x600001248400
 (
    "<NSAquaAppearance: 0x600001248300>",
    "<NSSystemAppearance: 0x600001240b80>"
)>
default	10:53:13.858629+0100	MonitorControl	 HALPlugInManagement::RegisterPlugIns: skipping in-process plug-ins
error	10:53:13.858654+0100	MonitorControl	AddInstanceForFactory: No factory registered for id <CFUUID 0x600003c48780> F8BB1C28-BAE8-11D6-9C31-00039315CD46
default	10:53:13.909881+0100	MonitorControl	Registering for test daemon availability notify post.
default	10:53:13.910140+0100	MonitorControl	notify_get_state check indicated test daemon not ready.
default	10:53:13.910377+0100	MonitorControl	notify_get_state check indicated test daemon not ready.
default	10:53:13.910523+0100	MonitorControl	notify_get_state check indicated test daemon not ready.
default	10:53:13.911200+0100	MonitorControl	Recieved DFR status change 0. status = 0x1
default	10:53:13.911813+0100	MonitorControl	Recieved DFR status change 1. status = 0x1
default	10:53:13.912894+0100	MonitorControl	SignalReady: pid=77982 asn=0x0-0x272272
default	10:53:13.913444+0100	MonitorControl	SIGNAL: pid=77982 asn=0x0x-0x272272
default	10:53:13.960372+0100	MonitorControl	Reacting to DFR status change 0. status = 0x1
default	10:53:13.963215+0100	MonitorControl	Shortcuts Contextual Actions enabled
default	10:53:13.963563+0100	MonitorControl	Reacting to DFR status change 1. status = 0x1
default	10:53:13.976140+0100	MonitorControl	Register notification block

Environment Information (please complete the following information)

- macOS version: 12.6 Monterey
- Mac model: MacBook pro (16-inch, 2019)
- MonitorControl version: 4.1.0
- Monitor(s):
  - (Built-in Retina Display)
  - Samsung S27H85x connected via USB Type-C to USB Type-C
  - NEC EA274WMi connected via Apple USB Type-C to HDMI dongle
  - NEC EA275WMi connected via USB Type-C to DisplayPort cable
- Apple Silicon/M1 (yes or no): no
Originally created by @meermanr on GitHub (Sep 15, 2022). Original GitHub issue: https://github.com/MonitorControl/MonitorControl/issues/1178 ### Before opening the issue, have you...? - [X] Searched for existing issues - [X] Looked through [the wiki](https://github.com/MonitorControl/MonitorControl/wiki) - [X] Updated MonitorControl to the latest version (if applicable) ### Describe the bug MonitorControl fails to launch when I am connected to three external displays at work, which are described in detail below. Attempting to launch while connected to these displays results in: ```shell-session robmee01@C02F2508MD6R ~ OSX↑·9|+1 $ /Applications/MonitorControl.app/Contents/MacOS/MonitorControl Illegal instructions ``` However, it _was_ working on these same displays connected the same way last week, although I did have to relaunch it a couple of times to get it working. It works fine when connected to a single Dell UP3216Q at home, so this issues appears to be cause by the monitors that are connected, rather than being a fundamentally broken installation. ### Steps to reproduce 0. (Be me with my setup, apparently :) ) 1. Wonder why TouchBar gestures to change brightness on the external monitor are instead changing the brightness of the native retina display 2. Notice that MonitorControl's icon is no longer in the menu bar 3. Attempt to launch it via ⌘+Space, typing MonitorControl, accepting the auto-completion of MonitorControl.app and press return. Nothing happens. 4. Open a terminal and run `open /Applications/MonitorControl.app`. Nothing happens. 5. In the same terminal, run `/Applications/MonitorControl.app/Contents/MacOS/MonitorControl` Result: ```shell-session robmee01@C02F2508MD6R ~ OSX↑·9|+1 $ /Applications/MonitorControl.app/Contents/MacOS/MonitorControl Illegal instructions ``` ### Expected behavior MonitorControl would launch, as evidenced by all three external displays changing their brightness and the MonitorControl icon appearing in the menu bar, and brightness gestures on my TouchBar triggering brightness changes on the screen with the cursor. Or, alternatively, displaying an error that only _some_ of my displays can be controlled and others cannot (.. for "reasons"). ### Anything else? Output from System Report > Hardware -> Graphics/Displays: ``` AMD Radeon Pro 5500M: Chipset Model: AMD Radeon Pro 5500M Type: GPU Bus: PCIe PCIe Lane Width: x16 VRAM (Total): 8 GB Vendor: AMD (0x1002) Device ID: 0x7340 Revision ID: 0x0040 ROM Revision: 113-D3220E-190 VBIOS Version: 113-D32206U1-020 Option ROM Version: 113-D32206U1-020 EFI Driver Version: 01.A1.190 Automatic Graphics Switching: Supported gMux Version: 5.0.0 Metal Family: Supported, Metal GPUFamily macOS 2 Displays: Colour LCD: Display Type: Built-In Retina LCD Resolution: 3072x1920 Retina Framebuffer Depth: 30-Bit Colour (ARGB2101010) Main Display: Yes Mirror: Off Online: Yes Automatically Adjust Brightness: No Connection Type: Internal EA275WMi: Resolution: 1920x1080 (1080p FHD - Full High Definition) UI Looks like: 1920 x 1080 @ 60.00Hz Framebuffer Depth: 30-Bit Colour (ARGB2101010) Display Serial Number: 5X100126NB Mirror: Off Online: Yes Rotation: Supported Adapter Type: Thunderbolt/DisplayPort EA274WMi: Resolution: 1440 x 2560 UI Looks like: 1440 x 2560 @ 60.00Hz Framebuffer Depth: 30-Bit Colour (ARGB2101010) Display Serial Number: 46102290NB Mirror: Off Online: Yes Rotation: 270 Adapter Type: Apple USB-C Digital AV Adapter Adapter Firmware Version: 2.35 S27H85x: Resolution: 1920x1080 (1080p FHD - Full High Definition) UI Looks like: 1920 x 1080 @ 60.00Hz Framebuffer Depth: 30-Bit Colour (ARGB2101010) Display Serial Number: H4ZJ502990 Mirror: Off Online: Yes Rotation: Supported Connection Type: Thunderbolt/DisplayPort ``` Messages from Console.app, filtered by process:MonitorControl while reproducing the issue: ``` default 10:53:13.673484+0100 MonitorControl CHECKIN: pid=77982 default 10:53:13.682774+0100 MonitorControl CHECKEDIN: pid=77982 asn=0x0-0x272272 foreground=0 default 10:53:13.688082+0100 MonitorControl FRONTLOGGING: version 1 default 10:53:13.688245+0100 MonitorControl Registered, pid=77982 ASN=0x0,0x272272 default 10:53:13.693197+0100 MonitorControl BringForward: pid=77982 asn=0x0-0x272272 bringForward=0 foreground=0 uiElement=1 launchedByLS=0 modifiersCount=0 allDisabled=0 default 10:53:13.694221+0100 MonitorControl Current system appearance, (HLTB: 1), (SLS: 0) default 10:53:13.697038+0100 MonitorControl No persisted cache on this platform. default 10:53:13.698189+0100 MonitorControl Failed to copy the SysCfgDict MG key with error: 0 default 10:53:13.698163+0100 MonitorControl Received configuration update from daemon (initial) default 10:53:13.703017+0100 MonitorControl Post-registration system appearance: (HLTB: 1) default 10:53:13.782352+0100 MonitorControl NSApp cache appearance: -NSRequiresAquaSystemAppearance: 0 -appearance: (null) -effectiveAppearance: <NSCompositeAppearance: 0x600001248400 ( "<NSAquaAppearance: 0x600001248300>", "<NSSystemAppearance: 0x600001240b80>" )> default 10:53:13.858629+0100 MonitorControl HALPlugInManagement::RegisterPlugIns: skipping in-process plug-ins error 10:53:13.858654+0100 MonitorControl AddInstanceForFactory: No factory registered for id <CFUUID 0x600003c48780> F8BB1C28-BAE8-11D6-9C31-00039315CD46 default 10:53:13.909881+0100 MonitorControl Registering for test daemon availability notify post. default 10:53:13.910140+0100 MonitorControl notify_get_state check indicated test daemon not ready. default 10:53:13.910377+0100 MonitorControl notify_get_state check indicated test daemon not ready. default 10:53:13.910523+0100 MonitorControl notify_get_state check indicated test daemon not ready. default 10:53:13.911200+0100 MonitorControl Recieved DFR status change 0. status = 0x1 default 10:53:13.911813+0100 MonitorControl Recieved DFR status change 1. status = 0x1 default 10:53:13.912894+0100 MonitorControl SignalReady: pid=77982 asn=0x0-0x272272 default 10:53:13.913444+0100 MonitorControl SIGNAL: pid=77982 asn=0x0x-0x272272 default 10:53:13.960372+0100 MonitorControl Reacting to DFR status change 0. status = 0x1 default 10:53:13.963215+0100 MonitorControl Shortcuts Contextual Actions enabled default 10:53:13.963563+0100 MonitorControl Reacting to DFR status change 1. status = 0x1 default 10:53:13.976140+0100 MonitorControl Register notification block ``` ### Environment Information (please complete the following information) ```markdown - macOS version: 12.6 Monterey - Mac model: MacBook pro (16-inch, 2019) - MonitorControl version: 4.1.0 - Monitor(s): - (Built-in Retina Display) - Samsung S27H85x connected via USB Type-C to USB Type-C - NEC EA274WMi connected via Apple USB Type-C to HDMI dongle - NEC EA275WMi connected via USB Type-C to DisplayPort cable - Apple Silicon/M1 (yes or no): no ```
gitea-mirror 2026-05-05 06:30:14 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@meermanr commented on GitHub (Sep 15, 2022):

Is there a way to reset my preferences, so I can try a "fresh install"?

<!-- gh-comment-id:1247915294 --> @meermanr commented on GitHub (Sep 15, 2022): Is there a way to reset my preferences, so I can try a "fresh install"?
Author
Owner

@the0neyouseek commented on GitHub (Sep 15, 2022):

To remove all saved preferences you can do this command in terminal

defaults delete me.guillaumeb.MonitorControl
<!-- gh-comment-id:1248185853 --> @the0neyouseek commented on GitHub (Sep 15, 2022): To remove all saved preferences you can do this command in terminal ```sh defaults delete me.guillaumeb.MonitorControl ```
Author
Owner

@meermanr commented on GitHub (Sep 15, 2022):

Thanks - I'll try that the next time I'm using that problematic setup (likely next week).

Could this issue be caused by the following preference?

  • Upon startup or wake: Assume last saved settings are valid (recommended)

I tend to pack up my home-working desk to go to the office while the MacBook is suspended (e.g. I pushed the power button, then pressed escape to dismiss the lock screen and turn the displays off, and then closed the lid). When I get to work the first thing I do it connect the power and then the three external displays before unlocking it.

<!-- gh-comment-id:1248403116 --> @meermanr commented on GitHub (Sep 15, 2022): Thanks - I'll try that the next time I'm using that problematic setup (likely next week). Could this issue be caused by the following preference? - Upon startup or wake: Assume last saved settings are valid (recommended) I tend to pack up my home-working desk to go to the office while the MacBook is suspended (e.g. I pushed the power button, then pressed escape to dismiss the lock screen and turn the displays off, and then closed the lid). When I get to work the first thing I do it connect the power and then the three external displays _before_ unlocking it.
Author
Owner

@meermanr commented on GitHub (Sep 16, 2022):

I've had an opportunity to test changing the preference "Upon startup or wake" from "Assume last saved settings are valid (recommended)" to "Attempt to read display settings": I am no longer experiencing a crash.

Can I suggest making changes to fallback to some safe setting rather than abruptly exiting with "Illegal instructions"?

<!-- gh-comment-id:1249353812 --> @meermanr commented on GitHub (Sep 16, 2022): I've had an opportunity to test changing the preference "Upon startup or wake" from "Assume last saved settings are valid (recommended)" to "Attempt to read display settings": I am no longer experiencing a crash. Can I suggest making changes to fallback to some safe setting rather than abruptly exiting with "Illegal instructions"?
Author
Owner

@waydabber commented on GitHub (Sep 21, 2022):

Well, abruptly exiting with "Illegal instructions" is not a design choice on our part but obviously a bug somewhere. If there is a crash log we could theoretically pinpoint where/why the crash is happening.

<!-- gh-comment-id:1253295800 --> @waydabber commented on GitHub (Sep 21, 2022): Well, abruptly exiting with "Illegal instructions" is not a design choice on our part but obviously a bug somewhere. If there is a crash log we could theoretically pinpoint where/why the crash is happening.
Author
Owner

@meermanr commented on GitHub (Sep 21, 2022):

I’m not sure where I would look for a crash log, other than what I provided from console.log.

It doesn’t pop up one of those “App has encountered an error” windows that ask you to report the issue.

I can reproduce this, so if there’s a tool to run it under that captures a core dump (etc) I’m happy to do so.

<!-- gh-comment-id:1254199920 --> @meermanr commented on GitHub (Sep 21, 2022): I’m not sure where I would look for a crash log, other than what I provided from console.log. It doesn’t pop up one of those “App has encountered an error” windows that ask you to report the issue. I can reproduce this, so if there’s a tool to run it under that captures a core dump (etc) I’m happy to do so.
Author
Owner

@waydabber commented on GitHub (Nov 14, 2022):

Hi @meermanr - you should be able to find these under Console / Crash Reports or Spin Reports.

Screenshot 2022-11-14 at 10 53 09
<!-- gh-comment-id:1313395578 --> @waydabber commented on GitHub (Nov 14, 2022): Hi @meermanr - you should be able to find these under Console / Crash Reports or Spin Reports. <img width="174" alt="Screenshot 2022-11-14 at 10 53 09" src="https://user-images.githubusercontent.com/37590873/201629684-28acf86e-45f4-4dd0-bac9-a6e4a6451396.png">
Author
Owner

@meermanr commented on GitHub (Jan 27, 2023):

Finally caught a crash, report below:

MonitorControl-2023-01-26-091530.ips.tar.gz

My setup has changed since filing the report - I am now running macOS 13.2 (22D49)

<!-- gh-comment-id:1406321132 --> @meermanr commented on GitHub (Jan 27, 2023): Finally caught a crash, report below: [MonitorControl-2023-01-26-091530.ips.tar.gz](https://github.com/MonitorControl/MonitorControl/files/10517984/MonitorControl-2023-01-26-091530.ips.tar.gz) My setup has changed since filing the report - I am now running macOS 13.2 (22D49)
Author
Owner

@stale[bot] commented on GitHub (Jan 27, 2024):

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

<!-- gh-comment-id:1913157291 --> @stale[bot] commented on GitHub (Jan 27, 2024): Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
Author
Owner

@meermanr commented on GitHub (Jan 27, 2024):

This still happens occasionally on my Apple Silicon M2 Max

<!-- gh-comment-id:1913285375 --> @meermanr commented on GitHub (Jan 27, 2024): This still happens occasionally on my Apple Silicon M2 Max
Author
Owner

@waydabber commented on GitHub (Oct 3, 2024):

Maybe with the latest version (updated Swift compiler and changed some project settings) this is not an issue anymore. If it is, will reopen.

<!-- gh-comment-id:2391471465 --> @waydabber commented on GitHub (Oct 3, 2024): Maybe with the latest version (updated Swift compiler and changed some project settings) this is not an issue anymore. If it is, will reopen.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/MonitorControl#686
No description provided.