How to compile TV output into the latest X.org ati drivers on Ubuntu
Posted by matijs
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 stap 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.

drug.komesar@gmail.com said 6 months later:
Hi…
I done everything just like you said to the part “cp /path/to/the/patch patches/200_tv_output.diff”.
I can’t find “200_tv_output.diff”, and like i said, everything went without problems till that part?!
Could you help me now?
Thnak you
Matijs said 6 months later:
To help you, I need to know exactly what you typed, and exactly what the response was. Otherwise, I’m just guessing, like so:
Did you replace
/path/to/the/patchwith the actual path to the patch?drug.komesar@gmail.com said 6 months later:
Ok, this is what i done, and what to do now? Where is that file 200_tv_output.diff. i can’t find it?!:
Matijs said 6 months later:
Did you actually download the patch like it said in the first paragraph of the solution?
drug.komesar@gmail.com said 6 months later:
Yes, i download xorg7-6.6.3-tv_output.patch but that is problem. Where to copy it? I download it on Desktop and after that i done that what you see in the list.
Matijs said 6 months later:
Ah, I see. Well, you need to copy the downloaded patch to the
patchesdirectory and name it200_tv_output.diff.Starting from the point where you left off in your comment, you would probably need to type:
drug.komesar@gmail.com said 6 months later:
Ok, i done it and now, that pach is in the folder patches:
What next, i don’t get your manual quite well??
Matijs said 6 months later:
Just use your favorite text editor to edit the file
patches/series, and add the lineat the end.
Can you tell me why this was not clear? And also for the earlier step of copying the patch?
drug.komesar@gmail.com said 6 months later:
I done all you said, and when I done: fakeroot ./debian/rules autoreconf
I get:
Matijs said 6 months later:
Well, Error 127 doesn’t tell me much, but let me guess, just before those lines you get:
That line should have told you you’re missing the
autoreconfcommand. You will need to:I will add the
autoconfandlibtoolrequirements in the howto.Matijs said 6 months later:
Oh, and the
autoreconfpart will fail, but it should fail with a message that says: