Note for English Readers

If I write the articles in Indonesian, I will write a summary in English so that you can read my articles too. After you read the summary and you feel that you need more information about that, please do not hesitate to contact me via e-mail that can be found in my profile.

Thank you for reading my blogs.

Thursday, March 7, 2013

AMD Catalyst Patch for Kernel 3.8.x

Kernel 3.7.x is EOL now, replaced by 3.8.x as the latest stable kernel version. Because of this, I upgraded the kernel running on my laptop to 3.8.x (on the day I wrote this post, the newest version is 3.8.2). Of course, upgrading the kernel means recompiling the fglrx module. It means, this module need to be re-patched so that can work on kernel-3.8.x. As usual, I searched the patch from Arch Linux then used the information on that site to patch the fglrx module. You can download the complete patch from my Google Drive. Using this patch file, you can patch the fglrx module (by installing AMD Catalyst 13.1 first) as below (in case of using kernel-3.8.2. Just edit the number "3.8.2" for other kernel version):
  • change directory to the path where the installer is
  • run the installer as root (superuser): 
  • # ./amd-driver-installer-catalyst-13.1-linux-x86.x86_64.run
  • follow the instructions, at the end of installation process you will get notice that there are some errors.
  • exit the installer
  • at console, copy the patch file (fglrx-3.8.patch) to /lib/modules/fglrx/build_mod/
  • (optional, if you don't find version.h in /lib/modules/3.8.2/build/include/linux) Make symlink of version.h
  • # ln -s /lib/modules/3.8.2/build/include/generated/uapi/linux/version.h /lib/modules/3.8.2/build/include/linux/version.h
  • change directory to /lib/modules/fglrx/build_mod/
  • patch the fglrx source:
  • # patch -p0 < fglrx-3.8.patch
  • compile the fglrx modules:
  • # ./make.sh
    # cd ..
    # ./make_install.sh

  • reboot.
Enjoy your AMD Catalyst-13.1 running on linux kernel 3.8.x.

14 comments:

rishi said...

Thank You Henry.
You are a genius.
Most radeon card users and especially
laptops suffer from blank screens and etc problems with graphics on Linux.
Your solution and fglrx patch is the ONLY solution.

Thank You Once again.
Good luck in your endeavours..

rishi said...

forgot to mention..works beautifully with catalyst 13.1/13.2 beta 7 with kernel 3.7.6

DecoX said...

For me the folder "/lib/modules/fglrx" is never created ;-(

Fanfurlio Farolfi said...

Sorry to bother you, do you have any idea about what I'm missing?

Errors in make just after applying the patch.


AMD kernel module generator version 2.1
./make.sh: line 390: [: =: unary operator expected
doing Makefile based build for kernel 2.6.x and higher
rm -rf *.c *.h *.o *.ko *.a .??* *.symvers
make -C /lib/modules/3.8.4-smp/build SUBDIRS=/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: Entering directory `/usr/src/linux-3.8.4'
CC [M] /lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function 'KCL_MEM_AllocLinearAddrInterval':
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:2152:5: error: implicit declaration of function 'do_mmap' [-Werror=implicit-function-declaration]
vaddr = (void *) do_mmap(file, 0, len, prot, flags, pgoff);
^
cc1: some warnings being treated as errors
make[2]: *** [/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o] Error 1
make[1]: *** [_module_/lib/modules/fglrx/build_mod/2.6.x] Error 2
make[1]: Leaving directory `/usr/src/linux-3.8.4'
make: *** [kmod_build] Error 2
build failed with return value 2



The patch modified 2 files, firegl_public.c and kcl_acpi.c

Anonymous said...

Believe it or not, but I am using the same patch on the 3.8.10 kernel using amd-3.1 driver. Seems to be working fine - so far!!

Anonymous said...

Hi, I've got error while compiling modules: http://pastebin.com/M2b9SXWH

Slackware x64 current, kernel 3.8.13

The Kropper said...

It removed that folder for me as well. Found a workaround:

cd path_to_installer_file
./amd-driver-installer-catalyst-13.1-linux-x86.x86_64.run --extract amd
pushd amd/common/lib/modules/fglrx/build_mod/
patch -p0 < path_to_patch_file/fglrx-3.8.patch
popd
cd amd
sudo ./ati-installer.sh 9.012 --install

Unknown said...

Sorry for my very lately reply because of my heavy-load works. For all of you, you can try catalyst-13.4 for kernel 3.8.x & 3.9.x. It should have no problem at all for compiling the fglrx module.

Anonymous said...

Thanks! worked like a charm after The Kropper's workaround.

Anonymous said...

http://paste.fedoraproject.org/31199/12300113

gpr.ppg.br said...

I am trying to install ubuntu studio with kernel 3.8.0 13:04
and amd 4200, but I can not.
I'm from Brazil.
gpr.ppg.br

Unknown said...

Thanks a lot!!!

Anonymous said...

Hi henry is there any chance to get my HD 3200 to work under ubuntu 12.04 kernel 3.8 ? New drivers from ati doesent support anymore my model

Regards

Unknown said...

Great work,

can I use this method in OpenSuse 13.1? I`m using AMD Catalyst 13.1 legacy to run my HD 4650 Mobility in OpenSuse 12.1. But I would like to upgrade to 13.1.

Best regards