The Lazy Man's Way to Configuring a Video Card
Copyright (C) 2001 by Steve Litt
Remember the bad old days of biting your nails wondering whether XConfigurator
would freeze or do something else stupid? Remember those XF86Config files
so unfathomable that you refused to touch them? Remember Modelines? Remember
when you figured if your install didn't correctly configure your video
you were toast?
Forget all that stuff!
XFree86 version 4 enables gives you a safe and sane method of configuring
(and reconfiguring) your video. It works with any reasonably mainstream
video card and monitor.
Contents
Quick Tips
-
Don't use XFree86 version 3.x or below. Version 4 is SO MUCH better and
easier.
-
Never test video during a Linux install. It's likely to freeze, blowing
off an hour of your work. Remember you can always configure your video
after Linux is running.
-
Think long and hard before configuring Linux to boot directly to GUI mode.
If your video card dies, you want to boot to character mode and then do
your configuration, rather than face the "if I could see the screen I could
configure the screen, and if I could configure the screen I could see the
screen" catch 22.
-
When a "new hardware detector" like Kudzu offers to configure your video
card, just say no. You can configure it safer and simpler later. You might
want to let Kudzu delete the driver for the old video card if you won't
be using that video card again.
-
If your monitor is ever overdriven (slanting lines across the screen, double
or triple images, or blacked out monitor with monitor LED indicating no
video), press the Ctrl+Alt+Backspace keystroke combination to kill X and
put you back in character mode. If you overdrive a monitor long enough
it could damage the monitor.
Video Card Installation Procedures
The following procedure usually produces a working X (GUI) environment.
Maybe not an optimal one, but a good one that you can easily optimize with
simple edits to your XF86Config-4 file. In rare cases it might
overdrive your monitor. That's not a problem. Just Ctrl+Alt+Backspace to
kill X and go back to character mode, and then fix the overdrive with a
simple change to /etc/X11/XF86Config-4.
-
Back up your existing XF86Config-4 and XF86Config files
in the /etc/X11 directory.
-
With the old video card in place, set the system to boot to character mode
(level 3) rather than GUI mode (level 5). Here are some instructions...
-
Physically insert the video card taking all necessary static precautions.
Make sure power is off, and make sure you're grounded. If your power supply
has a power switch, turn it to the zero position. If the power supply doesn't
have a power switch, unplug the computer completely because ATX cases have
power even when turned off with the front power button.
-
Connect the monitor cable to the newly inserted video card.
-
Power up the computer. You should see it count memory and then boot to
a login prompt.
-
Log in as root. Stay in the /root directory.
-
Run the following command:
XFree86 -configure 2>xf.log
The preceding command tells the XFree86 server to configure a file
called XF86Config.new, sending all messages to xf.log.
The log file might be helpful in troubleshooting, but that probably won't
be necessary. Note that depending on video card and other things the preceding
command could take up to 5 minutes, although it usually completes in less
than 30 seconds, and sometimes as quickly as 1 second.
-
cp -p /root/XF86Config.new /etc/X11/XF86Config-4
-
Run your normal command to start X. On most computers that command is:
startx
-
If your monitor overdrives, Ctrl+Alt+Backspace immediately. You fix that
problem by configuring the color depth and resolution.
At this point unless your monitor overdrove, you probably have a working
(if not optimal) X. Now it's time to optimize your X for your needs.
Optimizing X for Your Needs
So now you have a working but not necessarily optimal video setup, or you
have an overdrive condition. Let's start by configuring color depth and
resolution.
Configuring color depth and resolution
XFree86 typically configures XF86Config.new to the finest resolution the
monitor can support. Unless you have a huge monitor you don't want it that
fine. Also, you might want to decrease the color depth for more performance
or increase it for more faithful color reproduction. And of course if you're
experiencing monitor overdrive, you'll want to decrease your resolution,
color depth or both.
-
Back up your new /etc/X11/XF86Config-4 so if you mess up you can
start over.
-
Edit /etc/X11/XF86Config-4
-
Go down to the line saying Section "Screen". This is the section
governing color depths and resolutions.
-
Notice the structure of this section. It starts with header lines describing
the device, monitor, and maybe some other things. Then it has a number
of subsections, one for each color depth.
-
In the header section define your preferred color depth with the following
line:
DefaultColorDepth 16
The preceding example sets color depth to 16, but you could choose
any number with a subsection.
-
Now go down to the subsection for the color depth you chose, and insert
the resolutions you'd like to see:
Modes "800x600"
Note that the resolution must be something supportable by the monitor.
XFree86 cannot compensate for an inadequate monitor.
The preceding example sets the resolution to 800x600. You can choose
any common resolution such as 640x480, 800x600, 1024x768,
-
If you want the ability to pan in a reduced resolution, append smaller
resolutions. For instance, the following allows you to switch to a panning
640x480 using the Ctrl+Alt+Plus (that's the keypad plus), use the following
line:
Modes "800x600" "640x480"
-
Save the file.
-
Run X however you usually do.
-
If the resolution or color depth is not what you configured, or if you
see screen flicker on a monitor you know should be able to support a high
enough refresh rate to cancel flicker, you need to configure the monitor
section...
Configuring Your Monitor Section
If your XFree86, video card and monitor are standard and fairly recent,
XFree86 probably configured the horzontal sync and vertical refresh rate
of the monitor. If not, use the xf86cfg program (new with XFree86 version
4.x) to snoop on the monitor. In worst cases, you may need to configure
the lines manually. Look up your monitor in your computer's Monitors database.
You can find that database using the locate command:
locate -i Monitors | less
On my Mandrake 8 system the file is at /usr/share/ldetect-lst/MonitorsDB,
but of course your mileage may vary.
The proper file will have semicolon delimited records of the following
form:
# <Manufacturer>; <Monitor name>; <EISA ID (if any)>; <horiz sync in Khz>; <verc sync in Hz>
Find your monitor or a similar but less sophisticated one, and try its
suggested settings. If worst comes to worst you can try some of the Generic
settings.
Once you have your horizontal and vertical ranges, input them into the
monitor section. Here's what XFree86 autodetected for my KDS Visual Sensations
19" monitor using a GeForce2 MX400 64meg card:
Section "Monitor"
Identifier "Monitor0"
VendorName "KDS"
ModelName "1983"
HorizSync 30.0 - 95.0
VertRefresh 50.0 - 160.0
EndSection
DO NOT copy the preceding to your system -- you have a different monitor.
If you don't have a HorizSync nd VertRefresh line, you'll default to 640x480
and you'll get screen flicker. If you set too aggressive numbers on these
two settings, you'll overdrive the monitor. Try to get fairly accurate.
Speeding Up Your Mouse
Default mouse resolution on typical Linux systems is much too small, meaning
you must move your mouse many inches to traverse the screen. Can you spell
repetitive
motion injury?
Some people try to "speed up" the mouse with an xset command, but an
xset command sufficient to address the issue makes the mouse uncontrollable.
Instead, fix the mouse resolution.
Go to the InputDevice section corresponding to your mouse, and within
that section, insert the following line:
Option "resolution" "1600"
Restart X and your mouse should be much faster. If your mouse pointer tends
to "get caught" or "snag" on parts of the screen, you can try reducing
the resolution to a value like 400. Try to achieve the minimum value that
gives you maximum pointer travel per inch of mouse movement.
Fonts
If your fonts aren't right, we have a discussion of fonts entitled Fixing
those unreadable cookie crumb fonts. That discussion might help, especially
if you have a Mandrake system.
Summary
Video configuration was a trial by fire in the bad old day of XFree86 version
3.X. Configuration files were convoluted and nasty, configuration programs
often blew X to pieces, and many people reinstalled to get their video
back. Those days are gone. Now we have XFree86 version 4.X, with its wonderful
configuration facility.
Start by reading the Quick Tips section for
tips so you don't make silly mistakes. Then you can do the simple configuration.
Today, with XFree86 version 4.X you can use the following command:
XFree86 -configure 2>xf.log
to create a working, if not totally perfect, X configuration. Better yet,
that command produces a very simple configuration file. The Video
Card Installation Procedures section walks you through use of the preceding
command.
The resulting configuration file will be simple and will probably work,
but you'll want to customize it for resolution, color depth, mouse resolution
and fonts. The Optimizing X for Your
Needs section discusses those issues.
Steve Litt
Other Video Resources
See also: [ Linux Library | Troubleshooters.Com
| Email Steve Litt | Copyright
Notice ]
Copyright
(C)2001 by Steve Litt. -- Legal