Thursday, April 27, 2006

Adventures in Linuxland

Recently, I took another stab at the 򪪪򪪪world of Gentoo Linux on my server system knuckles, and it impressed me so much with how far it came since I last used it (2004.1), that I was compelled to install it on my laptop, sonic and rid myself of the dreaded Windows XP Home. While it took me just over a day to get my server up and running, I ended up spending six days getting everything setup optimally on my trusty lappy. Without inbuilt wireless support, I scrambled around for a CAT5e cable and plugged it up so I could actually download the installation files.

The first of my problems started when I was installing, I needed to configure the kernel for the system, and I loathe too many modules (it slows the compile time, and doesn't fine tune your system, which is the point of using Gentoo), so I had to tweak the settings based on a very sketchy output from msinfo32. For the first run, I decided it was best if I just compile a simple kernel that would just run, I was soon glad I did. Sifting through references on powermanagement and laptops on the Gentoo website and WiKi, I found I should install a seperate branch of the Gentoo kernel called suspend2, which enables the advanced features found in laptops, such as suspend to disk (also known as hibernate).

Before I went fiddling with the kernel alot, I decided I should be doing something useful while tweaking the various system configuration files, and knowing X.Org/KDE would take a very long time (from previous experience), I emerged that and set to work.

It was very easy to get distracted by various tangents along the way, while doing my power management, I stumbled across references to fbsplash and decided to whack in support for that, which required another kernel tweak. Failing to get the Intel 915 framebuffer working, I used VESAFB-TNG which worked a charm, because it was important to me to run the laptop at it's native 1280x800 resolution in 24bpp.

Once X was all installed, I went off to test my nice framebuffer enhanced kernel. Upon bootup, I was informed that there was no 1280x800 image in the theme I'd chosen. My path forked again as I hacked apart the 'Gentoo' theme and resized the image, then tweaked the config file for it to make it look just right. Alas, after all this was done, I was presented with errors about ACPI not working, aparrently I needed to select a proper CPU scaling method, as well as find the proper option to select the resume device. There, I ended up getting frustrated looking for the correct tree in make menuconfig and edited .config by hand. Now it wanted security features built in (namely MD5 and other crypto stuff), so I did that, compiled, and finally it worked.

Time for KDE, and as I expected, KDE 3.5.2 was stunningly beautiful, but the reason I'm here was to fine tune the crap out of my system, wasn't I? I found some docs on X.Org, Transparency, and the Composite Extension and set out to get it up and running, knowing I would hardly use it due to the amount of resources it hogs, I just wanted to look at the pretty eyecandy for a while. As it turned out, I had to recompile X.Org and KDE with a new USE flag composite. Thankfully, not every single part of KDE needed recompiling in the process, as the first iteration had taken a day and a half. When all was done, composite ended up hogging way more resources than I initially expected, the KDE transparency dialog didn't take effect immediately and required me to restart X (this is one of the reasons I use a screen session for most of my work, on both sonic and knuckles).

Turning to the rest of the system configuration at large, it was time to get my WiFi working, as I didn't see any support for my card I ended up doing a Google Search and found that I needed the madwifi project for my Atheros based chipset. Getting this setup was one of the most frustrating parts of the whole procedure. The project's IRC channel were no help in diagnosing why it would refuse to connect to my access point (the best they offered was to roll back to an older version which did absolutely nothing). Giving up on them I decided to do what I do best, learn for myself by prodding every single part of it. Seems it didn't like using WEP encryption, and I couldn't use WPA because I play with my Nintendo DS only, which only supports WEP. I didn't want to leave my AP ungaurded so I setup MAC address filters to only allow my systems to connect (and while I realise this is unoptimal, it was about the only choice I had).

Now it was time for ACPI and suspend2. After tinkering around for a few hours I finally managed to get hibernation to work, which was what I wanted, because if I close the lid it needs to resume for where I left off for me. Unfortunately, the WiFi decided to give me more problems by refusing to reload whenever I resumed. I hooked up the CAT5e cable again and did some research, but found no viable answers. My method of fixing it; shut the whole damn system down and start again. I would later work out when I accidently did ifconfig ath0 down that I needed to unload all the wlan modules, kill all references to the interface, and run /etc/init.d/net.ath0 start all over. Still haven't tested this method with hibernation yet though.

Next, I wanted media playing. I'd used mplayer before, and liked the libcaca output, but getting it to run optimally required me to fiddle with config settings for a while. It was a big step from using the idiot-proof Media Player Classic in Windows.

The other part was finding a decent music player. As I wasn't going to use the archaic XMMS, I played with WINE for a while as I was considering doing all this on my partners laptop too (an idea which I've since abandoned), and she would want games like GTA: San Andreas. So I tried WinAMP 5.21, but unfortunately, it missed features, refused to give me a taskbar entry, and decided it would stay 'on top' no matter what I did. Probing around the net I tried a few players, including BMPx (an XMMS fork), audacious (a BMP fork (yeah a fork of a fork)), and amaroK.

amaroK 1.4-beta3 in KDE 3.5.2
amaroK 1.4-beta3 in KDE 3.5.2
By far, the prettiest and most useful player was amaroK, and with all the feature-laden options, it lacks one simple thing; Queue Management. Sure there's a queue, but apart from adding/removing files to/from the queue, the only other option is moving the selected entry up/down. I'm the type of guy who likes to build a masterful queue containing over a day worth of music, randomise the sucker, and set it off to play while I work. amaroK lacks this very functionality, and it will be this simple fact that I may stop using it, despite all the great work done to it. A review of bugs.kde.org revealed someone else had posted a wishlist containing the same thing, and the amaroK developers response to this; "This feature will never be added to amaroK, as discussed on IRC". Reading this, I was totally devestated. How could something so useful be totally dismissed? I guess that's the fickle FOSS world for you.

What amuses me is that while doing all this, I still managed to do work on my project xrcd (and create an SVN Repository for it), and have a fight with freenode's head of staff. I'm not doing bad for one man in a single week, am I?

No comments: