Saturday, November 27, 2004

Tweaking Gentoo

Here are a couple of ways to tweak the performance of a Gentoo Linux install:

  1. Prelinking: This improves load times of shared libraries. It is especially useful for application suites that use a large number of shared libraries like KDE.
  2. Using NPTL: The Native Posix Thread Library (NPTL) improves the performance of multi-threaded applications. The performance of Java based applications like Tomcat, Orion and Azureus have visibly improved with NPTL.

Sunday, September 5, 2004

T616 Test Mode

To access the Sony Ericsson T616 phone test mode, use the sequence > * < < * < * where < and > refer to joystick movements to the left and right respectively.

Thursday, July 29, 2004

Switching from XFree to

I have finally made the switch from XFree86 to On Gentoo I pretty much followed the instructions posted on the Gentoo forums. After setting up the font directories correctly i.e., switch from /usr/X11R6/lib/X11/fonts to /usr/share/fonts, KDE was working as usual. There were two problems however:

  • Direct Rendering was disabled on my ATI Radeon 7200.
  • For some reason all the Mozilla apps (Mozilla, Firefox, Thunderbird, etc.) would crash as soon as they started rendering a page

The first problem was unrelated to the upgrade and was just something that I noticed now. It was easily solved by following this email thread. Essentially I had to make sure that the agpgart module was loaded before the radeon module. I have a VIA KLE133 AGP chipset and so in /etc/modules.autoload.d/kernel-2.6, I have the modules specified in this order:

  • agpgart
  • via-agp
  • radeon

With this setup, dmesg should report detection of the AGP chipset first (e.g.: agpgart: Detected VIA KLE133 chipset) followed by initialization of the Radeon card (e.g.: [drm] Initialized radeon 1.11.0 20020828 on minor 0: ATI Technologies Inc Radeon R100 QD [Radeon 7200]). Also, since i have an older Radeon card, I didn't have to use the new ATI drivers. OpenGL settings are to use the base implementation i.e., opengl-update xorg-x11 (as opposed to opengl-update ati for the ATI drivers).

On my machine, glxgears now reports a frame rate of around 1005 fps as opposed to the earlier 125fps!

Using strace, I figured out that the problem with Mozilla was that some of the fonts in the /usr/share/fonts/TTF were readable only by root. I made them readable ad now Mozilla is working again.

Monday, March 29, 2004

Carl Weiman, Nobel Prize in Physics, 2001

At the annual Robert Hofstadter Memorial Lecture at the Stanford Physics department, this year's speaker was Professor Carl Weiman from the University of Colorado. Prof. Weiman was the recipient of the Nobel Prize in Physics in 2001 for his work on achieving and studying the Bose Einstein condensate - a condensate of atoms formed at temperatures of around 10-7 Kelvin, predicted by Albert Einstein in 1924. Prof. Weiman's method for achieving the condensate at such low temperatures involves first slowing down Rubidium-85 atoms by bombarding them with lasers and then further cooling down the atoms using magnetic fields to form an envelope around the lowest energy atoms. Prof. Weiman was able to describe all this in simple physics and keep the hour long lecture very interesting. The Q&A session was also pretty enlightening, especially because of the insightful questions that some members of the audience came up with. There were other Nobel laureates among the audience including Professor Steven Chu, winner of the Nobel Prize in Physics in 1997.

Sunday, March 28, 2004

User Agent for T616 Browser

This is the user agent reported by the T616 browser:
SonyEricssonT616/R201 Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/

Monday, February 9, 2004

Builtins in C

Here's an interesting article on Kuro5hin: Why C Is Not My Favorite Programming Language. The article is a response to a rant from Brian Kernighan (over 20 years ago) called Why Pascal Is Not My Favorite Programming Language. It's an interesting article and makes good points about the ability to introduce buffer overflows very easily. For the most part though, the article is simply complaining about the amount of rope that C gives you to hang yourself with. Or should I say shoot yourself in the foot. One of the comments in the article was trying to make an example of the C builtins. The one I found most interesting was the branch prediction builtin __builtin_expect which lets you assist the compiler is branch prediction. Documentation for some of the other interesting builtins is here.

Wednesday, January 14, 2004


mod_deflate is an Apache module which compresses HTTP responses similar to mod_gzip. The nice thing about mod_deflate is that it is part of the default Apache installation.