SL, 64 bit Linux, SATA, and pain
This is a story of how being a perfectionist is simply a polite way of saying ‘masochist’, in three simple steps:
- Build yourself a new pc
- Use a free operating system set up to take advantage of the new hardware
- Run the Second Life viewer on the new system.
Taking one step at a time…
-
1. Build yourself a new pc
My old pc was getting long in the tooth. It worked well enough, but at three years old it was showing its age. A couple of the fans were worn out. Compared with more recent machines, the graphics were noticeably sluggish. So, on the face of it, I convinced myself I had a reasonable case for buying myself a new pc for my birthday.
It would be fair to ask ‘why build it yourself’, when Dell will sell you something similar for not much more, and with a warranty. I have no answer to that, except to say that I like the challenge of building things – and for me, that’s a good enough reason. It’s a good feeling, once you’ve put everything together and powered it up, and it looks good, and it all works. I can say ‘I made this’ with a degree of pride. In all honesty, it’s not all that difficult to build a pc, but the feeling of achievement is genuine. It also impresses my friends.
If you’re going to build a pc, you may as well build one with an eye to the future. My philosophy is this: aim to build a system that would have been bleeding edge four to six months ago. It’ll be almost exactly as good as the current bleeding edge, but the components will have had a degree of reliability testing (stores will de-stock items with high failure return rates), and drivers will have bedded down and be on their second or third release iteration (though that’s more relevant to the motherboard BIOS, and drivers for Windows systems – few manufacturers fully support Linux drivers), and it’ll last a good while. Not least, the price will have lost its ‘bleeding edge’ premium, so the whole thing will be more affordable.
So that’s what I did. Nice new Phenom II, ASUS motherboard, 4Gb of 1600 MHz ram (a luckily timed half-price offer), two sata hard drives, a sata CD/DVD, and a BFG nVidia GTX260 graphics card. Oh, and a quiet power supply and a quiet well-cooled box to put it all in. Three hours later, I have a nice black box and a room full of cardboard and polystyrene. And some cables left over, to add to my cables-left-over collection, sad tart that I am.
-
2. Use a free operating system set up to take advantage of the new hardware
For many people – most people, probably – this takes some explaining. Why use something like Linux, when almost everyone else uses Windows? I’m afraid I’ll disappoint the Linux evangelists by saying I’m not a purist FOSS addict. I use closed source drivers, for example. But my reasons are fundamentally philosophical rather than technical. I simply don’t like the Microsoft monopolistic one-size-fits-all business model.
It’s also a part of the reason I build my own pc’s. With a few limited exceptions, if I buy a ready-built pc, I either have to pay Microsoft for their OS – whether I want it or not – or I have to stick to the hardware selection made by Apple. I’d like to be able to try Apple’s BSD-based OS on my pc at some time, but Apple don’t really want my business (which is a choice they’re probably sensible in making, given the ensuing customer support pain and loss of brand cool they’d inevitably suffer).
In practical terms, my philosophy (doesn’t that sound grand ?) has limited me to using a flavour of Linux, or BSD Unix. And I’ve been using Linux since RedHat 5-ish (I think it was). Of necessity because of hardware and software support, I used to dual-boot between Windows and Linux, but for the last three years I’ve used only Linux.
So.. new box, nifty quad-core 64 bit processor, all-new sata drives, and a free OS ready to go. No problems.
Oh wait.
I started with 64 bit Ubuntu. I’d used Ubuntu for a year or more, mainly because I got bored with the chore of keeping my Gentoo distro up to date before that. Partly, also, because the in-fighting in Gentoo at the time was sapping the life from the project. Gentoo limps on, but it’s a shadow of what it was, I think. And Ubuntu is out-of-the-box guaranteed pain free, right ?
Oh wait.
32 bit Ubuntu 8.10 was pain free on my old box. It niggled that I could only use 3 Gb of the 4 Gb that were installed in it though (that’s down to memory addressing in 32 bit systems, not down to Linux). 64 bit Ubuntu 9.04 installed sweetly enough. Everything looked good, and I was happy. I even had SL running (more of that in a while). Then I tried to rip a CD to my hard drive.
I think it was Seasick Steve’s “I started out with nothing and I’ve still got most of it left”. I’ve bought three copies of that CD now – one for me, and two as presents for friends – I absolutely would not, ever, countenance ripping off copyright material, whether it’s music or DVD’s or software. The physical CD is sitting on a shelf above my pc, and I’m listening to it from my hard drive. It’s more practical for me, and the record company and artist still get rewarded for their work, just as though I was playing the CD itself. You’d be surprised how many believers in free software are equally vehement about protecting copyright. Free software means free as in free spirit, not as in free beer (as the saying goes, roughly). But I digress.
I tried to rip Seasick Steve to my hard drive, only to find that my shiny new optical drive – one that can supposedly write DVD’s 22 times faster than you can watch them – could barely play an audio CD without skipping. After much googling, it appeared that other people has seen this sort of problem in 64-bit Ubuntu all-sata systems. I tested every permutation of BIOS setting possible, to no effect. Since the problem seemed to be that the Ubuntu stock kernel was attempting to use two drivers for the same piece of hardware, I thought I’d attempt to compile my own kernel. It used to be an everyday activity in Gentoo (literally every day for a while, actually). Ubuntu was originally designed to make custom kernels difficult to make (for reasons relating to technical support, I think), and although it’s no longer frowned upon quite so sternly, it’s still a pig of a thing to do. I gave up. Some people suggested Fedora didn’t have these issues with their stock kernel, so I downloaded it.
It was true. I could rip poor old Seasick Steve at a phenomenal rate using Fedora 11. It even looked quite pretty, and the install was painless and slick. The desktop was neat and well thought out, too. Then I tried running the Second Life viewer. Which brings me to…
-
3. Run the Second Life viewer on the new system
The ‘official’ sl viewer is a 32 bit application, a pre-compiled binary program. It needs a 32 bit environment to run in. Now, Linux distributions tackle running 32 bit applications within a 64 bit environment in one of three ways. They provide a set of ‘compatibility libraries’, or they duplicate a 32 bit environment side-by-side with the 64 bit environment, or they don’t really bother at all. I’m simplifying, but that’s the essence, I think. Fedora 11 tries to run 32 and 64 bit environments side-by-side. If you know this, you install the 32 bit graphics drivers to support the sl viewer. If you don’t know this, you spend several hours scratching your head, and wondering where you screwed up. Sadly, I was in the latter camp. Eventually, after much fiddling and installing the right libraries, and deleting the libfreebl3.so library from the secondlife-xxx/app_settings/mozilla-runtime-linux-i686 directory (so that sl is forced to use the native version, which works), I had 32 bit sl up and running in Fedora 11.
It would be nice to run it as a native 64 bit application though, right?
Wrong. There’s a great project – omvviewer – aimed at building a true 64 bit sl viewer. You can install it on 64 bit Ubuntu, and it works well. Very well. But there’s no pre-compiled binary for Fedora 11. No matter – it can be compiled easily enough from the source, right?
Wrong. Try as I might, even hacking my way around the labyrinth of makefiles, I couldn’t get the thing to compile. One library or another was missing. In the end, I gave up. I thought I’d give openSUSE a try, because of the different way that distro handles 32 and 64 bit environments (more along the compatibility library route).
Bad move. It soon became clear after installing openSUSE that I wasn’t going to get along with it. It didn’t help that the install didn’t recognise my graphics card, so SUSE and I got off to a bad start. In the end though it was a personal thing. It just felt uncomfortable, if that means anything. No matter. I’d try Arch Linux, since there was (sort of) a version of omvviewer in the Arch Linux repository.
Arch Linux is a minimalist thing, similar in character to Gentoo, but without the compile-it-yourself paradigm. It looked promising. Unfortunately, the version of omvviewer in the repository wouldn’t compile for me (and I was losing the will to live at this point). Not only that, but Arch sort of falls in the third category of 32 bit support methods. That’s the “don’t bother trying” category. Well, that’s not quite true. I tried. Unfortunately, though, I couldn’t get past one missing library – again.
So I threw in the metaphorical towel, and went back to Ubuntu.
One day, I’ll work out how to properly fix the broken sata CD support. Or someone else will. It can’t be hard, and it’s most likely the result of a poor set of kernel configuration choices, given that every other Linux flavour seemed to manage the CD ok. I rarely copy CD’s to my hard drive, so if I have to, I’ll let it take an age. Bizarrely, burning data backup DVD’s on the same drive seems not to be a problem.
At least for now, I’ve got a choice of running 32 or 64 bit sl viewers, very fast indeed, on a shiny new box I built myself.
This whole episode is a little bit like climbing Everest, I guess. It’s hard work, it’s a challenge, there are highs and lows on the journey, you feel a sense of achievement, but… when it’s all over, you’re right back in the foothills where you started. Luckily, I quite like foothills.