<HTML dir=ltr><HEAD>
<META content="text/html; charset=unicode" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16440"></HEAD>
<BODY>
<DIV><FONT color=#000000 size=2 face=Arial>With earlier hardware it was pretty easy to determine which display was the laptop display</FONT></DIV>
<DIV><FONT size=2 face=Arial>as it was usually (always?) "LVDS". With new hardware it's sometimes an embedded display</FONT></DIV>
<DIV><FONT size=2 face=Arial>port (eDP) display, and I've seen at least one laptop which has the laptop monitor listed as simply</FONT></DIV>
<DIV><FONT size=2 face=Arial>Display Port (DP), although that may not have been an Intel machine. In the DP case the laptop</FONT></DIV>
<DIV><FONT size=2 face=Arial>monitor can't be distinguished from a normal display port monitor.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Is there a way to definitively determine which, if any, monitor is the one that belongs to the laptop</FONT></DIV>
<DIV><FONT size=2 face=Arial>on a laptop machine? I need to know in order to write a utility which tracks the laptop lid state (i.e.</FONT></DIV>
<DIV><FONT size=2 face=Arial>open or closed), and automatically enables or disables the laptop monitor via XRandR when the state</FONT></DIV>
<DIV><FONT size=2 face=Arial>changes. It has to work across all Intel (and if possible ATI) machines.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>The current code I have uses some heuristics to figure out what outputs are available on the system,</FONT></DIV>
<DIV><FONT size=2 face=Arial>i.e. checks for LVDS, then eDP, then DP, </FONT><FONT size=2 face=Arial>and makes a guess as to which one is the laptop monitor,</FONT></DIV>
<DIV><FONT size=2 face=Arial>but in some cases, like the DisplayPort </FONT><FONT size=2 face=Arial>case I described above, it's impossible to know for sure, and</FONT></DIV>
<DIV><FONT size=2 face=Arial>if a future release changes the names it will fail.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>One thing I have seen is that the serial number contained in the laptop's display EDID information</FONT></DIV>
<DIV><FONT size=2 face=Arial>for the laptops I've tried have all been 0, but that may simply be a fluke of the particular machines</FONT></DIV>
<DIV><FONT size=2 face=Arial>I've tried. Plus there are normal monitors which provide badly formed EDID information, </FONT><FONT size=2 face=Arial>so I can't</FONT></DIV>
<DIV><FONT size=2 face=Arial>rely on this.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Thanks,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Al Amaral</FONT></DIV>
<DIV><FONT size=2 face=Arial>Virtual Computer</FONT></DIV></BODY></HTML>