Last Review: 2015-June-12

Replacing a graphics card on Debian based Linux

2015 June

As I had to learn, replacing a personal computer video card can end up into some surprises. Most unconvenient is an uncomplete boot procedure leaving you with "useless" screen messages. So here is my report on replacing an NVIDIA G98 card (chip Geforce 8400 GS Rev 2) with an AMD/ATI Oland XT card (chip Radeon HD 8670 / R7 250, the product was sold as R7 250 Radeon Graphics Card). I will not describe the hardware aspects of this action since it seems reasonable, that someone buying a PCIe slot card knows how to handle these hardware items. This report is divided into three parts:

1) Drivers
2) Device Names
3) Tools

1) Drivers

Well, this is the last status message I got when booting after the mentioned hardware replacement (If you suppress startup messages, you can look at them [in recovery mode] with the dmesg command):

IPv6: ADDRCONF (NETDEV_UP): virbr0: link is not ready

Booting into my desktop stopped at this point, the only thing I could do was a reboot with with the well known key combination <Ctrl>+<Alt>+<Del> into recovery mode.

Since my system stopped with a message concerning IPv6, a network protocol name, and virbr0 the name of an virtual network device, I first thought there may have occured a network problem. But why and how, if I didn't change anything else then the graphics adapter? The dmesg messages show, that at startup a whole bunch of things is done so to say at one time (?parallel tasks), maybe I've got already status messages from other tasks while the graphics card driver was on his way getting finally screwed up... I decided to have a look at the linux way of installing drivers, which means find out, what configurations file has to be touched. The file responsible for graphics card drivers configuration is /etc/X11/xorg.conf, the free driver needed for the Radeon chip is called radeon. An edit replacing the old driver name with the new one will do the job (In the example below the old entry is turned into a comment, so I could easyly change back using Geforce chip based graphics hardware by shifting the comment character only.):

Section "Device"
  Identifier "Device0"
# Driver "nouveau"
  Driver "radeon"

The next reboot ended with my usual graphical desktop and another surprise: Although my new graphics card is more powerful than the old one, it was unable to produce always a proper character output: Every now and then I got funny artefacts in a not predictable way, as shown in this example:

radeon artefacts

This looks like an issue with the OSS driver, so I had to seek alternatives. The next picture shows the results for searching the repositories for (non-free) radeon drivers with the apt-cache search radeon command:

results searching for non-free radeon drivers

Obviously fglrx-driver is the appropriate one and fglrx-control a useful tool for it. The command line interface (CLI) offers the fastest way to install these packages:

sudo apt-get install fglrx-driver fglrx-control

The driver has to be inserted in the xorg.conf file, which can be done with the supplied software itself using the CLI likewise:

sudo aticonfig --initial

And now BINGO: No more character artefacts!

2) Device Names

Against expectation different device drivers use different device names for the same monitor hardware. Look at this example for my dual head installation:

DriverName for device 0Name for device 1

When replacing the graphics card driver this can result in several configuration losses namely the panel configuration (you won't see any panels) and multimonitor configuration (all monitors showing the whole desktop instead of desktop parts) since the configuration entries will hold wrong device names.

Be sure to find and change all corresponding configuration files concerning these items. For Xfce4 panels for example this is done like this:

First find the device names of your hardwares by typing the xrandr command into a CLI window (continuous lines are indicated by same color values, device names are displayed in red color).

Screen 0: minimum 320 x 200, current 1680 x 1050, maximum 16384 x 16384
DFP1disconnected (normal left inverted right x axis y axis)
DFP2connected primary 1680x1050+0+0 (normal left inverted right x axis y axis) 474mm x 296mm

Then edit the file ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml The panels are numbered starting from 0 and for each of them exists a section head. For the first panel this is <property name="panel-0" type="empty">. Find this section title for every of your panels and then perform the below shown device name replacement within the following lines, to enable the panels again:

<property name="output-name" type="string" value="DFP1"/>

3) Tools

Unfortunately tools cooperating seamlessly with OSS drivers don't do so with non-free drivers. Thus after replacing my old graphics card, which was driven by the OSS nouveau driver, I was no longer able to monitor the graphics adapter temperature with my usual tools (lm-sensors and frontends to it). However there is a solution using the non-free driver in a CLI window:

aticonfig --adapter=0 --od-gettemperature