Archive for July, 2006

MacBook: Hardware Upgrades

Sunday, July 23rd, 2006

Being able to upgrade a laptop is not quite as important as a desktop, but there are still some reasons why you might want to. In the case of Apple laptops, the first reason is that Apple charges a ridiculous premium to add more RAM or a bigger HD. Upgrading from 512 MB to 2 GB of RAM costs $500 at the Apple Store, and the upgrade to the 120 GB drive is an extra $250. If you go to Fry’s, you can buy the RAM for $160 and the hard drive for $170. So here’s your hot tip: If you are comfortable assembling your own computers, buy the minimum configuration from Apple and go upgrade the RAM and HD yourself. It saved me $400.

Now, the iBook also was upgradable, but only the RAM was really accessible. The keyboard could be disengaged by twisting a screw 90 degrees, then flipping it out of the way. Underneath, you could slide out the Airport Extreme card, and finally remove 3 screws to expose the single SO-DIMM socket. If this sounds complicated, check out the more clear description at iFixIt. It is really pretty simple.

However, the hard drive in the iBook is very, very scary to replace. Check out the 17 page guide, also at iFixIt. I did this once to my iBook G3 to salvage some data from the HD after the display power inverter fried, and I can promise you that you don’t want to try this at home.

Replacing the RAM and HD on the MacBook is so much easier by comparison, as I’ll explain below:

Replacing the RAM

Access to the RAM slots and hard drive is much easier on the MacBook. First, you remove the battery. Then you loosen three captive screws that hold down an L-shaped cover that wraps around two sides of the battery compartment. On the long side, you can now see two slots, each of which holds a SO-DIMM. You can pop out the old modules with the levers, and install your new modules. Again, iFixit has a great RAM upgrade procedure with pictures. Pushing in the new SO-DIMMs requires a lot of controlled force, so I would suggest putting the MacBook on end such that you are pushing down on the module with your fingertips.

Replacing the HD

On the shorter exposed side of the battery compartment, you can see the end of the hard disk with a thin plastic tab folded around the drive. Unfold the tab, and you can pull the disk right out. The metal bracket around the disk is secured with four #8 Torx screws, so you might need to make a trip to the hardware store to pick up one of these screwdrivers before you do your upgrade. Torx screws seem to be Apple’s way of saying “not user-serviceable”, although it’s kind of silly in this case, given how easy the hard drive is to remove. Once you have your T-8 driver in hand, you can remove the bracket and place it on your new 2.5″ SATA drive, and slide it back in. iFixit has pictures of the installation, though they oddly neglect to mention the need for a Torx screwdriver.

Closing it up

Putting the L-cover back is a little tricky around the RAM slots since Apple placed some spongy foam covered in a conductive metal layer on the backside of the metal cover. The foam is designed to expand into each RAM slot to ensure the RAM is “electrically sealed” inside a good Faraday cage. I found getting the foam back into the slot to be very difficult unless I used a thin flathead screwdriver to gently push it down as I put the L-cover back into place.

What to do with the leftovers

Once I did these upgrades, I found myself left with two 256 MB DDR2 modules and a 60 GB SATA drive. Unfortunately, the RAM modules are so small in capacity (for DDR2 anyway) that it’s probably not worth reselling them on eBay. I’m going to keep them around as spares in case my new RAM develops problems.

The 60 GB laptop drive would make a nice external, bus-powered, hard drive with the addition of an enclosure of some sort. However, this is a 2.5″ SATA drive, which is still somewhat unusual. There are very few enclosures out there with a SATA (rather than IDE) interface. I also wanted an enclosure which did both USB 2.0 and Firewire 400, since USB has broader support, but Firewire has been more reliable for me in the past. This, as it happens, is nearly impossible to find. As of this writing, only the Oxford 924 chip can translate SATA to USB/Firewire, and the enclosures are $90-$100.

I didn’t want Firewire that badly, so I looked for a USB-only enclosure and found a cheap one at CoolDrives: 2.5″ Aluminum Mini Pocket SATA Hard Drive Enclosure. The price was right ($27), and I decided to skip the optional external power supply. (These faster 5400 and 7200 rpm laptop drives sometimes need more current to run than the USB bus can supply. In such cases, you would need a power brick to get the drive to spin up.)

I’m still wary of CoolDrives, but they filled my order promptly and I received it a few days ago. As far as craftsmanship goes, this enclosure is built like the free toy they put in a Happy Meal. It’s a plastic drive holder with a small circuit board that snaps (not screws) into place, and a U-shaped aluminum cover that slides over. Things (including the USB connector) just barely line up, and I discovered two non-essential plastic tabs snapped off either before or during shipping. However, it did the job, and the drive worked. Even without the external power supply, they still provided a double ended USB cable:
Double ended USB cable
The red connector goes into a second USB port to provide more power to the drive. Thankfully, I found that the Seagate 60 GB 5400 rpm drive did not need the power brick or the extra USB power connector.

MacBook: Peripherals

Friday, July 14th, 2006

The MacBook has a number of devices besides just the CPU, RAM and HD I’ve been fussing over. Some will be familiar to the iBook owner, and some will not…

The Usual Suspects

Many of the peripherals and ports are the same as before:

  • Two USB 2.0 ports
  • One Firewire 400 port
  • Built-in Airport Extreme (802.11b/g)
  • Headphone jack
  • Built-in microphone in the display
  • Slot loading optical device. (No business card CDs!)

I ordered the low-end MacBook with the Combo drive, and the tech specs say the CD read speed is 24x (same), but the write speed is 16x (double the iBook).

A Few New Things

Apple has taken the opportunity to throw in some items which are new for the iBook line:

  • Gigabit ethernet
  • Bluetooth
  • Built-in iSight camera
  • Analog microphone jack
  • Mini-DVI
  • Sudden Motion Sensor
  • Infrared sensor w/ remote

The iSight is cool, but the microphone jack is a big win for people looking for cheap headsets to do voice chat with. Analog headsets are about half the price of USB headsets, which were the only option for the iBooks. The bluetooth is also nice, though my brief experiment with a $30 wireless headset convinced me that you should definitely pay more. The audio quality was pretty bad, though otherwise incredibly convenient.

The mini-DVI connector is also an interesting development. With the appropriate dongle, it can drive a standard analog VGA monitor, one of the newer DVI monitors, or a composite/S-video output. Unfortunately, none of these dongles are included, so you will have to order the ones you want separately. ($25 normally, but $17 for educational customers)

The Sudden Motion Sensor is really a 3-axis accelerometer which is used to trigger the disk heads to park if the laptop senses it is in free fall, like off the edge of a table. This reduces the likelihood that the disk will be damaged when it hits the floor. The accelerometer is of course ripe for fun hacking, which I’ll say more about in a future post. Same for the IR remote: These two devices have interesting possibilities.

And a Missing Friend

Okay, maybe “friend” is stretching it, but Apple has finally dropped the built-in 56k modem. This is no great loss, since most of their customer base probably did the same 4 years ago. A very small external USB modem is available separately for those poor souls still stuck on dial-up.

Check Your iSight

(Har, bad pun.) The iSight is a nice addition if you’ve ever wanted to play with video chat. The camera is a 640×480 CCD in the top center of the LCD frame. Unlike the original iSight, this version has a cheap lens barely the size of a pea. Nevertheless, the picture quality isn’t bad, even in poor lighting conditions:
Self Portrait
(Click to see full size image.)

Also, unlike the original, the MacBook iSight is internally a USB device, rather than a Firewire device.

For those of you worried about the privacy issues of having a camera always pointed at you, there is a small green LED in a pinhole to the right of the lens which turns on when the camera is active. Apple, wanting to maintain some symmetry in the layout has an identical looking hole on the left side of the lens which is not another LED, but rather the built-in microphone.

The light is a very important feature, otherwise we would be reading about the new “Send pictures of you checking your email naked to everyone in your address book” virus in about 2 months. (We might anyway…) So please, pay attention to the light. :)

Revisiting The Basics

Even the keyboard and trackpad have been changed slightly from the iBook. The wider screen has allowed Apple to space out the keys a bit, and they’ve also decided to put a separate plastic grid between the keys, rather than have the keycaps taper down with nothing in between, as was done on the iBook. The new keys look like white plastic Scrabble pieces, so I look forward to seeing the first MacBook mod that replaces them with actual wooden Scrabble pieces. Hopefully, the plastic between the keys will make it harder to get junk in the keyboard, as that was pretty easy (and pretty gross) with the iBook keyboard. Although, that keyboard was easily removeable, so replacing it was an option, whereas the MacBook has the keyboard molded right into the case.

Another surprise to me was the lack of a thin foam insert between the keyboard and the screen. When I received my iBook G3 many years ago, I chucked the foam sheet and 2 years later learned why Apple had shipped with it. The keys were too close to the screen, and after carrying the iBook around, small scratches would appear on the LCD near the raised key edges. After that experience, I pretty diligently stored my iBook G4 with that foam sheet to ensure my screen was not scratched up like before. The MacBook (at least in my case) was not shipped with any sheet at all. Even if it wasn’t necessary for long term use, I expected to see something just for shipping protection. I guess Apple is pretty confident now that the keys cannot contact the screen ever.

And the last peripheral update I should mention is the addition of the two-finger slide to the trackpad (which is now wide like the screen). If you drag two fingers down the pad, the active window will scroll down. This is rather handy for browsing web pages and email. It even works on X11 terminals to view the scrollback. There are also some other tricks I haven’t tried, like doing “right clicks” with two fingers.

MacBook: Revenge of the DVD Regions

Thursday, July 13th, 2006

I hate to interrupt my string of happy MacBook stories, but not everything about this upgrade has been sunshine and rainbows. In particular I was very suprised to discover that I could no longer view Region 2 DVDs (I have some “Yes, Minister” episodes I bought in Oxford) on the MacBook. On my iBook, the usual procedure was to put the disk in, then force quit the DVD Player app when the “Do you want to change you region code?” popped up. A force-quit is required because hitting the “Cancel” button causes DVD Player to eject the disk. With DVD Player out of the way, I could start VLC and play the disk as usual.

This no longer worked on the MacBook! I tried a dozen things, including both the PPC and Intel builds of VLC, vobcopy, etc, and nothing worked. After reading some forum posts and piecing together the details, I finally discovered what happened…

In the Good Old Days (about 2 years ago), DVD region codes could be circumvented using DeCSS by reading the raw data from the disk (pretending it was a data disk) and then decrypting the video data. In essence, the region code restriction was a software limitation, enforced by “properly licensed” DVD applications. Programs like VLC which didn’t even bother to decode the DVD in the normal way were totally oblivious to any region limits.

However, DVD manufacturers were not pleased with this state of affairs. While they could not easily prevent you from viewing DVDs in your region with non-approved programs (as this would also break existing DVD players), they could prevent you from watching DVDs from another region in any player. The trick is simply to have the drive store its current region in a piece of flash memory, and refuse to read a disk in any mode, including the DVD-data mode, if the region did not match. In the case of the MacBook drive, you can see all the VOB files, but if you try to read them, you find they are nothing but zeros. I have not seen any way to circumvent this limitation without hacking the drive firmware, and no such modified firmware exists for this drive.

That leaves only an awkward solution for watching my Region 2 DVDs: rip them on another machine and transfer them to my laptop. Annoying, but effective. Never mind that this ridiculous limitation can also be “circumvented” legitimately in a normal PC by purchasing 2 DVD drives. Set one to region 1, and the other to region 2, and be done with it. As long as this is possible (and allowed), what is the point of region coding in DVDs?

MacBook: GeekBench

Thursday, July 13th, 2006

Shortly after writing the previous post, I discovered GeekBench, a cross-platform benchmarking tool. It runs a bunch of CPU and memory benchmarks, then optionally submits the results to their website. Here are the results for the MacBook running both the native and PPC version (via Rosetta), and for the iBook G4:

  • MacBook 1.83 GHz (x86) Score: 169.9
  • MacBook 1.83 GHz (PPC via Rosetta) Score: 98.2
  • iBook G4 1.2 GHz (PPC) Score: 56.5

Of course, there are lies, damn lies, and benchmarks. One thing to note is that GeekBench weights multiple core CPUs higher than single core CPUs, so the Rosetta benchmark looks much better relative to the G4 than it should. However, these results still suggest that even if you can’t find an x86-compiled version of your favorite app, it will still probably run as well as it did on the iBook. (If you have a fancy Powerbook with a higher clock rate G4, you are probably still faster than Rosetta on PPC apps.)

MacBook: Performance

Thursday, July 13th, 2006

For me, the driving reason to upgrade from the iBook was performance. I didn’t want a bigger screen, an iSight, or even gigabit ethernet (though I will happily accept all these things now that I have them). But the 1.2 GHz G4 really dragged when compiling and running the analysis code I use on a daily basis. On top of that, the iBook had become my primary desktop machine both at home and work, so at any given time I would have Mail.app, Adium, Safari, NX, Preview, and several X11 windows open at the same time. The little iBook struggled to keep up, but ultimately was underpowered for what I wanted to do.

Now, the first rule of OS X “performance tuning” is: When in doubt, add more RAM. MacOS X is a memory pig, and Apple’s minimum memory configurations really are just that–the minimum needed to make the machine run reasonably. In every instance I’ve tried, upgrading the memory has made the computer seem like a whole new machine. On my previous iBooks (G3 and G4), I maxed out the RAM (640 MB and 768 MB, respectively) and it made all the difference. Unfortunately, I discovered that I needed even more RAM in the G4, and that was just not possible.

So it was time to start looking at a new machine. The MacBook wins on both fronts: two 1.83 GHz Intel cores, and a max memory configuration of 2 GB. The CPU upgrade really is impressive. From benchmarking my analysis code, one 1.83 GHz Intel core runs at about half the speed of one 2.2 GHz Athlon64 core running 64 bit code. Not bad for something I can carry around. There were other non-quantitative signs of speed improvement as well. Both Safari and Mail.app were much more responsive. I can finally render the Newegg homepage in less than 5 seconds.

As for the memory side of things, I received my MacBook in the minimum configuration of 512 MB (2 x 256MB DDR2-667 MHz). This was actually less memory than the iBook had, and it showed. Once I started up my usually working set of programs, the whole machine started to drag. In the System Preferences (after you install the CHUD tools from XCode), it is possible to put a CPU control in the menu bar and open a processor palette that looks like this:

That picture is from when I was writing this post, so it is pretty boring. When I was testing with 512 MB, I could see that the CPUs were underutilized because of the swapping required to cope with the lack of RAM. I was able to put up with this for about 2 days, and then went down to Fry’s and purchase 2 GB (2×1GB) of memory that was on sale for $160. It made a huge difference. Finally, I had enough space to hold everything in memory and keep both cores fed 100% of the time, if necessary.

The third, less talked about, performance improvement in the MacBook is the move to 5400 RPM SATA hard drives. I/O on the iBook with its 4200 RPM drives was terrible, and so things are much better with these new drives. I don’t find myself waiting for disk access as often. Plus, with the screwdriver-accessible hard disks, it will be easy to replace the disk with a 7200 RPM model or with these new hybrid magnetic disk/flash memory devices coming out soon.

(Addendum– I forgot to mention the biggest win from the 5400 RPM disks: Spotlight finally runs well. On a full 80 GB disk, Spotlight crawled on my iBook. I would frequently have to wait 10-30 seconds to get results for an obscure search. Now I can see results in 5 seconds or less sometimes!)

Entries (RSS)