Wednesday, September 26, 2007

Vesa Driver on the T60p (aka the hell of fglrx)

So, I'll admit I like to futz with the software on my machine. If I didn't things probably would work more reliably. But I'm an admitted linux nerd, and like most of this kind, I am a tinkerer. I've been running linux as a workstation for 8 years. I have tried every window manager there is. blah blah blah.

So I upgraded my Ubuntu feisty system to gutsy - primarily because I wanted some crypto support. Things were going pretty well during my piecemeal aptitude installs. I don't do wholesale upgrades to unstable anymore - I've learned that much. Anyhow, so I upgraded xorg, rebooted and shocker! - X failed to start. A nice ncurses window tells you nicely that X didn't start, and then drops you to a TTY.

So I log in, and since I've had generally torturous experiences before with the Ubuntu-shipped fglrx drivers (fglrxinfo showing Mesa, things generally sucking...) I ran the to install ATI's (which was working fine before I'd upgraded xorg). So I fire up gdm, and KAAABLAAM - backlit screen of death.

The keyboard seems to be working though - my function actions generally seem ok (screen dimmer, that dumb little keyboard light that makes the ThinkPad seem like a Neanderthal compared to the Mac, etc..). But I can't Ctrl-Alt-F1 to a TTY. Crap. Ctrl-Alt-Delete works apparently, as I'm suddenly rebooting.

Say hello to the automatic starting of X/crashing of X (and rendering useless of this laptop). Seriously frustrating. I try logging in during that brief window of time before X starts and killing gdm as fast as I can about three times. Impossible. So I boot into single user mode via grub. It asks me for the root password for maintenance. FUCK. I do not know root; I have been religiously using sudo.

I close the lid very hard and grit my teeth. I am seriously pissed now.

init=/bin/sh is your friend (Ilya's mine, as he helped me on the busride home). "mount - o remount,rw /" works, and I remove the rc2.d symlink that's starting gdm and ruining my night. I boot up, and run the /usr/share/ati/ script that I can only find after running updatedb. It seems like it would be a handy thing to mention in the installer, or to make as a switch to the installer. It clears my xorg.conf file of all things fglrx. Hmm. I'd planned on just trying again with the Ubuntu fglrx. Ok, to hell with it, I'll start up with the "vesa" driver. Unfortunately, it put me in 1024 resolution at first and things looked crappy. So I manually added my 1450 resolution to the modes line, and although Xorg.0.log had said that mode wouldn't work, voila it does. Only someone who'd been in this realm of hell many times before would even have tried this.

Things look incredibly good with the latest vesa driver. International fonts have depth where they previously looked flat. My gnome-terminal is transparent. vmWare runs much faster. The icons in my window manager look crisper. I wasn't using anything that needed 3D before anyways, so if that's the only thing I'm missing, um - who cares?

Suspend works. I haven't owned a laptop running linux that worked with suspend since back in the days of apm. And at that time, the laptop I had needed ACPI in order to work at all. So I've never had suspend working on a laptop is what I'm saying. I am thrilled. I hadn't considered the vesa driver prior to - I'd tried the open source ati driver, but it doesn't work at all with the laptop chipset.

Maybe now that AMD has bought ATI, and pledged to give up the magic so that a working open source driver can be built, this situation will improve. I am not holding my breath though - for now I have vesa.