View Single Post
Old 05-18-09, 08:04 AM   #1
Gewitty
Registered User
 
Join Date: May 2009
Posts: 11
Default Unable to set correct resolution for GEFORCE 9400GT in Ubuntu 9.04

I have been trying to install a driver on a new PC which has a 512MB GEFORCE 9400GT PCI Express graphics card and runs the Ubuntu 9.04 64 bit OS.

The driver (I have tried several versions, up to 185.19) always appears to install correctly, whether I use the command line or Hardware Drivers utility in Ubuntu.

The problem is that after installation the display resolution is set at 800x600 4:3 instead of 1440x900 16:10. When I go into Nvidia X Server Settings, the only resolutions available in the drop-down box are 800x600 4:3 or 640x480 4:3. It also appears that the plug-and-play monitor (a 19" Edge10) is not recognised.

If I reset Xorg back to its defaults, then the system boots up with the VESA driver and the correct resolution, although the monitor is still not showing up as recognised in the Ubuntu Display settings utility.

I just ran through a command line installation of 185.19 again, using the instructions listed below, which come from a 'How To' posting on the Ubuntu Tutorials forum:

Reset Xorg back to Failsafe Defaults
Before doing anything, it's time to say goodbye to nvidia for the moment and bring back the original Xorg configuration. This is done by opening a terminal and running:
Code:

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.original
sudo dpkg-reconfigure -phigh xserver-xorg

It is not required, but you can logout and log back in again after running this. Doing so means you are now on the default VESA drivers, so Composite features (compiz) will be disabled.

Also, we won't be needing the xorg.conf.orginal file, but it serves:
1) As a backup incase you wish to reinstall the NViDIA drivers through the 'Hardware Drivers' utility.
2) As a reference for those who have specially tweaked xorg.conf files (such as dual-monitor, etc).

Installing Build Deps
Next, we need to be ensured that we have all build-essential programs and our current kernel headers.
Code:

sudo apt-get install build-essential linux-headers-`uname -r`

Ubuntu and Hardware Drivers
If you run Ubuntu and have an NViDIA card, you more than likely used the 'Hardware Drivers' utility to install them. This can lead to conflicts later down the line, as New drivers/Old drivers will cause API conflicts that will prevent X from starting.
So you are required to uninstall/remove any nvidia modules and references before beginning.
Code:

sudo apt-get --purge remove $(dpkg -l | grep nvidia | awk '{print $2}')

As an optional step, for some people who may find a conflict during installation, removing the xorg-nv drivers beforehand appears to work for them.
Code:

sudo apt-get --purge remove $(dpkg -l | grep xorg | grep nv | awk '{print $2}')

Note: doing this means that the next time you restart X, you will have a 800x600 screen resolution, so do not be alarmed.

Downloading the Drivers
Depending on your OS architechture and kernel version, you will need to get the right one for your kernel.
There have also been updates in the beta drivers which you may prefer to use instead, that support new features and fix odd bugs here or there.

For the 185.19 drivers (Recommended OS's are: Hardy, Intrepid or Jaunty or a 2.6.28 or earlier kernel):

If you are on 64bit, run:
Code:

wget ftp://download.nvidia.com/XFree86/Li...85.19-pkg2.run -O NVIDIA-Linux-185.pkg.run


For the 185.18.04 drivers (Recommended if you are on a 2.6.29 or later kernel):
If you are on a 32bit OS, run:
Code:

wget ftp://download.nvidia.com/XFree86/Li...18.04-pkg1.run -O NVIDIA-Linux-185.pkg.run

If you are on a 64bit OS, run:
Code:

wget ftp://download.nvidia.com/XFree86/Li...18.04-pkg2.run -O NVIDIA-Linux-185.pkg.run

Now, move the installer to the /usr/src folder and make a link to the file.
Code:

sudo install NVIDIA-Linux-185.pkg.run /usr/src
sudo ln -s /usr/src/NVIDIA-Linux-185.pkg.run /usr/src/nvidia-driver

The nvidia-driver symlink will be needed for later + post installation configuration.

Now, it's time to stop X and the gdm (or kdm for Kubuntu Users)
This requires that you logout and switch to another tty console ( Ctrl+Alt+F1 ).

Login to the shell, and kill gdm:
Code:

sudo /etc/init.d/gdm stop

This may take a while to complete.

In some rare instances, stopping gdm won't stop Xorg, due to the Xsession being busy with whatever error has occurred (Ubuntu goes into Low Resolution mode, X failed to start, etc).
In these instances, it is required that you run a kill of Xorg before you can continue with the installation of the driver.
Code:

sudo killall Xorg

Installing NViDIA
Afterwards, its time to install the drivers.
Code:

sudo sh /usr/src/nvidia-driver

Follow the instructions, and everything should run smoothly. A few points that I'd like to reassure first though:

* Don't worry about pre-compiled binaries, just let the script compile the drivers itself.
* If you run a 64bit OS, then let NViDIA install the 32bit backward compatibility modules.
* When asked, double check to ensure you select 'NO' when the NViDIA installer asks to reconfigure the xorg.conf file.
We don't want to change the xorg.conf file just yet, at least not until we are back in X.


Once finished, it is now time to reboot:
Code:

sudo reboot

Before you Initiate the Driver
Now, since NViDIA didn't reconfigure the xorg.conf file, you will boot into the VESA drivers. To setup the xorg.conf file for nvidia, login, open a terminal, and run:
Code:

sudo nvidia-xconfig

Note: You may see this being outputted into the console
Quote:
Using X configuration file: "/etc/X11/xorg.conf".

VALIDATION ERROR: Data incomplete in file /etc/X11/xorg.conf.
Device section "Configured Video Device" must have a Driver
line.

Backed up file '/etc/X11/xorg.conf' as '/etc/X11/xorg.conf.backup'
New X configuration file written to '/etc/X11/xorg.conf'
Ubuntu uses an automagically configured xorg.conf file, and nvidia-xconfig flags it only as a parser warning, and serves only as a warning. This does not affect the outputted xorg.conf file generated by the nvidia script, and you blissfully ignore it.

Now, not everyone may experience a smooth transition, and there are a number of small problems that you may run into that need addressing first. The most common one being a non-existent module listed in the xorg.conf file.

And if you have had a successful transition, and everything works. The first thing you'll notice is a nice new NViDIA splash logo that you probably want to be removed too.

So I recommend - as a failsafe - that you patch the xorg.conf file as so:
Code:

sudo sed -i '/^\s*Load\s*"type1"\s*$/d' /etc/X11/xorg.conf
sudo sed -i '/^\s*Load\s*"freetype"\s*$/d' /etc/X11/xorg.conf
sudo sed -i '/Driver\s*.nvidia./a\ Option "NoLogo" "True"' /etc/X11/xorg.conf

Restart X
And that is it! To reload into your new nvidia drivers, close all running applications and logout/login again. Or press Ctrl+Alt+Backspace.


I have also attached a copy of the nvidia-bug-report.log, which was created immediately after I did the last install of 185.19.

So, in summary, I can get the driver installed and working (screen effects such as Compiz are active), but screen resolution goes no higher than 800x600 4:3, OR I can have a correct screen resolution of 1440x900 16:10, but with no Nvidia driver working (VESA only).

I have also tried making a manual change to the resolution settings in Xorg.conf, but this has no effect either.

Can anyone suggest what may be causing the problem and how it might be fixed?
Attached Files
File Type: gz nvidia-bug-report.log.gz (42.9 KB, 141 views)

Last edited by Gewitty; 05-22-09 at 05:00 AM. Reason: Problem unresolved
Gewitty is offline   Reply With Quote