2

What terminal command shows the type of display that I have on my MacBook Pro? I used the following command in terminal and it didn't work:

ioreg -lw0 | grep \"EDID\" | sed "/[^<]*
  • 1
    This command definitively will not work (the parameters to sed are wrong). Does ioreg -lw0 | grep EDID produce any results at all? – nohillside Aug 17 '12 at 18:01
  • ioreg -w0 -c IOHIDInterface might be a bit closer, but it's going to be tricky to do this with shell commands, which are typically designed to handle line-wise records, not ascii-art-tree records. – Ken Aug 17 '12 at 18:39
  • No it does not. I am completely new to the apple world. This is my first macbook. I got the command from this article. m.tuaw.com/2012/08/14/… – Jason Aug 17 '12 at 19:15
  • @Patrix: Yes it does show something, but not what i'm looking for. Thank you for you help. – Jason Aug 17 '12 at 19:18
  • @Ken: This gives me a lot of information. I will go thru it to see if it tells me that my screen is from LG or Samsung. Thank you for you assistance! – Jason Aug 17 '12 at 19:19
6
ioreg -lw0 | grep \"EDID\" | sed "/[^<]*</s///" | xxd -p -r | strings -6

Depending on the string that comes up it will tell you the manufacturer of the display. It will not display in plain text.

Assuming you have a Retina display, a string with LP in it means it's an LG.

  • The command doesn't seem to work with the new MacbookPro 13" Retina. Could anyone please check this? I'm encountering a display issue with my new mac :( – Ngoc Pham Nov 17 '12 at 16:38
  • 1
    On my 13" non-Retina, it also appears to do nothing, the cmd returns without any output – ataulm Dec 8 '12 at 17:52
  • 1
    I just learned about xxd. Cheers! – adavid Jan 18 '13 at 12:25
  • 2
    @ataulm On my MacBook Air, I had to remove grep's first \" for the command to return something. Give it a try! Now, the output string starts with LTH, wondering what display manufacturer it is... – Tonin Apr 9 '13 at 10:52
2

Does the relevant info show up in system profiler?

If so, there's a command line: system_profiler. You can extract all kinds of information using the command line and piping it to cat, sed, awk, more, tail, etc.

1

If you have a problem identifying the display with the command described above (as I did), you may use the following approach.

Issue the command:

ioreg -lw0 |grep EDID |grep 4c534e

If you see nothing, it means the display is NOT Samsung (4C534E in hex is "LSN"). If you see several lines including some letter-digit mixture (hex), your display IS Samsung.

You may alternatively try to search for "4C50" (which is "LP" in hex), it WILL produce some output for LG and will produce nothing for Samsung:

ioreg -lw0 |grep EDID |grep 4c50

Or, you may just use the command

ioreg -lw0 |grep EDID

and manually look for the above fragments (4c534e for Samsung and 4c50 for LG) in its output.

Rationale: at least in the terminal you can get booting with "Command" held (e.g. before activation of MacOS on a new device), the "xxd" tool is not available.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .