#MacOSX : Display EDID [UPDATED]
EDID (Extended Display Identification Data) enables Mac OS X to know what kind of monitor is connected to it.
Why are we interested in it? If we know the exact model of LCD connected to our mac we can retrieve who is the manufacter of the panel (which often it is not the brand under the monitor is sold) and its properties (like response time, contrast and brightness) as Apple doesn’t specify they in its own products.
So here we go:
- Open Terminal app.
- Type (see this comment):
ioreg -lw0 | grep IODisplayEDID | sed "/[^<]*</s///" | xxd -p -r | strings -6
ioreg -lw0 -r -c "IODisplayConnect" -n "display0" -d 2 | grep IODisplayEDID | sed "/[^<]*</s///" | xxd -p -r | strings -6
- Second line is what we are looking for.
NOTE: if you are interested in how this work, you can type in Terminal (but be ready for a full NERD immersion):
man bash
man ioreg
man grep
man sed
man xxd
man strings
Don’t say i haven’t Warned you! 😀
Posted on April 28, 2012, in Mac OS X Tips & Tricks and tagged Display, EDID, exact model, LCD, Mac OS X, strings 6, xxd. Bookmark the permalink. 7 Comments.
Thanks for the post! I was looking for something like this. EDID data is useful for getting the physical screen dimensions for calculating DPI. Imagine an app where the “actual size” of a document is 8.5×11″ as it should be 🙂
Here’s another tip: rather than waiting two seconds for several megabytes of ioreg output to be generated and parsed, here’s a much faster version that only returns the display object. You can replace “display0” with other numbers representing any connected display (0 is always the “main” one).
ioreg -lw0 -r -c “IODisplayConnect” -n “display0” -d 2 | grep …
Thank you, I updated the post 😉
I tried both commands and it just drops down to the next line with 0 output. Any idea why this might be?
most likely you copy pasted the command line from the web page. Try to type it in directly in the Terminal!
I used the command line and I got back the name of the display and the serial number. Is there a command that returns the size / physical dimensions of the monitor?
You can use screenresolution tool.
If you want to use the command line you can type:
system_profiler SPDisplaysDataType | grep Resolution
Do you know of a command that can parse the information out of the resulting EDID file?