Not too long ago I wrote a how-to article on how to get FreeBSD 7.0 working on my IBM Thinkpad T40. Among other things, I omitted a section on getting proper video drivers working. The graphics chip is an ATI RV250 (Mobility 9000). This means the driver you should use is the 'radeon' driver. Use 'pciconf -lv |grep ATI' to see which chip you've got. After toiling a bit with it, I figured out how to get the Open Source ATI drivers working.
Because I want to generally keep my systems pretty current, I recently installed FreeBSD 7.1 on my T40. It's important to know that the FreeBSD project generally breaks up development into three separate releases, namely CURRENT, STABLE, and RELEASE, in order of most bleeding edge to most stable. After building Xorg 1.6.0, I tried to start an X session just to see if I would get the ugly TWM desktop. To my surprise I got just a black screen but that was it. Even more surprising was that the usual "three finger salute" (ctrl + alt + backspace) didn't kill my X session. I then hit 'alt + F2' to log into another vty and manually kill off X. Here's where the fun began. It killed more than X; it locked my entire machine up. I continued futzing with my xorg.conf, kernel modules, and locking my system up for a good hour. I then threw in the towel and wound up asking a friend who's a FreeBSD developer WTF was going on. I learned a few interesting facts:
- The DRM code in 7.1 was more than 2 years old
- It is not necessary to manually load or pre-load any kernel modules for video
- X.org should work well with ATI graphics cards (but the amd64 release may not work) since the ATI driver model has had substantial structural changes to it.
On the first point, there's two ways around the old code: Either download/burn/install the FreeBSD 7.2 release candidate or rebuild world. Since I'm a glutton for punishment, I decided to rebuild world. It's not actually that hard, just time consuming. Use the 'csup' utility to grab the entire CVS source tree from your nearest csup server and follow the directions listed here to rebuild your system using the RELENG_7 tree.
The second point is easy enough. There's no need to add anything to your /boot/loader.conf file in order to get X working. X.org will load any necessary kernel modules when you type 'startx'. As an interesting aside, I actually locked my system up when attempting the unload the radeon.ko kernel module when I had learned that preloading isn't necessary. Doh!
Once you've rebuilt your system and are running 7.2-STABLE, it probably wouldn't be a bad idea to rebuild your installed ports. This isn't necessary per se since X.org should work without even building a config file, but it is a good step, just to make sure everything is up to date. I use the portupgrade utility located in /usr/ports/ports-mgmt/ with the following: portupgrade -aRr. That should upgrade all outdated ports recursively as well as recursively rebuilding dependencies.
I'll expand on the last point a bit. ATI has been much more generous with contributing documentation to the Open Source community than Nvidia. In fact, Nvidia hasn't contributed anything other than a proprietary driver for Linux and FreeBSD, though there's a project called Nouveau which aims to build an Open Source Nvidia driver. Because of this, FreeBSD has an Open Source ATI driver (/usr/ports/x11-drivers/xf86-video-radeonhd and usr/ports/x11-drivers/xf86-video-ati) and using the old proprietary fglrx driver is no longer necessary. There's one hiccup to this though. The driver has to be re-worked every time a new ATI chip comes out. To solve this, ATI is moving towards the same unified driver model Nvidia has used for years and taking it a step further. They now have an Open Source BIOS abstraction layer called ATOMBios. The idea is to make it easier to more rapidly deploy drivers for new graphics cards. Read all about that in this article. Bravo ATI!
By the time you finish reading this, your ports should be up to date and you should be able to use hardware accelerated ATI drivers on your Thinkpad. I'm running XFCE4 on my Thinkpad and it's causing me to reevaluate the old "FreeBSD vs. Linux" question. Maybe I'll spend a little more time working on the other parts that I overlooked in my article.
I know, I know... why am I using a proprietary Unix after singing the praises of Debian GNU/Linux and dumping Mac OS X? Why the heck not? I love tinkering and experimenting with stuff. Besides, it wasn't terribly difficult to get Linux working on my Sun Ultra 1 Creator.
So why bother with proprietary Sun hardware at all? Because it's CHEAP and loads of fun to tinker with. Since the dot com crash of 2000, there's a plethora of Sun hardware to be found at very reasonable prices. My Ultra 1 Creator listed for $27,000 when it first came out in 1996 but I got it for FREE on Craigslist.
Since I got this machine free off Craigslist, and it did come with all the Solaris media (and then some), I have tinkered with it in several ways. When I first brought it home and booted it up, it had the 64-bit version of Solaris 9 on it. I've never really cared for Solaris (some call it Slowaris) so the first inclination was to install FreeBSD. I got that installed without any problems, including X.org, etc... Yawn. Now on to Linux. My first inclination was to try Gentoo but I gave up on it since I couldn't get the kernel to compile no matter what I tried.
Next I looked around to see which other Linux distros support UltraSPARC hardware. Since I'm particularly fond of Debian, I naturally jumped in that direction. Getting the current stable (Etch at that time) Debian CD to boot turned out to be a major drag since it would continually freeze when trying to load the SCSI driver, a known bug in the installer. For kicks, I decided to see if a network boot would get me where I wanted to be. Sure enough, after setting up a RARP and TFTP server, the installer went flawlessly when using the Debian "Testing" image.
But even that got boring. So now I decided to get Solaris installed again. Not only that, I want to get the 64-bit kernel booting. It turns out this is more of a challenge than I thought.
To begin, I put the Solaris 9 installation CD in the drive and boot up. If you're wondering why I don't use Solaris 10, that's because it isn't supported on such old hardware. The first hiccup I run into is the screen warning me that a 64-bit OS is installed but that the installer will boot into the 32-bit SunOS kernel. Not a big problem. When I see the "Initializing Memory" screen, I hit Stop + A to drop to an Open Boot PROM screen. At the "ok>" screen, I type "boot cdrom kernel/sparcv9/unix" and hit enter. Sure enough, it boots the 64-bit kernel.
Now for the next hiccup. When the installer starts, you eventually wind up in a small xterm-ish console and it asks you if it can repartition the hard drive so it can place some temporary installer files on the hard disk. Most users of modern operating systems have come to expect that the OS will just ask you if it can erase what's already there and move on. Not so with Solaris. It will warn you that it can't partition enough space from the available free space on the drive. So now what?
I wound up bailing out of the installer with a Control + C and got dropped to a root prompt. Remembering another time I had to use a new disk in Solaris, I entered the format command to start that utility. I formatted the drive, gave it a label and rebooted. This time it worked. However, when I got to the section of the installer where you actually install the Solaris software, my CD drive starting acting up so I couldn't complete the install. I'll come back to it later I suppose. I guess free hardware comes with a price?