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 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:

Tuesday, April 10, 2012

Beware when compiling using -jN option

When I compiled lilypond-2.15.36, I found this error:
cat out/feta-braces-a.otf-table out/feta-braces-b.otf-table out/feta-braces-c.otf-table out/feta-braces-d.otf-table out/feta-braces-e.otf-table out/feta-braces-f.otf-table out/feta-braces-g.otf-table out/feta-braces-h.otf-table out/feta-braces-i.otf-table > out/emmentaler-brace.otf-table
echo '(design_size . 20)' > out/emmentaler-brace.otf-gtable
echo feta-braces-d feta-braces-c feta-braces-i feta-braces-e feta-braces-h feta-braces-a feta-braces-g feta-braces-f feta-braces-b > out/emmentaler-brace.subfonts
printf 'emmentaler-brace' > out/emmentaler-brace.fontname
cd ./out && /usr/bin/fontforge -script emmentaler-11.pe
Copyright (c) 2000-2011 by George Williams.
 Executable based on sources from 13:48 GMT 22-Feb-2011-ML-TtfDb.
 Library based on sources from 13:48 GMT 22-Feb-2011.
Cannot open /usr/local/src/Music/lilypond-2.15.36/build/mf/out/feta11.pfb
The requested file, feta11.pfb, does not exist
MergeFonts: Can't find font: feta11.pfb
Called from...
 emmentaler-11.pe: line 17
make[1]: *** [out/emmentaler-11.svg] Error 1
make[1]: *** Waiting for unfinished jobs..... 

This error is caused by the use of -jN option when compiling lilypond (I used this instruction: make -j4 all). I used that option in order to maximize CPU cores utilization, however, this option can lead the compilation process into race condition. In the case of lilypond compilation, feta11.pfb is needed by one of compilation thread/stream before other thread/stream compiles it. When I omitted the -jN option, the compilation was successful.

In conclusion, be careful when we use the -jN option. This option can make the compilation process faster because the compilation process uses more than one CPU core, however, the race condition can occur in some cases.

Thursday, April 5, 2012

Linux Kernel 3.3.1 & AMD Catalyst

I just upgraded the kernel to 3.3.1 (my own compilation) then tried to recompile the fglrx modules for this new kernel. No problem in compilation, as well as in use. I have tried AMD Catalyst 12.2 and 12.3, both are no problem on my system with kernel 3.3.1. If you want to upgrade your kernel to 3.3.1 and AMD Catalyst 12.2 or 12.3, you can upgrade them ... without problem, hopefully.

Thursday, September 22, 2011

TeXstudio-2.2 on Slackware64

Today, I have upgraded TeXstudio (formerly TexMakerX) from 2.1 to 2.2 release version (released on 2011-07-20). I need this LaTeX Editor for writing my dissertation report. For the new features, release notes, screenshots, etc., please refer to its website. I downloaded the source code from this link. It needs Qt (at least 4.3), libpoppler, and TeX packages (don't worry, they can be found in l (or deps for Qt if you are using Eric's KDE compilation packages) and t directory for Slackware/64) for compilation.

The compilation process is very easy:
  • extract the source files from tarball
  • enter to texstudio source directory
  • # qmake texstudio.pro
  • # vim Makefile.Release  (or, use your favorite text editor to edit Makefile.Release)
  • make sure /usr/lib64 is written on LIBS (see Figure 1)
  • # make
  • # make install

Figure 1: Makefile.Release

It should be no problem in compilation. Enjoy your TeXstudio!

Screenshot:
Figure 2: TeXstudio-2.2 is running on Slackware64

Tuesday, August 30, 2011

Installing e-Sword under wine on Slackware64

Finally, I can install e-Sword, a Bible study software for windows, under wine on Slackware64 after trying it for a whole day. I decided to use e-Sword because it has abundant, almost complete modules; everything that I need mostly can be downloaded or purchased on the internet.

Before installing e-Sword, you have to prepare the wine environment. For Slackware users, you can download the slackbuild scripts from SlackBuild.org and the source files, then build the slackware packages, in order, webcore-fonts, fontforge, wine, winetricks, and cabextracts. Strictly for Slackware64 users, you have to install Eric's multilib packages in order to compiling and running the wine. After these wine's packages are installed, do these following steps (you have to connect to internet):
   $ export WINEARCH=win32   <-- just for Slackware64
   $ winetricks mfc42   <-- installing mfc42.dll
   $ winetricks msls31   <-- installing msls31.dll

Now, you're ready to install e-Sword. Download the latest version then install it:
   $ wine [path-to]/setupXXX.exe   <-- the "XXX" is the version number of e-Sword

After that, you need to set up wine environment again:
   $ cp ~/.wine/drive_c/Program Files/e-Sword/riched20.dll ~/.wine/drive_c/windows/system32
   $ winecfg

In winecfg, set riched20.dll to native and oleaut32.dll to native,builtin (see picture below).
Finally, run e-Sword by clicking the icon on your desktop/menu (if any) or typing this command on terminal:
   $ wine "C:/Program Files/e-Sword/e-Sword.exe"

Installing eSword9Converter
If you have the old modules (before version 9) for e-Sword, you need to convert it before using it. You will need eSword9Converter to do that. Please download it from this site. Before installing it, you have to install .NET Framework 3.5 by typing this command on terminal (you have to connect to internet):
   $ winetricks dotnet35
Then you can install eSword9Converter:
   $ wine [path-to]/setup-X.X.X.exe   <--- the "X.X.X" is the version number of eSword9Converter
After finishing installation, you can run eSword9Converter by clicking the icon on your desktop/menu (if any) or typing this command on terminal:
   $ wine "C:/Program Files/eSword9Converter/eSword9Converter.exe"

That's all.

References:
  • http://ubuntuforums.org/showthread.php?t=404042
  • http://forum.sabayon.org/viewtopic.php?t=22775#p127929


Friday, August 26, 2011

ATI Catalyst on Linux Kernel 3.0.3

Yesterday, I found that the kernel and ATI Catalyst driver have been updated since August 17, so that, I decided to spend my time for testing them, then use them if there is no problem. Since a few hours ago, the new kernel 3.0.3 and ATI Catalyst has been running smoothly on my laptop. I have tested 2 versions of ATI Catalyst, those are, 10.12 and 11.8.

ATI Catalyst 11.8 (without patch)
This version has been installed without problem and without any single line's patch. My suggestion, use xorg.conf from aticonfig --initial for avoiding any problem (see my previous post), especially if you want to use Desktop Effects.

ATI Catalyst 10.12 (with patch)
I have tried this version on kernel 3.0.3 and it has been running smoothly without problem, however, it need to be patched. For patching ATI Catalyst 10.12, please read my previous post. You can find the link for downloading the patch on that post.

That's all.

Note: for my other posts about ATI Catalyst, go to this link. You may need to read it.

Tuesday, August 9, 2011

Linux Kernel 3.0.1 & ATI Catalyst

Since yesterday, I have tried to run the Linux kernel 3.0.1 on my laptop; everything is good, no problem so far. Next step, I tested the ATI Catalyst 11.7, without patching. After installation, everything is running well including fglrx kernel module and the driver for x server. However, I still have the "old" problem that always occurs when I install ATI Catalyst 11.x, that is, I cannot activate OpenGLOverlay so that the Desktop Effects (compiz) cannot be launched. Therefore, any version of 11.x can be installed as long as the OpenGLOverlay is disabled (see the option below).
Section "Device"
        [...]
        Option      "OpenGLOverlay" "off"
        [...]
EndSection
Now, I am using ATI Catalyst 10.12  with OpenGLOverlay enabled (see the option below) so that I can activate the Desktop Effects since this version does not have problem with OpenGLOverlay. Of course, I have to patch it first. I use the patch that I have written about two months ago (here). So far so good, I can activate the Desktop Effects again.
Section "Device"
        [...]
        Option      "OpenGLOverlay" "on"
        [...]
EndSection

Linux Kernel 3.0.1 and ATI Catalyst 10.12:


My note: Although I have problem with Desktop Effects when I use ATI Catalyst 11.7, My colleague, Widya Walesa, can activate the Desktop Effects when using 11.7; you can read it on his blog. I still don't know what the cause of my problem is.

Note: for my other posts about ATI Catalyst, go to this link. You may need to read it.