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, June 14, 2012

AMD Catalyst-12.6 Beta and xorg-server-1.12.1

After I postponed for more than a month because of incompatibility issue between xorg-server-1.12.1 and the latest AMD Catalyst driver (that is, 12.4), finally, I can use xorg-server-1.12.1 "normally" with the beta version of AMD Catalyst driver, that is, AMD Catalyst-12.6 Beta. I have tested this combination for two days and there is no problem so far. However, since the driver is beta version, there is such kind of logo at the bottom right of the display that give notice that the driver is for testing use only. As for me, it is OK since I believe that AMD will release the official release version soon.

AMD Catalyst Patch for kernel-3.4.x

After the kernel-3.3.x has been terminated (EOL), I decided to move to kernel-3.4.x. Unfortunately, this moving was not so easy since fglrx module could not be compiled for the kernel-3.4.x, in other words, this module needs to be patched. Referring to two references that I have written below, I have got the patch and have successfully patched fglrx module of AMD Catalyst-12.4 and AMD Catalyst-12.6Beta. You can download the patch from this link or just copy-paste a few lines below to your favorite text editor and saving it to a file:

--- lib/modules/fglrx/build_mod/firegl_public.c
+++ lib/modules/fglrx/build_mod/firegl_public.c.new
@@ -4181,7 +4184,11 @@ static int kasInitExecutionLevels(unsigned long level_init)
 {
     unsigned int p;
     KCL_DEBUG5(FN_FIREGL_KAS, "%d\n", level_init);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
+    for_each_possible_cpu(p)
+#else
     for_each_cpu_mask(p, cpu_possible_map)
+#endif
     {
         KCL_DEBUG1(FN_FIREGL_KAS,"Setting initial execution level for CPU # %d\n", p);
         preempt_disable();

--- lib/modules/fglrx/build_mod/kcl_ioctl.c
+++ lib/modules/fglrx/build_mod/kcl_ioctl.c.new
@@ -217,6 +217,10 @@
  *  \param size [in] Number of bytes to allocate
  *  \return Pointer to allocated memory
  */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
+DEFINE_PER_CPU(unsigned long, old_rsp);
+#endif
+
 void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size)
 {
     void __user *ret = COMPAT_ALLOC_USER_SPACE(size);


I used the following steps to install AMD Catalyst-12.4 or 12.6 Beta and patch the fglrx module:
  • change directory to the path where the installer is
  • run the installer as root (superuser): 
  • # ./amd-driver-installer-12-4-x86.x86_64.run
    (change to ./amd-driver-installer-8.98-x86.x86_64.run for AMD Catalyst-12.6 Beta)
  • 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_kernel_3.4.0.patch) to /lib/modules/fglrx
  • change directory to /lib/modules/fglrx
  • patch the fglrx source:
  • # patch -p3 < fglrx_kernel_3.4.0.patch
  • compile the fglrx modules:
  • # cd build_mod
    # ./make.sh
    # cd ..
    # ./make_install.sh
  • reboot.
Enjoy your AMD Catalyst-12.4 or AMD Catalyst-12.6 Beta!

References: