Reading EDID data on Apple M1 devices

Is there any way to read EDID data in new Apple M1 devices since the below code snippet does not work in M1 machines however it works in Intel based Mac.

Code Block io_object_t object = -1;
     
io_iterator_t iterator;
   
CFMutableDictionaryRef matching = IOServiceMatching("IODisplayConnect");
   
kern_return_t kernResult = IOServiceGetMatchingServices(kIOMasterPortDefault, matching, &iterator);
   
  if (KERN_SUCCESS == kernResult && iterator != 0) {
     
    object = IOIteratorNext(iterator);
     
    while (object != 0) {
       
      CFDictionaryRef dict = IODisplayCreateInfoDictionary(object, kIODisplayOnlyPreferredName);
      /*
       process data here
       */
       
      object = IOIteratorNext(iterator);
    }
    IOObjectRelease(iterator);
  }

Also tried replacing "IODisplayConnect" by "IODPDevice" but still get an empty iterator.




This thread addresses the same question: https://developer.apple.com/forums/thread/666383
I have tried using IOServiceMatching("IODPDevice") but getting an empty iterator. If anybody can provide code snippet which would take me to the right direction is much appreciated.
Thank you!

Switchresx has added support - https://www.madrau.com/srx_download/srx_download/history.php

Thanks @PaulJohnston, I have tried it and it does find what seems to be the EDID of my screens. Too bad it is not an opensource application so we can have a glimpse on how they did it.

I am still stuck with trying to get it from IODPDevice but I did not get any chance yet.

The app BetterDisplay (https://betterdisplay.pro) can both read and override (!) the EDID on Apple Silicon, so both are definitely doable

Reading EDID data on Apple M1 devices
 
 
Q