tjl2.com

A place to store useful stuff

Has anything here been really useful?


 

[UBUNTU 5.10] Installing nVidia drivers & configuring 1280x800 screen resolution

WARNING: Incorrect ModeLine values in your xorg.conf can break your display! Do not use the ModeLine value shown below unless you are configuring the display on an Acer Aspire 1522WLMi notebook!

When I initially installed Ubuntu on my laptop, the standard xorg nv driver configured the laptop's widescreen 1280x800 resolution correctly. Unfortunately, the nv driver's performance isn't too good at getting the full performance out of this laptop's G-Force FX graphics chip when compared to the official nVidia driver. While installing the official nVidia driver is trivial enough on Ubuntu, it isn't so easy to get the resolution past 1024x768 using the standard Gnome screen resolution preferences tool. Follow the instructions below to setup the widescreen resolution with nVidia's official G-Force FX driver.

First off, the nVidia driver needs to be installed and enabled. The nvidia-glx package is available in Ubuntu's restricted package repositories, so you first need to ensure you have all extra repositories selected.

Adding universe and multiverse repositories:

  • For a nice walkthrough of how to do this graphically via synaptic, see the official Ubuntu help page.
  • Alternatively, to do this quickly via the command line, just follow these steps:
    • Edit your /etc/apt/sources.list using your favourite editor (vi, emacs, gedit) via sudo:

      sudo gedit /etc/apt/sources.list

      Make sure you have the following lines (these are UK-specific mirrors, you should change the URIs to something closer to you if necessary):

      deb-src http://gb.archive.ubuntu.com/ubuntu breezy main restricted
      deb http://gb.archive.ubuntu.com/ubuntu breezy-updates main restricted universe multiverse
      deb-src http://gb.archive.ubuntu.com/ubuntu breezy-updates main restricted
      deb http://gb.archive.ubuntu.com/ubuntu breezy universe main restricted multiverse
      deb-src http://gb.archive.ubuntu.com/ubuntu breezy universe


    • Once you have saved the changes to your sources.list file, update your apt database:

      sudo apt-get update

Installing the kernel module:

  • Now install the nvidia-glx kernel module package:

    sudo apt-get install nvidia-glx

  • You then need to issue a command to make sure that this new kernel module is used by xorg when it loads:

    sudo nvidia-glx-config enable

  • Normally, after doing this, you could then restart the X server (CTRL + ALT + Backspace) to start using the nVidia driver straight away. However, we need to do a little tweaking before the driver will set up the Acer widescreen display properly. Using your favourite editor, edit the xorg.conf file:

    sudo gedit /etc/X11/xorg.conf

    Within this file, find the Monitor configuration section (search for 'Section "Monitor"'). You should see a 'ModeLine' setting listed here. To get the resolution to work at 1280x800, this ModeLine needs to be changed to the following:

    ModeLine    "1280x800@60" 68.9 1280 1304 1336 1408 800 804 808 816

  • The Monitor section of my xorg.conf looks like this:
    Section "Monitor"
            Identifier      "Generic Monitor"
            Option          "DPMS"
            HorizSync       28-64
            VertRefresh     43-60
            ModeLine        "1280x800@60" 68.9 1280 1304 1336 1408 800 804 808 816
    EndSection
    
  • After saving your changes to the xorg.conf file, restart the X server by pressing CTRL+ALT+Backspace. When the server restarts, you should find that your screen resolution is now set to its proper 1280x800 resoloution and your graphics performance will be much improved.

top