Detecting LCD Monitors.
Lennart Sorensen
lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Mon Aug 13 17:17:21 UTC 2007
On Sun, Aug 12, 2007 at 06:46:03PM -0400, Colin McGregor wrote:
> I am looking for a painless way to detect if an LCD
> screen is connected to a box running a Ubuntu Live CD.
>
>
> The basic problem being I want the screen to have a
> resolution of at least 1024 x 768 and look good. CRTs
> with a 4:3 screen ratio can be forced to 1024 x 768
> and be fairly sure (assuming the monitor can support
> 1024 x 768 at all) will look decent. Not so LCD
> screens, who I gather if you were to say try to force
> say a 1280 x 1024 to a 1024 x 768 resolution will look
> like @#$%.
>
> In other words the problem is along the following
> lines:
>
> If monitor = CRT then
> If supported resolution => 1024 x 768 then
> set resolution to 1024 x 768
> else
> display error
> shutdown
>
> If monitor = LCD then
> If best supported resolution = 1024 x 768 then
> set resolution to 1024 x 768
> else
> If best resolution < 1024 x 768 then
> display error
> shutdown
> else
> set to highest available resolution.
>
> With the Ubuntu Live CD /etc/X11/xorg.conf is
> basically useless for this, as it is always "generic
> monitor" , with only 1024x768 and lower resolutions
> listed.
>
> EDID is a standard that allows a video card to get
> some basic information about the monitor it is
> connected to. The problem is EDID data doesn't carry
> the two pieces of data I want most, is this an LCD
> screen and what is the native screen resolution.
>
> /var/log/xorg.0.log does list the EDID data and offers
> a way to get partway to my goal. xorg.0.log will
> identify which screen resolutions the screen does
> support, so if I see a 16:9 (widescreen) screen
> supported I suspect I am on fairly safe ground going
> to the highest 16:9 resolution.
Could you try and include the Xorg log file in an email? I don't have
an LCD to look at to see what it detects.
> While detecting 16:9 helps, there is the issue of 4:3
> LCD screens. EDID can carry manufacture name, and
> model information, so if I know that a Brand XYZ Model
> 42 monitor is an LCD I am good. But that leaves some
> ugly issues, putting together such a table of LCD
> screens and knowing that the software may get ugly the
> instant someone decides to use this live CD with the
> latest / greatest new LCD screens. Another issue, I
> have a no-name LCD screen where the manufacturer name
> was left blank in the EDID data, which suggests there
> may be limits even if I have a HUGE list of
> manufacture/model names...
I haven't seen any 16:9 computer LCD screens (only TVs seem to be 16:9).
Computer LCDs are either 16:10 or 15:9 from what I can tell.
15:9 tends to be 1280x768, while 16:10 is lots of screens, like
1280x800, 1680x1050, 1440x900, 2560x1600, 1920x1200, etc. All are some
multiple of 80x50 pixels except the 1280x768 which is just odd.
> So, have I missed something obvious here?
Not sure. I imagine there has to be a way to detect the screen size and
use the native size of an LCD. Windows seems to do it somehow.
Normally I would pick whatever the highest resolution the display claims
to support is. Certainly for LCDs that should almost certainly be the
native resolution.
Lookup by brand/model is just not going to be very useful. It will
always be out of date.
--
Len Sorensen
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list