Detecting LCD Monitors.
Colin McGregor
colinmc151-bJEeYj9oJeDQT0dZR+AlfA at public.gmane.org
Sun Aug 12 22:46:03 UTC 2007
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.
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...
So, have I missed something obvious here?
Thanks.
Colin McGregor
--
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