How to install ATI proprietary graphics driver (fglrx) on Debian

I've fought my 5874th battle with ATI graphic card driver in Debian and I really have to finally write down some notes for myself for the next time. (Although better solution would be to finally buy NVidia).

The main problem with fglrx package is that installing it is only ONE PART of the process. If you want to have 3d acceleration, you'll need to build a kernel module. It's not that difficult, but if you don't even know about it, your desktop may become insanely slow during any regular system upgrade. Funny thing is that googling the symptoms of the problem ("failed to load module dri" in /var/log/Xorg.0.log) won't bring you even close to the solution. The important lines, that actually build the modules, are:

$ module-assistant prepare
$ module-assistant update
$ module-assistant a-i fglrx

(Are the guys at Debian wiki really thinking that 3d is so unnecessary that it deserves only a footnote without any specific instructions?)

Last update