GeForce4 420 Go graphics card installation in Ubuntu 6.06/7.04 (Dapper/Feisty)


Objective.
Install updated Nvidia GeForce4 420 Go graphics driver in Ubuntu 6.06 (Dapper) or 7.04 (Feisty) on Toshiba Satellite Pro 6100 laptop.
Instructions for this procedure in Ubuntu 7.10 (Gutsy) can be found here .

Tasks.
Install required packages
Install Nvidia driver
Configure xorg.conf to use new driver
Edit EDID file for correct screen parameters

Recommendations.
As with any installation on any computing platform, it is good practice to ensure important data is backed up in case unforeseen difficulties arise.
Review all instructions on this page before you begin.

Text file editing from the command line.
This guide uses the Nano application for text editing because of its simplicity. Alternative text editors are available. Basic Nano key combinations to remember are CTRL-O to save and CTRL-X to exit.

Page dependencies (ensure you have access to everything you need before you begin).
The following packages will be required as described in the Procedure section:
build-essential
linux-restricted-modules-[arcitecture] (686 for Pentium/Celeron machines)
linux-headers-[arcitecture] (686 for Pentium/Celeron machines)
ghex (a Hex editor for Gnome - others are available if preferred)
Nvidia driver applicable to architecture and GPU.

Page format.
Text in this format indicates command line entry by the user.
Text in this format indicates an error returned by the system.
Text in this format indicates a normal return from the system.
Beware of similar characters such as 1(one), l(lowercase L), 0(zero), O(uppercase 'o'), | (pipe – Shift '\' usually).
Text enclosed in [square brackets] indicates a build-specific variable such as a version number or user name.

Conditions.
This page was written for Ubuntu 6.06 (Dapper) and 7.04 (Feisty) and may contain content or instructions that are not relevant to other distributions. Testbed builds were freshly installed and updated on 14/10/07 which was the date of testing.
This information is provided for guidance only. Use of these instructions is deemed to be at your own risk.
R3UK Limited welcomes comment on this information but cannot guarantee a reply and provides no technical support. Please use one of the many dedicated Linux forums or IRC channels if you require assistance.
Text colours and fonts used in the formatting of this page relating to command input and output are used for illustration purposes. Actual command line colours and fonts will vary according to individual system preferences.
GUI instructions were written for the Gnome desktop environment and may differ for other desktop environments.
This page was written specifically for the Toshiba Satellite Pro 6100 model of laptop with 32MB GeForce4 420 Go graphics chipset and 1600x1200 screen. The information on this page may not be relevant to other hardware platforms.

Procedure.
I last wrote about installing Ununtu on a Toshiba Satellite Pro 6100 a year ago when I first started playing with Linux. This machine has an Nvidia GeForce4 420 Go graphics chipset and getting it working was a bugger. The Nvidia drivers just don't like this thing.

Anyway, my old guide is now out of date and has been pulled from Tech Tips. The newer versions of the Nvidia driver broke the 'fix' that I used to get it working previously so I've just had to spend the last few HOURS working out a new way to do it.

I'm going to write this as a bit of an 'idiots guide' because this is an old laptop now and anyone wanting to install Ubuntu on such a machine may just be doing so in order to have a play to find out what this Linux game is all about (as I was).

After installation, the laptop will work just fine at 1600x1200 resolution. This is because it will be using the supplied open source 'nv' driver to power the Nvidia hardware. While this is all well and good for 2D operation, you won't get any 3D shenanigans out of the nv module which means your fancy 32MB graphics card iwith it's whizzo 3D capabilities is reduced to doing what a 2MB card could have done. You'll soon notice the problem - no GL screensavers, no 3D games and even screen updates in programs like OpenOffice can look broken up (try selecting pages of text in the Spreadsheet application and you'll see your screen flickering like a strobe light!)

The solution is to install the proper Nvidia driver. If only it were that simple though. After installing the Nvidia driver you will find one or more of the following problems:

The driver thinks it detects a CRT screen on the VGA port and tries to use that in preference to the laptop screen resulting in the screen being black and appearing to be off;
The driver tries to use the wrong resolution giving 1280x1024 or 1024x768 instead of 1600x1200 which works but doesn't look pretty;
The driver can't detect any valid resolutions and you get a 'trippy' blotchy white and black fading screen;
You get a 'virtual desktop' at the correct resolution, however the physical screen has been limited to a lower resolution resulting in you scrolling around to see the four corners of your desktop.

If set up incorrectly, other problems will be a failure to start the X server altogether resulting in errors such as 'API mismatch'.

The contents of these instructions have been tested in both Dapper (6.06) and Feisty (7.04).

If you've just installed Ubuntu, you'll find some of the repositories are not available for use. You'll need to open them up in order to get access to some of the required packages. Assuming you've logged into Gnome (using the default nv video driver), open Applications / Accessories / Terminal and use the following command to edit your sources list:

sudo nano /etc/apt/sources.list

Remove the hash '#' from the beginning of all the named repositories, for example change:
# deb http://gb.archive.ubuntu.com/ubuntu
to:
deb http://gb.archive.ubuntu.com/ubuntu

...obviously if you're not in the UK your repositories may be named differently. Press CTRL-O to save changes and CTRL-X to exit from Nano. Now enter the following command to check for updates:

sudo apt-get update ... or use System/Administration/Update Manager to check for and apply outstanding updates.

The following packages need to be installed, either through Update Manager or by using sudo apt-get install [package name]
You can check to see if any are already installed on your system with the command dpkg-query -l | grep [name]

build-essential
linux-restricted-modules-[arcitecture] (686 for Pentium/Celeron machines)
linux-headers-[arcitecture] (686 for Pentium/Celeron machines)
ghex (a Hex editor for Gnome - others are available if you prefer and I've also used khexedit under Gnome which works well).

Before you log out of Gnome, download the Nvidia driver from www.nvidia.com/object/unix.html . You'll have to check which driver is the correct one for your GPU and architecture. In the case of the GeForce4 440 Go on my Toshiba, it is the Legacy IA32 1.0.96xx driver and at the time of writing, version 96.43.01 is the current version. I'm going to download this to my Desktop for the sake of this guide.

Okay, we're ready to install the new driver. We can't install it while the old driver is in use though so click the exit button and log out of Gnome. When back at the login screen, press CTRL-ALT-F1 for a command login. Log in to the command line with your username and password.

The Gnome Display Manager is still running in the background (press CTRL-ALT-F7 if you want to return to the graphical login), but we need to stop it, so from the command line enter sudo /etc/init.d/gdm stop

Now go to where your downloaded driver file lives (the Desktop in my case):
cd /home/[username]/Desktop

Start the installer:
sudo sh NVIDIA-Linux-[version]-pkg1.run

The installer will prompt you for a few things. Answer as below:
Accept the licence agreement;
Say No when prompted to check for a kernel interface to download;
Hit OK when informed the installer will need to compile a new kernel interface;
Allow the installer to run. If it fails, check the correct dependant packages are installed. If not, install them and try again. Use 'nano /var/log/nvidia-installer.log' to check the installation logs for problems.
Assuming all went well, answer Yes to allowing the installer to run nvidia-xconfig. Installation should now be complete.

The installer will have made changes to /etc/X11/xorg.conf. The main change is that the driver will now read 'nvidia' instead of the open source 'nv' driver. You can edit xorg.conf and put the 'nv' driver back into place if you really get stuck with getting the nvidia driver to work. The installer has also backed up the old xorg.conf file and this can be found under /etc/X11 as xorg.conf.backup should it be required.

You can try the new driver by entering sudo /etc/init.d/gdm start however on my machine I just get a horrible black and white blotchy screen. This is what we need to fix before continuing. If your screen is corrupted like mine, use CTRL-ALT-F1 to return to the command line and use sudo /etc/init.d/gdm stop to kill the display manager. Take a look at /var/log/Xorg.0.log to see if you can spot what the problems are. In my case I have the following line of interest:
(II) NVIDIA(0): Assigned Display Device: CRT-0
..indicating a non-existent external monitor is being assigned by default instead of the laptop LCD (which has the designation 'DFP-0')

To correct this, enter sudo nano /etc/X11/xorg.conf and add the following line to the Device section:
Option "UseDisplayDevice" "DFP-0"
A similar command (with the same effect) is: 'Option "IgnoreDisplayDevices" "CRT-0"' although the NVIDIA readme recommends using the former. While in xorg.conf, scroll to the Screen section and set the DefaultDepth to 24 if it isn't set already. Save and exit when editing is complete.

So we don't have an API mismatch error when we reboot the laptop, enter the following command:
sudo nano /etc/default/linux-restricted-modules-common
and change the line that reads "DISABLED MODULES="" to read DISABLED MODULES="nv"
Save changes and quit Nano (CTRL-O, CTRL-X).

Now issue a sudo reboot command to restart the computer. If all is well you should get an NVIDIA logo splashscreen and a graphical login prompt. The resolution won't be correct though (1024x768 in my case and not the 1600x1200 I want). If you don't get a graphical login, check the Xorg.0.log to see what reason is given. Different laptops, drivers and chipsets may yield different results. As I'm writing this about my specific laptop I will continue with my observations.

Here's where it gets really interesting. The reason I don't have my 1600x1200 resolution is because of my pesky EDIDs. This stands for Extended Display Identification Data and is a mechanism for a display to provide information to a graphics card on what it's capabilities are (size, refresh rate, etc.) More info on EDIDs can be found on Wikipedia here. In my case, the graphics card and the screen aren't on the same wavelength (so to speak) so my GeForce thinks my screen isn't capable of 1600x1200 resolution and refuses to allow it even though that resolution is specified in xorg.conf. There are numerous options to add to Xorg to ignore EDIDs, ignore EDID DPI's, ignore EDID frequencies, ignore EDID modes, set specific modelines - they're all in the Nvidia Readme and none of them worked for me. The only answer I could find was to edit the EDID settings themselves with a hex editor. To do this, log into Gnome. Press Alt-F2 for a Run box and enter nvidia-settings which should launch the Nvidia X Server Settings application.

 

xserver-settings1.jpg

 

Click on DFP-0 (or whatever your screen is called) and click the Acquire EDID button. Save your EDID file to your Desktop and call it EDID-current.bin (or something).

Quit Nvidia-settings and open another Run box. Type ghex2 to open your hex editor (if it was ghex you installed earlier). From within the hex editor, open the EDID-current.bin file you saved.

 

edidold1.jpg

 

The hex pairs represent various settings to do with the graphics configuration. Contained within is information such as screen size and frequency as well as detail like serial number and manufacturer. Here's an example - bytes 16 and 17 represent week and year of manufacture respectively with year 00 being 1990. Counting along the top line and calling the left most byte 'zero', we can see that byte sixteen is 2D and byte 17 is 0C. These are hex numbers so convert them to decimal and you get 45 and 12. The 45 indicates manufacture in week 45 (November) while the year is represented as 1990 plus 12 - i.e. 2002. I can therefore see that my chipset was manufactured at the end of 2002. Another example are the 20 and 18 hex pairs five columns from the left and one down. In decimal these convert to 32 and 24 and represent the physical screen size, horizontally and vertically in centimeters. I'm interested in byte 56 however - The 'Horizontal Active' value (in pixels). Mine is listed as 34 hex which converts to 52 decimal. This value is wrong!

To work out the correct number, take the desired horizontal setting in pixels (1600 in my case) and convert to hex. This gives me the number 640. Take the last two digits (40) and replace the value in byte 56 with these digits.

 

edidnew1.jpg


Use File/Save As to save the modified EDID file. Plonk it somewhere safe where it won't be deleted. I saved mine as edidnew.bin onto the desktop and then placed it in /etc/X11 so it would sit with xorg.conf. You might not have permission to copy the file over from Gnome but from a terminal just issue the command:
sudo cp /home/[username]/Desktop/edidnew.bin /etc/X11/

Now log back out of Gnome and use CTRL-ALT-F1 to get to a command login. Log into the computer and open xorg.conf for editing with sudo nano /etc/X11/xorg.conf

In the Screen section enter the following line (assuming your edited EDID file is in the same path as mine):
Option "CustomEDID" "DFP-0:/etc/X11/edidnew.bin"

Save your changes and exit Nano.

Restart Gnome with sudo /etc/init.d/gdm restart

 

Hey presto! 1600x1200 ! Log in and try out some OpenGL screensavers or some 3D gaming!

 

successres.jpg


Useful Commands:
The following commands may come in helpful for faultfinding with a graphics issue - I know I found them helpful while researching the above.You'll need sudo in front of most of them...

 

dpkg-query -l | grep [name] Check for installation of a named package
dpkg-reconfigure -phigh xserver-xorg Creates a new xorg file based on settings you enter
dpkg-reconfigure xserver-xorg As above but with more options available
sh [package] --uninstall If you need to uninstall a driver you previouslly installed
gtf [hresolution] [vresolution] [refresh] -x For generating Modelines to set specific monitor modes in xorg

Useful Links:
Nvidia Linux drivers download page
xconfig options page
EDID information on Wikipedia
My procedure for this same operation in Ubuntu 7.10 (Gutsy)

Did the information on this page help you? If so, please help to fund this site by clicking one of our sponsored ads...