trying to install the driver for my
Nvidia graphics card. That's the title
in a nutshell.
I'm working with a new installation of
Debian Squeeze. The problem I'm running
into is that Debian Squeeze is relatively
new and the Nvidia GeForce 5700 is relatively
old.
Debian Squeeze was initially released on February
6th, 2011. The GeForce 5700 was initially released
in October of 2003. That's a difference of 7 years
and 4 months.
Obviously hardware that is 7 years old is legacy
hardware. Here's what Debian has to say about
its legacy GPUs and graphic cards:
What's a legacy driver?
The first thing I've learned this morning is
that I need to use a legacy driver rather than
a current driver from Nvidia. I need a 173.14.xx
driver according to Nvidia.
Where do I get the 173.14.xx driver? Here's
the driver for a 32-bit processor. Note that
there is a completely different driver if you
have a 64-bit processor. Therefore, you need
to be careful to get the right one:
LINUX DISPLAY DRIVER - X86
OK. I've just downloaded the above driver.
I did so in a seperate directory underneath
my home directory that I've created for downloads.
What I've downloaded appears to be a script. I
make the script executable by running the following
command as the root user:
chmod u+x NVIDIA-Linux-x86-173.14.31-pkg1.run
Next, I run the script itself:
./NVIDIA-Linux-x86-173.14.31-pkg1.run
The script complains that I'm trying to
run an X server in the following message:
ERROR: You appear to be running an X server; please exit X before installing. For further details, please see the section INSTALLING THE NVIDIA DRIVER in the README available on the Linux driver download page at www.nvidia.com.
OK. I should have thought of that. I really should not be
using my graphics card and trying to install software that
drives the graphics card at the same time.
I'll reboot Debian into maintenance mode. In maintenance
mode, the graphics card is used only as a text terminal.
It should be pretty hard to knock out the ability of the
graphics card to function in maintenance mode.
OK. I rebooted into maintenance mode and ran the above
Nvidia script. The first thing the script complained
about is that it was unable to run the runlevel script,
or something like that. However, since the script was
willing to continue without knowing the runlevel, I did
nto worry about it.
Next, it wanted to disable something called the Noveau
driver which is apparently compiled into my kernel. Here's
some in information on the Noveau driver:
Nouveau: Accelerated Open Source driver for nVidia cards
The existence of the Noveau driver is a great thing.
This driver is probably what has allowed me to write
this blog post up to this point. I was probably using
the Noveau driver when I wrote the above paragraphs.
In any case, the Nvidia installer disabled my Noveau
driver and I did not object. I gave it permission to
do something or other to modprobe in order to do this.
Apparently it added a file to some directory somewhere.
The next stumbling block was my C compiler. Apparently
my C compiler is too up-to-date for my kernel. I learned
what version of the C compiler I'm running by typing the
following command:
gcc --version
Here's the answer I got back:
gcc (Debian 4.4.5-8) 4.4.5
You can learn which kernel you are running by
typing the following command:
uname -r
Here's the answer that comes back
for my kernel that is currently installed:
2.6.32-5-686
According to the Nvidia graphics card driver
installer script the version of gcc that was
used to compile my kernel is version 4.3. My
C compiler is version 4.4. How do I bridge
this gap?
The Nvidia installer suggested that I use the
CC variable to bridge the gap. However, before
i did so, I had to install gcc version 4.3. I
used the aptitude command to do this.
After version 4.3 of the gcc compiler had been
installed, I now had 2 versions of gcc. Therefore
I used the CC variable to point to version 4.3
instead of version 4.4. Here's the steps I took
to do this:
- Open up a terminal window
- type set -o vi to give
yourself a way to edit commands as you go - Type gcc at the command line
- Attempt to complete the gcc command
by hitting the tab key - In my case, one way to complete the command
was gcc-4.3 - Complete the command for your kernel by
finishing the command by typing the missing
letters (for example gcc-4.3) - Hit the escape key to invoke the command
line editor - Use the back arrow to get your cursor on
the first character of gcc-4.3 - Edit the command line so that it comes
out as export CC="gcc-4.3" - Hit <enter> to execute the export
- Try running the installation script again
with the CC variable set
export CC="gcc-4.3"
However you get there, you want to set the
CC variable by somehow typing the above command
and the hitting enter and then running the
installation script again.
Once I finished doing all of the above and
restarted Debian again and I knew immediately
that the new graphics driver was working because
it painted the screen so much more quickly.
In particular, the scrooling of this blog post
was maybe 10 times quicker. Prior to installing
the Nvidia driver, scrolling was incredibly slow.
Thanks to Nvidia for doing such a great job
supporting their legacy drivers!
Ed Abbott
No comments:
Post a Comment