* Is there a way to determine which display is the laptop display?
@ 2012-02-02 21:28 Alan Amaral
2012-02-06 21:44 ` Adam Jackson
0 siblings, 1 reply; 3+ messages in thread
From: Alan Amaral @ 2012-02-02 21:28 UTC (permalink / raw)
To: intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 1563 bytes --]
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.
Is there a way to definitively determine which, if any, monitor is the one that belongs to the laptop
on a laptop machine? I need to know in order to write a utility which tracks the laptop lid state (i.e.
open or closed), and automatically enables or disables the laptop monitor via XRandR when the state
changes. It has to work across all Intel (and if possible ATI) machines.
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.
One thing I have seen is that the serial number contained in the laptop's display EDID information
for the laptops I've tried have all been 0, but that may simply be a fluke of the particular machines
I've tried. Plus there are normal monitors which provide badly formed EDID information, so I can't
rely on this.
Thanks,
Al Amaral
Virtual Computer
[-- Attachment #1.2: Type: text/html, Size: 2959 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Is there a way to determine which display is the laptop display?
2012-02-02 21:28 Is there a way to determine which display is the laptop display? Alan Amaral
@ 2012-02-06 21:44 ` Adam Jackson
2012-02-07 20:42 ` Alan Amaral
0 siblings, 1 reply; 3+ messages in thread
From: Adam Jackson @ 2012-02-06 21:44 UTC (permalink / raw)
To: Alan Amaral; +Cc: intel-gfx
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Is there a way to determine which display is the laptop display?
2012-02-06 21:44 ` Adam Jackson
@ 2012-02-07 20:42 ` Alan Amaral
0 siblings, 0 replies; 3+ messages in thread
From: Alan Amaral @ 2012-02-07 20:42 UTC (permalink / raw)
To: Adam Jackson; +Cc: intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 2458 bytes --]
Your idea about proxying the lid state to the drm connection state would be perfect. Why leave the
display turned on when you can't see it anyway? Closing the lid is pretty much equivalent to yanking
a monitor cable.
If that can't be done is there any chance something could be put into /sys/class/drm/card*_foo, like a
new entry for the laptop screen, such as /sys/class/drm/card0-LVDS-1/laptop_screen? Could be created
only for the laptop screen, or for every output but only the laptop returns TRUE.
I've already got mapping from XRandR output names to drm output names (quite a bitch that was to
get working across all systems), so reading the contents of the sysfs file wouldn't be hard.
Thanks for the reply,
Al Amaral
________________________________
From: Adam Jackson [mailto:ajax@redhat.com]
Sent: Mon 2/6/2012 4:44 PM
To: Alan Amaral
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] Is there a way to determine which display is the laptop display?
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
[-- Attachment #1.2: Type: text/html, Size: 3877 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-02-07 20:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-02 21:28 Is there a way to determine which display is the laptop display? Alan Amaral
2012-02-06 21:44 ` Adam Jackson
2012-02-07 20:42 ` Alan Amaral
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.