Skip to content

Instantly share code, notes, and snippets.

@macrotis
Created April 7, 2014 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save macrotis/10043405 to your computer and use it in GitHub Desktop.
Save macrotis/10043405 to your computer and use it in GitHub Desktop.
rMBP screen manufacturer check (with fix to improve performance in extreme circumstances)
# Check for "LSN" or "LP"
# "LP" => LG screen, classic IPS, susceptible to Image Retention
# "LSN" => Samsung screen, PLS, not susceptible to Image Retention
# Anything else? Not sure about that.
# The original version began the pipeline with
#ioreg -wl0
# But recently, a gigantic dictionary got dropped in my I/O Kit registry (and I'm not sure why)
# and because the -l flag makes everything display, that was wasting a lot of CPU time.
# This version only reads the "EDID" key (hence -k EDID), greatly improving performance.
ioreg -w0 -k EDID | grep \"EDID\" | sed "/[^<]*</s///" | xxd -p -r | strings -6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment