More of the Same -> Reinstall

I’ve reinstalled Leopard - hopefully that will fix the problem I was discussing yesterday. I really don’t know if it’s a software or hardware issue, though.

Getting rid of the cruft I had installed seems to make my machine boot up a whole lot faster, but.

Close to Danger...

Something almost bad happened to my MacBook Pro today.

I’d been using the machine all day, on and off, on both battery and power. I showed some code to a lecturer, and then closed my laptop and moved to another lecture theatre. It was there that, after about half an hour, when I was bored, I decided to open my laptop and check my email.

Screen was black. I’ve had some issues with the graphics card not always working properly (it’s related to a garbage display when scrolling issue), so I thought that might have reappeared. I don’t remember why, but I pressed the power button. I wasn’t expecting anything (if the display was disabled, then at most I should get a beep).

The screen came on (or, as I later figured out, the whole machine came on), but the display was overlaid with a pink pixelated pattern. Initially I thought something was odd, and I force-restarted it, since it didn’t appear to be responding.

The next time it booted up, it had the same pattern. Leaving it a little longer, I noticed that it displayed the grey screen with the darker apple logo, and the spinner underneath. After about a minute, it had a kernel panic.

Restarting it always had the same result. Zapping the PRAM, resetting the SMC, booting off a system DVD all had the same result.

I even tried swapping out the RAM, but nothing looked to fix it.

Finally, I tried booting up in safe mode. ⌘S will do this, and when this kicked in, the screen turned black, as expected. The areas that were pink now turned green. I got to a command prompt, but when I typed “exit” to continue booting, it seemed to hang on the WindowServer loading. (I must confess I restarted quite early, since I wasn’t having any keyboard response, even though it may not respond at this point).

Same deal for Verbose mode (⌘V). Stuck at WindowServer.

Rebooting again in Safe mode, I did an fsck -fy. About halfway through this I noticed that the text that was appearing was overwriting the green graphics glitches. When it completed (and it did find one error), I restarted, and the machine appears to be back to normal.

I wouldn’t have lost much data (I do have backups), but I would have lost work time. Or blogging time, or whatever!

Postscript: Interestingly, checking the panic.log shows me that it was WindowServer that was causing the panic. I don’t know why, but I hope it ceases to occur!


Dear Apple,

Please send me the battery that you said you would. I’m not really liking when I see this:


That’s not much fun at all.



New MacBook Pro Battery

My battery performance had turned decidedly poor, so I arranged for a replacement (free of charge) through Apple.

It arrived today.

Here are the last few days worth of battery reports from Coconut Battery. Can you tell which is the new battery?


Laptop Blues

My laptop hasn’t been much of one lately. The screen (or perhaps the inverter) seems to be on the way out, and I lose picture from time to time. What it is outputting is fine on the external display, but it’s like the backlight is on (I can change the brightness, and see the “black” of the LCD change), but noone is home.

I was tempted to take it in for repairs, but then tonight opened the lid again (I’ve been running with it closed), and the picture came back.

I’m thinking I might crack it open and check that the cables are all connected. I don’t fancy paying $75 for some monkey to do just that…

Update: Apple has announced these models are eligible for free repair, even if out of warranty.

DoubleCommand and multiple keyboards

I love my MacBook Pro. But not everything about her.

For instance, I despise that there is no forward delete key on the inbuilt keyboard. But using DoubleCommand you can fix that. You can also make the fn key act like control (I’m always hitting fn-C instead of Ctrl-C to kill a thread, for instance), and a whole lot of other changes.

But if you remap the small enter key to forward delete (which I highly recommend), if you plug in a USB keyboard, then the keypad’s enter key will also be mapped to forward delete. Which is not cool.

The latest SVN version of DoubleCommand has the facility to fix this, but it requires a bit of terminal work to set it up.

If you haven’t got a newish version (~1.6.6), first, check out the latest code:

$ svn co doublecommand

The code we want is in trunk/kext. Open the project inside that folder. Build the project, and then enter the following command from inside of the build/ subdirectory:

$ sudo cp -r Default/DoubleCommand.kext /Library/StartupItems/DoubleCommand/DoubleCommand.kext  

Enter your password when requested. Then change to the DoubleCommand installation directory:

$ cd /Library/StartupItems/DoubleCommand  

We need to unload and then load the kext. The easiest way is using the following commands ($ means type it in, > is the output):

$ sudo ./DoubleCommand stop  
> Unloading DoubleCommand  
> kextunload: unload kext ./DoubleCommand.kext succeeded  
$ sudo ./DoubleCommand  
> Loading DoubleCommand  
> kextload: ./DoubleCommand.kext loaded successfully  
> dc.config: 0 -> 1593344

Take a note of that last number, and then perform the two commands:

$ sudo sysctl -w dc.keyboard1=37
$ sudo sysctl -w dc.config1=<the_number_above>

Now, load up the DoubleCommand preferences pane, and disable the ‘Enter key acts as forward delete’, or whatever you had it acting as. Now, the two keyboards will appear differently in behaviour. And hopefully your life will be fuller.

Many thanks to the developer, Michael Baltaks, for his quick response and assistance in this matter.