[Intel-gfx] Is there a way to determine which display is the laptop display?

Adam Jackson ajax at redhat.com
Mon Feb 6 22:44:16 CET 2012


On 2/2/12 4:28 PM, Alan Amaral wrote:
> With earlier hardware it was pretty easy to determine which display was the laptop display
> as it was usually (always?) "LVDS".  With new hardware it's sometimes an embedded display
> port (eDP) display, and I've seen at least one laptop which has the laptop monitor listed as simply
> Display Port (DP), although that may not have been an Intel machine.  In the DP case the laptop
> monitor can't be distinguished from a normal display port monitor.

If the driver isn't reporting an eDP display as eDP, the driver is broken.

> The current code I have uses some heuristics to figure out what outputs are available on the system,
> i.e. checks for LVDS, then eDP, then DP, and makes a guess as to which one is the laptop monitor,
> but in some cases, like the DisplayPort case I described above, it's impossible to know for sure, and
> if a future release changes the names it will fail.

The names won't change.  There might be some new embedded display 
connectivity in the future with a new name, but that's something you'd 
have to handle then anyway.

Ideally we'd come up with a way to proxy laptop lid state into DRM 
connector state directly, but a) there's a lot of broken hardware in the 
world and b) the kernel tends to stridently resist getting anything 
right in kernelspace when it's easier to let people get it wrong in 
userspace instead.  Yes I'm bitter.

- ajax



More information about the Intel-gfx mailing list