Laptop Power Management in Linux

One tricky thing in Linux is getting the power management settings correct in Linux. Things like CPU throttling, battery and LCD power management are little difficult to configure with the standard tools that ship with any distribution. A little knowledge of how the kernel handles power management will go a long way in configuring and using a notebook efficiently. Here is a detailed guide from the Gentoo documentation. Has enough details right – from configuring the kernel to putting your laptop on sleep.  The concepts apply, no matter what Linux distro you use.


Cleartype LCD patch on Mandriva Linux 2007

My biggest gripe on any GNU operating system is the poor font rendering. Because of patents held by biggies like Microsoft and Apple, many interesting font rendering technologies cannot be applied on Linux without the chance of getting sued.

Perhaps the best patch available for font rendering is the LCD cleartype patch from Freetype maintainer David Turner. Though this patch is no longer available from Turner, you can download it from several places on the internet. I have shared one of them here. Let us see how we can apply this patch on Mandriva 2007. Ubuntu users, please refer to my another interesting howto here.

We need the following 3 files:

Extract all the packages to a folder:

$ tar -xzvf filename.tar.gz

Now we need to apply the patches for individual packages.
For freetype, there is no patch, but we can edit the file manually. Go to your freetype source folder, and open the file aflatin.c:

$ vim ./src/autofit/aflatin.c

Search for the term FT_RENDER_MODE_MONO. You will find two instances. Remove the OR statement that follows this in both cases. It will read like the following once you edit it:

if ( mode == FT_RENDER_MODE_MONO )
other_flags |= AF_LATIN_HINTS_VERT_SNAP;

You are done patching freetype.

Now go to the xft folder and run:

patch -p1 < path/to/your/libXft-2.1.10-etcpatchfile

Go to the cairo folder and run:

patch -p1 < /path/to/your/cairo_patch

You are done with all the patching. Now, go to individual folders for these packages and run:

$ ./configure --prefix=/usr
$ make

Now login as root and:

$ su
# make install
# exit

This will overwrite the default libraries that shipped with your system. Repeat the same for all the other packages.

Go to font preferenes and select sub-pixel font rendering.

Just restart X (Ctrl+Alt+Backspace) and enjoy your new beautiful Mandriva!


After patching

Acknowledgements: This guide is based on a thread in Ubuntu forums.

Ubuntu on PS3?

Now that it is officially confirmed that you are free to install any OS on PS3, it is time to save some money and buy one as soon as it is launched here or when someone starts selling it on ebay. Going by Sony’s past track record in India, it is unlikely that it will be in showrooms before the end of 2007.

Ever since I read about the Cell processor, I always wanted to get hold of a PS3. The cell based PS3 is likely to be very powerful in terms of processing heavy duty stuff like media encoding, which I often do on my laptop. The 9 core processor will be a refreshing change to the x86 based computers that we have been using for a while now. Though the official Linux is going to be Yellow Dog with enlightenment, I think hardly anyone will go for it. Ubuntu is likely to win the race here, closely followed by Fedora core. (Unforunately, Mandriva stopped shipping PPC versions of there distro sometime back). Interestingly, IBM is already shipping a Cell based general purpose computer with Fedora pre-installed!

This strategy of Sony comes as a big surprise, considering their continued efforts to thwart homebrew development on the PSP.

Sure, exciting days are ahead!

Update (28-Dec-2006): Here are some instructions for installing Ubuntu on PS3.  Warning: Not for the faint of heart.

Back to Mandriva

When I started using Linux a few years ago, I started out with Mandrake and remained a great fan of it till Fedora core came out. After the recent hype of Ubuntu, I gave that distribution too a try.

Now that some positive reviews of Mandriva 2007 is coming out, I thought I will give my old favorite a try again. And believe me, I was’nt disappointed. Mandriva 2007 is a well polished, great looking, feature packed desktop with all the modern bells and whistles. I tried out the Live CD called Mandriva One (which also allows you to install a desktop version a la Ubuntu) and it is heartening to see that Mandriva is back in action after keeping low for a few years.

Mandriva 2007

Unlike Ubuntu, Mandriva can play most multimedia formats out of the box, including mp3 and divx! As soon as you install it, you are up and running! No need to fiddle with third party repositories that can potentially break your system. Wireless configuration was seemless – it had no problems in connecting to my home network with WPA. What’s more, it comes even with a nice 3D desktop!

Now that I am happy with Mandriva One, I am planning to install the 4 CD version over this weekend. Expect a full length review soon!