How to compile TV output into the latest X.org ati drivers on Ubuntu
Posted by matijs 21/06/2007 at 12h58
The Problem
You have built a home server slash PVR that you want to hook up to your twenty-year-old television. You have gone to several shops to buy a graphics card that actually has open-source drivers for its TV output functionality (i.e., the ATI Radeon A9250). You have dodged salesmen trying to sell you something else (“No, but here is its successor the NVidia so-and-so.” “Uhm, no thanks.”). You finally succeeded by ordering it over the Interweb (and probably should have done that in the first place). Now you want to patch the driver shipped by Ubuntu to actually get TV output working.
The Solution
You will need a patch based on the TV output module from the GATOS
project. You can get the
latest-but-not-late-enough patch from
megahurts.dk. Before proceeding,
edit the patch, removing the patches for Makefile.in
. Later in the
process, you’ll have to deal with some rejected patches. Alternatively, you
can download a cleaned-up
version for driver version 6.6.3.
[Update Nov 13, 2007: The TV output module has been sort-of incorporated into the X.org driver, and Ubuntu Gutsy ships that. The problem is, it does not yet automatically detect that you have a TV hooked up, so you need another monitor to let X start without erroring out and to type in some xrandr commands. Not ideal. You can however just recompile the driver-plus-patch from Feisty and it will work fine.]
Get the sources for the ati driver (currently, version 6.6.3):
apt-get source xserver-xorg-video-ati
Install the build dependencies. I always just consult the debian/control
file, but you should be able to just go:
sudo apt-get build-dep xserver-xorg-video-ati
[Update Dec 26, 2007: You also need autoconf
and libtool
:
sudo apt-get install autoconf libtool
They are needed for the autoreconf
step later in the process.]
Change into the directory just created:
cd xserver-xorg-video-ati-6.6.3
Prepare the quilt patch system:
fakeroot ./debian/rules prepare
Copy the patch into the patches directory:
cp /path/to/the/patch patches/200_tv_output.diff
Append the line
200_tv_output.diff
to the file patches/series
.
Apply all the patches:
fakeroot ./debian/rules patch
At this point, if you’re using the original patch, it will not have applied
cleanly. Run quilt push -f
to force it to be applied. After fixing the
rejections, run quilt refresh
to make a new patch. You may also have to
run quilt refresh
if you’re patching a different version of the driver
and the line numbers have changed.
Next, reconfigure, clean, build:
fakeroot ./debian/rules autoreconf
fakeroot ./debian/rules clean
fakeroot ./debian/rules binary
And of course, install the resulting package. All done.