jump to navigation

nVIDIA 8800 on Debian June 21, 2008

Posted by idebian in Debian, GNU/Linux, Hardware.
Tags:
trackback

Hi everybody,
The recipe for today is how to properly install and configure nVIDIA driver for my iMac’s 8800GT (G92) on 64 bit Debian Linux 5.0 (lenny).

Even if the driver installation will follow the Debian way, specifically the simplest method with module-assistant, I wish the concepts illustrated here might be useful also for the other Linux distributions: you all guys are more than welcome :)

An overview

The Linux nVIDIA driver is composed by a kernel module (which has to be matched to your kernel) and the user space GLX libraries. These components are generally distributed with two packages:

  • nvidia-kernel-<$(uname -r)>
  • nvidia-glx

As reported in [1], so far in lenny there are no official nvidia packages due to:

lack of maintenance, a Linux bug and X server 1.4′s ABI change.

In the meantime this will be fixed, we need to handle a testing/unstable mix to install the nvidia packages from the unstable distribution.
The installation process will go through the following steps:

  1. Pre-requisites
  2. Kernel module compilation and installation
  3. User-space library installation
  4. X configuration
  5. Verification

Pre-requisistes

APT sources

First of all we need to have a properly configured apt’s sources.list. Open a terminal and type:

$ more /etc/apt/sources.list

Verify that the contrib and non-free archives are included.

deb http://ftp.it.debian.org/debian/ testing main contrib non-free
deb http://security.debian.org/ testing/updates main contrib non-free
deb http://www.debian-multimedia.org/ testing main

Module-assistant packages

Make sure we have installed the module-assistant and the kernel headers to compile the nvidia kernel module. Open a terminal and type:

$ apt-get install module-assistant

It will also take in your kernel headers (I previously installed them since I'm running a 2.6.25-2-amd64 from unstable, see here).

Kernel module

Install the nvidia-kernel-common package:

sudo apt-get install nvidia-kernel-common

We are now going to download the kernel module source and compile it with the module-assistant utility (very easy to do ;) ).

Download and install the latest nvidia-kernel-source deb package from the unstable repositories, in my case:

$ wget -c http://ftp.it.debian.org/debian/pool/non-free/n/nvidia-graphics-drivers/nvidia-kernel-source_173.14.09-2_amd64.deb
$ sudo dpkg -i nvidia-kernel-source_173.14.09-2_amd64.deb
$ sudo apt-get -f install

where the last step is just a quick way to satisfy the missing dependencies of the manually downloaded packages.

To compile the kernel module just execute:

$ cd /usr/src/
$ tar xjf nvidia-kernel.tar.bz2
$ m-a update
$ m-a prepare
$ m-a auto-install nvidia

If everything goes through we should have a nvidia-kernel-module package installed. Let's verify that with:

$ dpkg -l | grep nvidia
ii nvidia-kernel-2.6.25-2-amd64 173.14.09-2+2.6.25-5 ...
ii nvidia-kernel-common 20051028+1-0.1 ...
ii nvidia-kernel-source 173.14.09-2 ...

There should a NVIDIA binary kernel module for your running kernel, which is nvidia-kernel-2.6.25-2-amd64 in my case.

User space GLX libraries

This is the easiest part, just type:

$ wget -c http://ftp.it.debian.org/debian/pool/non-free/n/nvidia-graphics-drivers/nvidia-glx_173.14.09-2_amd64.deb
$ sudo dpkg -i nvidia-glx_173.14.09-2_amd64.deb
$ sudo apt-get -f install

X configuration

The X server configuration is done modifying the /etc/X11/xorg.conf file.
This could be easly and automatically done by the nvidia-xconfig utility.

Since I'm a little bit maniac about configuration files, I'm going to manually modify the Xorg configuration file by adding to the Device Section the line:

Driver "nvidia"

Restart the X server, either by logging out or with:

$ sudo invoke-rc.d gdm restart

You should see the nVIDIA logo at the restarting if everything went through.

The following sections are more specific for my 24" iMac configuration.

XaaNoOffscreenPixmaps

As reported here lenny will have the option XaaNoOffscreenPixmaps by default. This is supposed to:

[...] helps Compiz and seems to prevent various rendering problems from happening.

I added such option in the xorg.conf Device Section:

Option "XaaNoOffscreenPixmaps"

Dynamic Twin View

Since there is an issue with DynamicTwinView feature that fake xrandr reported frequency and since I don't need DynamicTwinView :D I just disabled it by adding in the xorg.conf Device Section:

Option "DynamicTwinView" "False"

DPI settings

Since the default EDID monitor data triggers a wrong DPI value I added the display size information to the xorg.conf Monitor Section:

DisplaySize 508 319
Option "UseEdidDpi" "False"

The second line is necessary to ignore EDID values.

Verification

Let's verify that everything is working correctly.

3D Rendering

Install the mesa-utils package and verify that glxinfo reports direct rendering:

$ glxinfo | grep render
direct rendering: Yes
OpenGL renderer string: GeForce 8800 GS/PCI/SSE2
GL_NV_depth_buffer_float, GL_NV_conditional_render, GL_NV_depth_clamp,
GL_NV_vertex_program3, GL_NVX_conditional_render, GL_SGIS_generate_mipmap,

Monitor resolution

Verify that you are running the native LCD panel resolution at the correct frequency:

$ xrandr
Screen 0: minimum 320 x 240, current 1920 x 1200, maximum 1920 x 1200
default connected 1920x1200+0+0 0mm x 0mm
1920x1200 60.0*
...

DPI info

$ xdpyinfo | grep -B1 resolution
dimensions: 1920x1200 pixels (508x318 millimeters)
resolution: 96x96 dots per inch

nvidia-settings

Some fancy output is available through the nvidia-settings tools included in lenny.

nvidia-settings output

Driver upgrade

Once nVIDIA driver will be distributed with lenny there will be no need to upgrade drivers manually: all the process will be automatically managed with apt. In the meantime upgrading the driver is as easy repeat the steps:

Kernel module

$ wget -c http://ftp.it.debian.org/debian/pool/non-free/n/nvidia-graphics-drivers/nvidia-kernel-source_version-revision_amd64.deb
$ sudo dpkg -i nvidia-kernel-source_version-revision_amd64.deb
$ cd /usr/src/
$ tar xjf nvidia-kernel.tar.bz2
$ m-a update
$ m-a auto-install nvidia

GLX libraries

$ wget -c http://ftp.it.debian.org/debian/pool/non-free/n/nvidia-graphics-drivers/nvidia-glx_<version-revision>_amd64.deb
$ sudo dpkg -i nvidia-glx_<version-revision>_amd64.deb

Reboot

Open issues

Blank virtual console

So far I'm experiencing an annoying bug which makes my virtual terminal completely blank. Even if I am not using high resolution frame buffer console (which might cause such a problem), once gdm is started if I switch back to the virtual terminal (with CTRL+ALT+Fn) I get a blank, nevertheless functional, console.

I'm still digint into it ... I'll let you know ;)

XvMC

I've just discovered here that XvMC is not supported on 8x00 series. Despite that is seems that mplayer with the default Xv output make a good job ;)

References

  1. Nvidia Graphics Drivers on Debian Wiki
About these ads

Comments»

1. Catalin - June 23, 2008

Hi !
Verry good tutorial !
I have a question …
How make smaller fonts on boot , the message will see with dmesg ?
Thank you !

2. idebian - June 23, 2008

If you mean using higher resolution on virtual console, use the option vga=791 (1024×768) in your bootloader option file.

In grub just add vga=791 at the end of your default kernel line within the file /boot/menu.lst.

3. Cassiano Leal - July 18, 2008

even better put

GRUB_CMDLINE_LINUX=vga=795 (or 791, or whatever)

in your /etc/default/grub. then,

$ sudo update-grub
$ sudo grub-install /dev/sda (or whatever disk/partition your GRUB is installed on)

This will make sure that this setting will persist when upgrading kernel or doing other maintenance tasks.

4. idebian - July 23, 2008

Yes,
but remember that this is for GRUB2 only!

Ciao

5. absintos - August 1, 2008

Ciao,

any success with the blank virtual console problem ?

It is really annoying me

6. idebian - August 4, 2008

sadly not …
I agree it’s weird and annoying; if we fix this we could have a huge 1920×1200 console :)
I’ll let you know as soon I figured out what’s going on there.

Ciao


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: