Finally getting everything to work on Gutsy

I had everything working quite well on my Macbook Pro (Core 2 Duo) with Ubuntu Feisty, but due to some badness from the shitty, shitty ATI fglrx driver, I couldn’t use Gutsy with everything working.

The new kernel in Gutsy moved from the SLAB allocator to the SLUB allocator. (Btw, I have no idea what that actually is..). So, this meant that I couldn’t put the machine into Suspend mode while using the ATI drivers. Although the RadeonHD driver works quite well, it means that I can’t actually play BZFlag.

To solve this, I ended up compiling my own custom kernel for Ubuntu, and switching it to use the SLAB allocator. I thought it would be appropriate to blog it here in case anyone else is interested.

I followed much of the instructions from the Macbook Pro page on the Ubuntu Wiki, but I built a deb package for my kernel. So have a look at the Unofficial ATI linux driver wiki page for installing on Ubuntu Gutsy.

Here we go:

Symlink the firmware directory. This is usually needed for the initrd.
sudo ln -sf /lib/firmware/2.6.22-14-generic /lib/firmware/2.6.22.9

Install all the required packages
sudo apt-get install linux-source libncurses5-dev build-essential kernel-package fakeroot module-assistant build-essential dh-make debhelper debconf libstdc++5 linux-headers-generic

Extract the kernel source, import the old config and start the make config
cd /usr/src/
sudo tar -xvjpf linux-source-2.6.22.tar.bz2
sudo ln -sf linux-source-2.6.22 linux
cd linux
sudo cp /boot/config-2.6.22-14-generic .config
sudo make menuconfig

In the menu, browse to ‘General setup‘, then select ‘Choose SLAB allocator‘ at the last entry. Change this from ‘SLUB’ to ‘SLAB‘, then exit ‘General setup’.

Select ‘Processor type …‘ and ‘Processor family‘ and change the CPU from ‘Generic-x86-64′ to ‘Intel Core2 / newer Xeon‘, exit ‘Proccessor type …’.

Go to ‘Device Drivers‘ > ‘Sound‘ > ‘Advanced Linux Sound Architecture‘ > ‘PCI devices‘ and Hit the M key to enable the ‘Intel HD Audio‘ module.

I think that Ubuntu packages this driver as part of an extra modules package, but the in-kernel one works fine

Save the new config and exit.

UPDATE: Edit the file /etc/kernel-pkg.conf, and add the line:
CONCURRENCY_LEVEL = 3

This should make sure of both cores when compiling your new kernel. This will take it down from about 1 hour to still timing it, please update

Build your new kernel package
time make-kpkg --rootcmd fakeroot --uc --us --initrd binary

I think it’s a good idea to boot into your new kernel here. Make sure everything’s working before you move on.

Download the ATI driver installer ati-driver-installer-7-11-x86.x86_64.run

Build Ubuntu fglrx packages from the ATI driver script
sudo bash ati-driver-installer-7-11-x86.x86_64.run --buildpkg Ubuntu/gutsy

Install the fglrx packages
sudo dpkg -i xorg-driver-fglrx_8.433-1*.deb fglrx-kernel-source_8.433-1*.deb fglrx-amdcccle_8.433-1*.deb

Build the fglrx kernel module package.
sudo module-assistant prepare,update
sudo module-assistant build,install fglrx -f
sudo depmod -a

Install the fglrx kernel module
sudo dpkg -i fglrx-kernel-2.6.22.9_8.433-1+2.6.22.9-10.00.Custom_i386.deb

Make sure you’ve got fglrx set in the device section of your xorg.conf.

That should do it.

Suspend to Ram on a MacBook Pro

I’m running Gentoo and Ubuntu Feisty on my MacBook Pro (Core 2 Duo), and it just refused to resume after a suspend to ram. Let this be a note to anybody else going through the frustration that I was.

In /etc/default/acpi-support, I changed POST_VIDEO from true to false.

# Should we attempt to warm-boot the video hardware on resume?
POST_VIDEO=false

Works a treat now ;)

Banshee 0.11.0 is rad

banshee.png

The new Banshee rocks. Not only does it do two-way iPod sync, but it also does cover art, iTMS (from a plugin) and Last.FM recommendations. I nearly forgot, it also does DAAP for sharing with iTunes over mDNS.
I made some ebuilds for Gentoo, and submitted a bug report for it.
Rad.

I scored a UPS!

I scored myself an APC Backup-UPS RS 500 the other day. It’s a small unit designed for running pretty much one machine on it.

APC Backup-UPS RS 500

The nice thing about this is that it has a USB interface which I have connected to my server hosting andybotting.com, and allows me to monitor it using apcupsd software. It even comes with some basic CGI scripts so I can monitor it online. If there is a power-out, then the UPS alerts the apcupsd, and at a certain point, can instruct the server to gracefully shut down.

Although, my ADSL modem isn’t plugged into it yet because it uses different plugs. I need to find some way of converting the IEC power socket to something I can plug my Australian power plug into. One possible solution might be a standard 4-port powerboard, but with an IEC plug on the end. I can’t say I’ve actually seen one though.

An update for the last couple of weeks

Haven’t blogged for a while, so he’s a quick update of what’s been going on.
At work late tonight, helping out because of a function. It was supposed to be finished at 9pm, but it’s now 10:15pm and they’re still here. Let’s bring on the tear gas and tasers :)

We started getting pissed off with the builders across the lane from us, so we started hassling the council about it, and maybe something’s going to get done. I moved my webcam server home, and set up two cams outside our window, so at any time, I can see what they’re doing. You can check it out at http://andybotting.com/webcam. Whatever you do, don’t leave it running too long, it kills my bandwidth :)

My old man is going to salary sacrifice a new laptop for me. This is nice because it means that i’ll only have to pay about 52c in every dollar. I was tossing up between an IBM ThinkPad and an Apple 15″ PowerBook, but I think the PowerBook is going to be the choice. I set up a Wiki page on everything I could find about running Linux on the new hi-res (powerbook5,8 Oct 2005) model PowerBooks here. It seems that there are a couple of little issues (current kernels don’t have support for the ATA controller, AGP and the Gigabit Ethernet but can be patched), but is basically ok. I should be ordering it in 2 weeks time.

I broke the Segway at work (not sure how…) but it’s back today. They couldn’t tell me exactly what broke, but it was under warranty anyway. Looks like i’m going back to my old rotation at IP Voice next week. They’ve got plenty of work and need some more bodies, so I’m going back to help out.

Also, the fuckwits managing this company decided to Not go ahead with the graduate intake for 2006. This does mean that the grads who were promised jobs, and signed their contracts will now be sacked. The Age ran an article about it, and there is also a Whirlpool forum on the subject. If you’re wondering, Nelsie’s still got her spot for next year. Phew.

Jezza has done some terrific work on his new Melways frontend. You can now search for an address to bring up the melways map to fill your full brower window, and even switch to the corresponding Google Maps satellite image. It’s the best we’ve got until Google bring maps to Australia

… also, I found this which made me laugh.

Note to self: blog more often :)

andybotting.com system monitoring

I have been using LogWatch for a while now and I have been very impressed. It sends me a daily email (at about 3am) summarising the important parts of the logs that were generated throughout the day. It was actually LogWatch that tipped me off that something was not quite right when my server was compromised not long ago. Since then, I have been quite interesting in some system monitoring applications for linux so I can keep a close eye on what’s happening, so that if something bad happens again, I should know very quickly.

I had a poke around with LogWatch and found that it stores some configuration scripts in /etc/log.d/conf/services, and there are plenty of scripts there for a variety of services. I found that many of them were incorrectly set to monitor the wrong log files, and therefore were not sending me any information about them. I modified the httpd, amavis, openvpn and postfix to use the right logs, and I suddenly started getting information about these in my email. It can now tell me about how many spam emails it has dropped, how many emails have been sent and recieved and how many hits apache has had.

Another thing I have been playing with is Cacti, which is a PHP based SNMP monitoring tool. I was easily able to start monitoring simple things like the number of users currently logged in, available disk space, CPU load average and memory usage without any SNMP support, but once I recompiled both php and mod_php and installed net-snmp, then I was able to get all sorts of network interface statistics, which I find to be very informative. You can have a look at my stats here.

I’m also playing with Webalizer and Mailgraph to show me Apache and Postfix statistics. You can see them here and here.

A rebuild for SPEED

After recently getting my insanely fast ADSL connected last week, I wanted to rebuild Gentoo on my desktop machine. I found the document Installing Gentoo 2005.0: Stage 1 NPTL on a Stage 3 Tarball on the Gentoo forums and thought it sounded quite interesting. The document outlines step-by-step how To Build a Fast and Bulletproof Gentoo System — Stage 1 NPTL Installation on a Stage 3 Tarball Using GCC 3.4.3.

The tricky part is that GCC 3.4.3 is still marked as unstable in portage, and the live-cd still contains GCC 3.3.4. This means that you have to do a stage 3 install, then do a stage 1 again over the top (something about keeping better track of installed apps in portage) and recompiling your GCC, glibc, libstdc++v3, etc a couple of times so that you end up with GCC 3.4.3 compiled by GCC 3.4.3 (and not by GCC 3.3.4 - which is available on the 2005.0 live-cd). Also, the guide provides some pretty crazy GCC optimisation flags, which seem quite stable.

After the very long process of recompiling the GCC suite a couple of times, and using the GCC flags:

CFLAGS=”-O3 -march=athlon-xp -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -pipe”

I can notice a huge increase in speed over the old system, and it even seems more stable. Although, GCC flags like these reminds me a lot of The Gentoo is Rice page. :)

Also, I wanted to just rave about VMWare 5. I emerged the latest unstable from portage (vmware-workstation-5.0.0.13124) and it rocks! I love the new GTK2 interface, and it does some really nice stuff. One of my favourite things is the dynamic resolution of desktop size. You can resize the VMWare window, and it will automatically adjust the screen res of the OS running inside it. I don’t know if this works in Linux, but Win2k does it.
VMWare 5
Check out the screen res

I still do feel kinda dirty by having this, but I can’t seem to get around it at big T.

Gentoo graphical installer!

Who would have thought… a Gentoo graphical installer! Mick, you should have tried this before rebuilding your system :)

Gentoo Linux Installer Project Page and the mirror.

This reminds me a little of the old Mandrake installer that I was using around the v7 mark maybe? Once this installer goes mainstream, will it mean that more people will use gentoo because they were scared off by the text based install? Only time will tell.

I was just thinking about Apache web serving statistics (go figure), and had a look at my Webalizer log. My webcam snapshot which hasn’t been updated in about 3 months is the most active item. My spider senses tell me that it’s probably Mick using the GKrellKam plugin to GKrellm. Nice one bruvva :)

Linux.conf.au - Friday night le big: The aftermath

It was a HUGE night last night. I had good intentions in going to the presenations today, but it didn’t quite work out that way. I ended up getting up at about 9:00am - 9:30am and had a shower and stuff. I may have been a little sick too :(
I sat in T1 for the keynote by Eben Moglen who is a lawyer working for free software. He was a real champion. I made it about half way through, then I just had to go home. I went back to bed and missed almost the whole day after I finally got up at 4pm. Nick, a guy who we met here from Sydney said that we woke him at at 5am when we were coming home. Apparently we (probably just me) made a heap of noise. Ooops. Sorry to everyone I woke up! The four of us just got back from Hungry Jacks in Belconnen where we cleaned up with the vouchers. I feel so much better now!

Looks like we’re going out again tonight before we go home tomorrow morning. I think I might not drink tonight…..

Here’s some photos LCA2005 photos from Tuddy and Josh, if you’re interested

From the Linux.conf.au Wiki there is plenty of stuff, including some links to some people’s photo galleries. Here’s two that I thought looked pretty good.

Linux.conf.au - Friday night le big

Funny. Very funny night. Here’s a photo of me.


Horses… and more horses. Being poured into sideways glasses… and drunk by my peeps in pubs. Carlton Draught. Made from Beer. Not stolen at all from some random Irish pub in Canberra.

Also, before I got to bed (it’s currently 5:12am!!! OMG WTF BBQ!) the Cats rule for a kick ass win over Port. Boo hoo for Tredrea for not getting a free kick from Scarlett right in the last seconds of the game. Woooo hooooo my nizzle.

Next Page »