11 December 2006

Configure RADEON X550 on Kubuntu Edgy

Here I want to share how I configured my ATI RADEON X550 on Kubuntu Edgy.

I installed the driver in Kubuntu edgy manually. In short, download ati-driver-installer-8.31.5-x86.x86_64.run and follow the ATI linux driver guide.

Work in theory but give me pain before I get the 3D properly. Here the 'bad' messages:

helmi@hix2:~> vim /var/log/Xorg.0.log
[drm] failed to load kernel module "fglrx"
(II) fglrx(0): [drm] drmOpen failed
(EE) fglrx(0): DRIScreenInit failed!
(WW) fglrx(0): ***********************************************
(WW) fglrx(0): * DRI initialization failed! *
(WW) fglrx(0): * (maybe driver kernel module missing or bad) *
(WW) fglrx(0): * 2D acceleraton available (MMIO) *
(WW) fglrx(0): * no 3D acceleration available *
(WW) fglrx(0): ********************************************* *
helmi@hix2:~> glxinfo | grep 'direct rendering'
direct rendering: No
helmi@hix2:~> fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: Mesa project: www.mesa3d.org

After googling, I realize that the driver don't match to the kernel
helmi@hix2:~> uname -a
Linux hix2 2.6.15-26-amd64-k8 #1 SMP PREEMPT Thu Aug 3 03:11:38 UTC 2006 x86_64 GNU/Linux
helmi@hix2:~> gcc --version
gcc (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)

I compile the ATI driver using gcc-4.1.2 but my kernel compiled using gcc-4.0. So the workaround is (follow the guide, copied here as my future reference):

sudo apt-get install gcc-4.0
sudo ln -sf /usr/bin/gcc-4.0 /usr/bin/gcc

After doing the module-assistant steps, you may want to return gcc to 4.1 by default:

sudo ln -sf /usr/bin/gcc-4.1 /usr/bin/gcc

After reboot,
helmi@hix2:~> glxinfo | grep 'direct rendering'
direct rendering: Yes
helmi@hix2:~> fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON X550 Generic
OpenGL version string: 2.0.6174 (8.31.5)
Yey! Next is Xgl/Beryl ...

If you notice I use kernel 2.6.15-26, and Edgy use 2.6.17-10. That new kernel just refused to start properly and I too lazy to debug it - my current kubuntu just `work for me`

04 December 2006

Page load faster after first request

It hard for me to explain why web page load faster when you visit the same url for second time. Non-geek just don't know how to visualize it, or people don't know what I'm talking about :-)
Now I have pictures

First request:

Second request:

Now understand? ... What, still don't understand???

24 November 2006

Why vmware snapshot is good idea?

Because you will know what to do when get Blue Screen of Death.
Here mine:
I want to get rid of message 'VMware Tools out of date'. After install and reboot, vmware give me this nice screen, yey!

01 November 2006

/bin/sh: bad interpreter: Permission denied

Got permission problem when run firefox2.

# ./firefox
# ./firefox: Permission denied

Just realize that all executable script have permission problem although give all permission to the file, i.e. chmod 777 script.sh. Even root have this permission problem.

Don't know how I edit the /etc/fstab, but my /home directory mount as 'auto'.
# cat /etc/fstab
/dev/hda1 /boot ext2 defaults 1 2
/dev/hda3 /home auto defaults,user 0 0

So, the solution is add option exec to the filesystem at /etc/fstab. My new /etc/fstab
# cat /etc/fstab
/dev/hda1 /boot ext2 defaults 1 2
/dev/hda3 /home auto defaults,user,exec 0 0

ref: http://forums.fedoraforum.org/archive/index.php/t-19374.html

21 July 2006

putty on nokia3230

Access to my home server using PuTTY on my Nokia 3230. I can even edit text using vim.

Buzzword for today = cometd (hint: ajax)

I'm in mode 'Korean movies'. My Little Bride, My Boss My Student, Please Teach Me English, My Tutor Friend

26 June 2006

An Optimization That’s Never Premature

I like this example about optimization:

Writing code that is difficult to read is like running up your credit card buying expensive toys; even though you don’t pay today, the bill is going to come due eventually — and the longer you wait the more it’ll cost.

I'm in Futurama fever. Now in Season 3, episode 9.

24 April 2006

vmware, apache, mplayer under kubuntu dapper [beta]

I follow this guide by Stoltenow, and it works for me.

apache2+kubuntu=SUCK!. I expect directory public_html in my home directory will be in apache DocumentRoot [like Suse and FreeBSD], but it not as expected. Have to edit the apache2.conf manually.

No mplayer in kubuntu dapper[beta]! Had uncomment /etc/apt/sources.list for universe and multiverse, but still no mplayer after `sudo apt-get update; sudo apt-get upgrade; apt-cache search --names-only mplayer`. Also had add `deb http://honk.sigxcpu.org/linux-ppc/debian/ mplayer/` in /etc/apt/sources, still no mplayer. I try the hard way, but the video don't want to come out.
VDec: vo config request - 208 x 170 (preferred csp: Planar YV12)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.

FATAL: Could not initialize video filters (-vf) or video output (-vo).

Can't restore text mode: Invalid argument

Hey! the mplayer Makefile don't want me to uninstall mplayer.

make uninstall
/bin/sh: -c: line 6: syntax error: unexpected end of file
make: *** [uninstall] Error 2

Conclusion, my VMware Workstation 5.5.1 build-19175 works! (apache or mplayer)+kubuntu dapper[beta]=SUCK!

Kubuntu? What happen to FreeBSD?
FreeBSD is retired from my harddisk. Sayonara...

18 April 2006

Firefox problem in FreeBSD 6.0 after portupgrade

After portupgrade FreeBSD 6.0 then you got this error when run firefox:

(Gecko:7209): GLib-GObject-WARNING **: cannot register existing type `GConfClient'

Panic, panic. What to do? Google ... :)

I had try several methods, read /usr/port/UPDATING, `portupgrade -varR -PP`, etc. FreeBSD only like the hard way `portupgrade -vaR`. It means when you portupgrade the first time, firefox don't like one of it upgraded version dependency. Which package? argh... I don't know :/ . So, have to do the hard way, ask FreeBSD upgrade the ports by compile it from source, wait it finish compiling, cross your finger hopefully the blue screen that ask package option don't appear, bla bla ... 2 days fighting with this, then my firefox is alive back, YEY!

tips: GConf involved with GNOME. Give `portupgrade -vPP libgnome-2.10.1` a try before `portupgrade -vaR` is a GOOD idea.

While compiling port, the FreeBSD give me this error:
ad0: timeout waiting to issue command
ad0: error issueing READ_DMA command
g_vfs_done():ad0s1f[READ(offset=29776416768, length=12288)]error = 5
vnode_pager_getpages: I/O read error
vm_fault: pager read error, pid 71516 (rtorrent)
ad0: TIMEOUT - READ_DMA retrying (1 retry left) LBA=61351999
ad0: TIMEOUT - WRITE_DMA retrying (1 retry left) LBA=62304671
ad0: TIMEOUT - WRITE_DMA retrying (1 retry left) LBA=62311103

Please don't tell me that you FreeBSD sucker cause my 80G, WD harddisk failed.

OK, stop ranting about FreeBSD.

Hey! Tab Mix Plus is COOL, recommended.

13 April 2006

Why lah UNO hate me?

I HATE this line:
Error (<class conversion.com.sun.star.lang.IllegalArgumentException at 0xb7bc8d1c>) during conversion:URL seems to be an unsupported one.

Because of this line, I'm keep whining for whole day!

I want OpenOffice convert my document to PDF using UNO. Works perfectly in my development box, but when using different box it don't like me. Hate deployment, hate hate ...

I wish that I'm get paid by the line :D , so I can apply this cheat in my code:
If Request.QueryString("source_url") = "" Then
strRedirect = strRedirect & "&verify=1"
If Request.QueryString("process") = "1" Then
strRedirect = strRedirect & "&process=1"
End If
strRedirect = strRedirect & "&verify=1"
If Request.QueryString("process") = "1" Then
strRedirect = strRedirect & "&process=1"
End If
End If

12 February 2006


This is about Representational State Transfer not rest, verb.

Quote from ajaxpatterns:

" Witness the the debacle caused by the Google Accelerator interacting with non-RESTful services in mid-2005. The accelerator jumps ahead of the user and prefetches each link in case they should click on it (a non-Ajaxian example of Predictive Fetch). The problem came when users logged into non-RESTful applications like Backpack. Because Backpack deletes items using GET calls, the accelerator - in its eagerness to activate each GET query - ended up deleting personal data. This could happen with regular search engine crawlers too ... "

REST compared to RPC

08 February 2006

Where should define database schema?

Where should define database schema? in python (hint: django) or DDL.

Jonathan Ellis explain why schema definition belongs in the database. Yes, why reinventing the wheel create another database schema in .py (hint: django). Runtime introspection is good idea (hint: sqlalchemy, pydo).

After read Adrian Holovaty (hint: django) comment "Cache that, man. Cache it." my eyes wink wink ...

p/s: Nesting UnitOfWork in a Database Transaction seems more interesting compared to adodb CompleTrans()

12 January 2006

Short memory problem

My pair programming partner always complaint that I have bad short memory.

Is it because of my foods? :D

After read article, 12 Steps to Better Code, point #8, I guess I found the right answer.

... Productivity depends on being able to juggle a lot of little details in short term memory all at once. Any kind of interruption can cause these details to come crashing down. When you resume work, you can't remember any of the details (like local variable names you were using, or where you were up to in implementing that search algorithm) and you have to keep looking these things up, which slows you down a lot until you get back up to speed.