Open adams-family opened 2 years ago
Ok, I think this might be the file we are looking for?
/Library/Preferences/com.apple.windowserver.displays.plist
All right, I confirm that even if I change the file path to the above, the app is still failing with:
2022-02-14 16:08:21.539 ddcctl[6486:275857] D: CGDisplay C1BE29A5-BFC9-4EDA-82B0-1E638BB772F7 dispID(#2) (1920x1080 0°) HiDPI
2022-02-14 16:08:21.539 ddcctl[6486:275857] -[NSTaggedPointerString countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x96e7084facc55e4e
2022-02-14 16:08:21.539 ddcctl[6486:275857] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x96e7084facc55e4e'
*** First throw call stack:
(
0 CoreFoundation 0x00000001a8f2c1cc __exceptionPreprocess + 240
1 libobjc.A.dylib 0x00000001a8c7d7b8 objc_exception_throw + 60
2 CoreFoundation 0x00000001a8fbf1a0 -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x00000001a8e8c360 ___forwarding___ + 1728
4 CoreFoundation 0x00000001a8e8bbe0 _CF_forwarding_prep_0 + 96
5 ddcctl 0x0000000100c8b6bc getDisplayDeviceLocation + 428
6 ddcctl 0x0000000100c8c074 main + 852
7 dyld 0x0000000100d9d0f4 start + 520
)
libc++abi: terminating with uncaught exception of type NSException
Abort trap: 6
Which has been reported here: https://github.com/kfix/ddcctl/issues/86
And I also found that my issue has already been reported here: https://github.com/kfix/ddcctl/issues/114
Sorry for the duplicates. I'd love to help solving this, problem is my C programming skills are very limited.
I'll look into removing or fixing that code but M1s are not supported yet so this is the least of your issues.
I made some debugging and I discovered the following:
IOServiceGetMatchingServices
function is returning an empty iterator, so I'm not able to get throughHowever, I have a good news for you and for myself, as well: there is a tool called m1ddc which is very short, very straightforward and working fine on M1 and Monterey (I'm using it right now), so that could serve you as a reference. Hope it helps!
However, I have a good news for you and for myself, as well: there is a tool called m1ddc which is very short, very straightforward and working fine on M1 and Monterey (I'm using it right now), so that could serve you as a reference. Hope it helps!
Unfortunately no luck for us using HDMI displays:
Please note that controlling a HDMI display via the 2020 M1 Mini's HDMI port is not working. You have to use DisplayPort over USB-C!
@adams-family thanks for sharing the m1ddc
tool!
Getting this as well on i5 Mac Mini
I made some debugging and I discovered the following:
- the format of the two Preferences files (Monterey and Big Sur) are different, that's where the code fails as it's expecting a key in the dictionary that does not exist
- even if I remove the code that's trying to parse the Preferences file, the
IOServiceGetMatchingServices
function is returning an empty iterator, so I'm not able to get throughHowever, I have a good news for you and for myself, as well: there is a tool called m1ddc which is very short, very straightforward and working fine on M1 and Monterey (I'm using it right now), so that could serve you as a reference. Hope it helps!
m1ddc is perfect for M1 MacBook Pro, and you can change the input of display by just using a shortcut by automator, cheers!
Thanks for sharing @Takdrift, m1ddc works like a charm.
I've been using
ddcctl
on my Display with MacBook Pro 2018 (Intel) - worked perfectly, I'm addicted to it.Now I've replaced my laptop with a MacBook Pro 2021 (M1), installed ddctl via
homebrew
but unfortunately it does not work anymore - same display, same cable, just different laptop.I can confirm that such a file does not exist:
I searched my entire drive with "find" and I haven't found a file with such a name at all. I'm happy to help with testing if you had an idea on how to fix it.