Difference between revisions of "Debian Nvidia Drivers on the T530"

From ThinkWiki
Jump to: navigation, search
(Oops)
(Overview)
Line 1: Line 1:
 
= Overview =
 
= Overview =
  
You can buy the Lenovo '''[[:Category:T530 | ThinkPad T530]]''' with an optional NVidia NVS 5400 graphics card.  This hardware is installed with an Intel graphics controller. The idea is that if you're running off a wall-wart, you can use the higher-performance NVidia card, but if you're on your battery you'll use the Intel card to conserve power. The X {{cmdresult|nv}} driver will supoport NVidia cards, but because NVidia won't release hardware specifications on its 3D acceleration it has no 3D support.  To exploit the NVidia hardware to its fullest potential, you must install the proprietary NVidia X drivers on your system.  With Debian Wheezy, this is relatively straightforward, so getting all this to work on a desktop is simple.  This essay will cover a (slightly crude) method of getting the same results on your {{T530}} running Debian Wheezy.
+
You can buy the Lenovo '''[[:Category:T530 | ThinkPad T530]]''' with optional NVidia NVS 5400M graphics support.  This hardware is installed in addition to an Intel graphics controller. The idea is that if you're running off a wall-wart, you can use the higher-performance NVidia card, but if you're on your battery you'll use the Intel card to conserve power. The X {{cmdresult|nv}} driver will supoport NVidia cards, but because NVidia won't release hardware specifications on its 3D acceleration it has no 3D support.  To exploit the NVidia hardware to its fullest potential, you must install the proprietary NVidia X drivers on your system.  With Debian Wheezy, this is relatively straightforward, so getting all this to work on a desktop is simple.  This essay will cover a (slightly crude) method of getting the same results on your {{T530}} running Debian Wheezy.
  
 
= First, Catch your Chicken =
 
= First, Catch your Chicken =

Revision as of 14:53, 8 June 2013

Overview

You can buy the Lenovo ThinkPad T530 with optional NVidia NVS 5400M graphics support. This hardware is installed in addition to an Intel graphics controller. The idea is that if you're running off a wall-wart, you can use the higher-performance NVidia card, but if you're on your battery you'll use the Intel card to conserve power. The X nv driver will supoport NVidia cards, but because NVidia won't release hardware specifications on its 3D acceleration it has no 3D support. To exploit the NVidia hardware to its fullest potential, you must install the proprietary NVidia X drivers on your system. With Debian Wheezy, this is relatively straightforward, so getting all this to work on a desktop is simple. This essay will cover a (slightly crude) method of getting the same results on your T530 running Debian Wheezy.

First, Catch your Chicken

The NVidia hardware is an extra-cost option on your T530. To determine if you have the card, first make sure that your BIOS is set up to enable it. Enter BIOS settings by pressing F1 immediately after turning the machine on. Then use the arrow keys to navigate to Config on the top menu and Display in the Config menu. Press Enter and look for the Graphics Device menu entry. It should currently be set to its default, NVIDIA Optimus.

If this is the case, from a terminal prompt on your Debian software you can type in $ lspci -nnn If you pipe this through grep(1), as

lspci -nnn | grep VGA

you will get two lines if the NVidia hardware is installed, as:

00.02.0 VGA compatible controller [0300]; Intel Corporation 3rd Gen Core processor Graphics Controller [8096:0166] (rev 09)

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF108 [Quadro NVS 5400M] [10de:0def] (rev a1)

Installing the proprietary NVidia driver

Since the NVidia driver is evil proprietary closed-source software, installing it on a Debian system is a little trickier than simply typing in # apt-get install. The best resource for installing this driver is the Debian Wiki page [1] You will want to follow these directions for modifying your /etc/apt/apt.sources file and installing the driver, but don't create your Xorg configuration file just yet. If you do this naively, X will fail to restart until you put that config file back the way it was shipped.

Enabling the NVidia driver

To switch to the proprietary NVidia driver on your T530, you will need to force it to use the NVidia hardware in BIOS, then load the driver in X. Now is the time to change your Xorg configuration file to enble the NVidia drivers as detailed on the Debian Wiki page. Next,reboot your computer and press F1 to enter setup, then navigate to the Graphics Device menu as explained above. Once your cursor is on the Graphics Device choice, press Space until you see "Discrete Graphics" in the window. Press F10 and say Yes to continue booting your system. When X restarts, you should see the NVidia splash screen as the proprietary video driver starts up.

The NVidia driver is significantly more power-hungry than the Intel driver, so you will probably want to use the Intel one unless you have a specific need for 3D acceleration. To switch back, you'll need to back your Xorg configuration out, then go into BIOS again and set the Graphics Device back to NVIDIA Optimus or Integrated Graphics.

On Debian Wheezy, the configuration file which forces the NVidia driver lives in /etc/X11/xorg.conf.d/20-nvidia.conf If that file is not present, the Intel driver will load. Hence, I wrote a simple shell script to live in /root which changes the configuration:

#!/bin/bash

X11_CONFDIR=/etc/X11/xorg.conf.d
NVIDIA_FILE=20-nvidia.conf

if [ ${1:-NOTHING} = "off" ]
then
   rm ${X11_CONFDIR}/${NVIDIA_FILE}
else
   cp ${X11_CONFDIR}/../${NVIDIA_FILE} ${X11_CONFDIR}
fi

This script of course assumes that you stash the NVidia X configuration file in /etc/X11.

Oops

If you screw up one of the steps switching video modes, X Windows won't start and so kdm(1) won't either. In that case you'll see a black screen with login: in the upper left hand corner. This is simple to fix, though -- just log in as root and make sure that your X configuration matches what your BIOS is saying, and X in all its WIMP (Windows Icons Mice Pointers) glory will return on your next reboot. You can also start kdm manually without rebooting with # /etc/init.d/kdm start once you've corrected your X configuration.