Comments (9)
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 through
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!
from ddcctl.
@adams-family thanks for sharing the m1ddc
tool!
from ddcctl.
I'll look into removing or fixing that code but M1s are not supported yet so this is the least of your issues.
from ddcctl.
Ok, I think this might be the file we are looking for?
/Library/Preferences/com.apple.windowserver.displays.plist
from ddcctl.
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:
#86
And I also found that my issue has already been reported here:
#114
Sorry for the duplicates. I'd love to help solving this, problem is my C programming skills are very limited.
from ddcctl.
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!
from ddcctl.
Getting this as well on i5 Mac Mini
from ddcctl.
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!
from ddcctl.
Related Issues (20)
- Licence HOT 3
- External HDMI monitors detected intermittently on MacBook Pro HOT 4
- No command works Dell D6000 DisplayLink HOT 5
- Dell U2412M Unable to Switch Back From Source 3 to 15 HOT 2
- Would like people to test my fork which has support for PBP mode + custom VCP codes HOT 5
- Silly question - is there anything in 10.14 that would prevent IOI2CSendRequests from going through? HOT 2
- [REQUEST] DDM KVM controls HOT 1
- can't increase/decrease brightness HOT 2
- Unable to control 30" Apple Cinema Display HOT 2
- Support ASUS VG289Q1A monitor HOT 1
- Macbook Air M1 - INPUT CHANGE ERROR HOT 4
- [Feature Request] KVM usb switch HOT 1
- Is it possible to make it work with a Thunderbolt dock? HOT 3
- Xcode 13, Error Compile MacOS 12 HOT 1
- ASUS VG27A is not supported for input switch HOT 1
- One of the monitors is not detected when mirroring
- Notes For Samsung LU28R55
- ddccdl on iMac detects 0 displays HOT 1
- not getting the brightness values HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ddcctl.