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, February 13, 2014

AMD Catalyst Patch for kernel-3.13.x

Yesterday, I decided to upgrade the kernel from kernel tree of 3.12.x to 3.13.x and AMD Catalyst from 13.8-beta1 to 13.12. When I upgraded the AMD Catalyst, I got error message on compiling fglrx kernel module. As usual, I checked to Arch Linux for the patch and I found it. I used the information from it to modify the patch into one file only. You can download the modified patch from my Google Drive. Using this patch file, you can patch the fglrx module (of course, you have to install AMD Catalyst 13.12 first) as below (in case of using kernel-3.13.2. Just edit the number "3.13.2" for other kernel version):
  • change directory to the path where the installer is
  • run the installer as root (superuser):
    # ./amd-catalyst-13.12-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-13.12_kernel-3.13.x.patch) to /lib/modules/fglrx/build_mod/
  • change directory to /lib/modules/fglrx/build_mod/
  • patch the fglrx source:
    # patch -p0 < fglrx-13.12_kernel-3.13.x.patch
  • compile the fglrx modules:
    # ./make.sh
    # cd ..
    # ./make_install.sh
  • reboot.
Enjoy your AMD Catalyst-13.12 running on linux kernel 3.13.x.

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.

Monday, December 31, 2012

AMD Catalyst Patch for kernel-3.7.x

It has been 5 months! I didn't upgrade the AMD Catalyst driver and also the kernel (I sticked with kernel 3.4.x). This week, I got time for upgrading the kernel to 3.7.x and also trying to install AMD Catalyst 12.10. As usual, the fglrx module of AMD Catalyst 12.10 could not be compiled smoothly because of incompatibilities between kernel 3.7.x and this fglrx module. Fortunately, I found the patch from arch linux (also as usual ... :) ... my favorite place for searching any patches) from this link then I make a little bit modification. You can download it from my google docs link.

How to patch?
I used the following steps to install AMD Catalyst-12.10 for kernel 3.7.1 (of course, you just change the kernel directory on these steps if your kernel version is not 3.7.1) and patch the fglrx module:
  • change directory to the path where the installer is
  • run the installer as root (superuser): 
  • # ./amd-driver-installer-catalyst-12.10-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.7.patch) to /lib/modules/fglrx/build_mod/
  • (optional, if you don't find version.h in /lib/modules/3.7.1/build/include/linux) Make symlink of version.h
  • # ln -s /lib/modules/3.7.1/build/include/generated/uapi/linux/version.h /lib/modules/3.7.1/build/include/linux/version.h
  • change directory to /lib/modules/fglrx/build_mod/
  • patch the fglrx source:
  • # patch -p0 < fglrx-3.7.patch
  • compile the fglrx modules:
  • # ./make.sh
    # cd ..
    # ./make_install.sh

  • reboot.
Enjoy your AMD Catalyst-12.10 running on linux kernel 3.7.x.

Monday, July 9, 2012

Left-, Right-, and Middle-click on Clickpad

Last time, I have shared to you about how to activate right-click on clickpad by patching and recompiling the source of synaptics, at that time, synaptics version 1.4.0. Pat has upgraded the synaptics in Slackware- or Slackware64-current to version of 1.6.2. When I read the source of synaptics-1.6.2, I found that the click function of clickpad can be performed by clicking the clickpad using one, two, and three finger(s). I set the clickpad configuration for X-server, saved in /etc/X11/xorg.conf.d/clickpad.conf, as below:

Section "InputClass"
        Identifier "touchpad"
        Driver "synaptics"
        MatchDevicePath "/dev/input/event*"
        MatchIsTouchpad "on"
        Option "TapButton1" "1"
        Option "TapButton2" "2"
        Option "TapButton3" "3"
        Option "VertTwoFingerScroll" "on"
        Option "HorizTwoFingerScroll" "on"
        Option "VertEdgeScroll" "on"
        Option "HorizEdgeScroll" "on"
EndSection

By this configuration, I activate the behavior of click functions, vertical- and horizontal-scroll using two fingers, and also vertical-edge- and horizontal-edge-scroll that are very convinient for me. Click functions on my laptop can be performed such like this:

  • left-click: one-finger's click
  • right-click: two-finger's click
  • middle-click: three-finger's click


Monday, July 2, 2012

Official Release of AMD Catalyst 12.6

Finally, AMD Catalyst 12.6 has been released officially last Thursday (28-JUN-2012). Please note that this version only supports Radeon HD5000 series or newer as stated on AMD website. For HD4000 and older series, it is better if you stick on current driver that you are using now. This unofficial AMD Catalyst's wiki may help you to decide which version you want to install on your computer.

It has been working nicely on my laptop with kernel-3.4.2 and xorg-server-1.12.2 installed since yesterday. For anyone that uses linux kernel 3.4.x, please follow my step that I have written last time: "AMD Catalyst Patch for kernel-3.4.x". I still compile the kernel-3.4.4. This Catalyst driver should be able to work nicely too on it. I will update this post soon after I finish to set up my laptop with this new kernel.

Updated (02-JUL-2012):
  • This Catalyst driver and the patch are working very well on kernel-3.4.4
  • AMD also released the 12.7 beta version at the same day of 12.6 that will improve performance optimizations for the AMD Radeon HD 7900, AMD Radeon HD 7800, and AMD Radeon HD 7700 Series. You can checkout this link. However, this beta version is not for linux ... :(

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: