Monday, March 9, 2015

On Not So Old Computers

Maybe it really is an old system, but I still don't consider a system from 2005 to be that old.  In particular, the Power Mac G5.  The last workstation system from Apple that used the PowerPC line of processors.  Apple began a move to Intel processors in 2006.

A had a Power Mac G4 for about 3 years and used it as my workstation at home during that time.  It was a dual processor system and worked quite well.  I did not buy a G5, but always wanted one.  I moved away from PowerPC systems after the G4.

Recently I picked up a dual processor G5 on eBay and have been getting it up and running again.  These things sell for a couple hundred dollars on average and may or may not need some parts to get it going.  They can use USB keyboards, mice, and LCD monitors.  You may need a display adapter as the default graphics adapters spoke DVI.

As I have been working on this system, I have hit a number of hardware problems that I forgot that we used to deal with.  Maybe newer systems have spoiled me, but even just 10 years ago we had somewhat more irritable systems.  Granted, this is Apple-specific, but Apple is not uncommon.  Here is a list of now oddball things I have dealt with in this G5, each reminding me that computer hardware has improved and we don't have to deal with a lot of this stuff anymore:]
  • The battery died.  Macintosh computers from basically the beginning up until the switch to Intel processors used a half AA size 3.6V lithium ion battery, for a more technical name it's the ER14250.  It's called half AA because it's the same diameter as a AA battery, but about half the length.  These are common enough to be able to find at electronics stores and on Amazon, but not common enough to be able to buy amongst batteries at any major retail store.

    The battery is used to back the NVRAM which stores settings for the firmware. At least in the Power Mac G5, it sort of maybe controls the SMU which is the replacement for the PMU (power management unit) in previous models. I find the PMU interesting because it's an embedded computer based on a 6502 microprocessor and controls the NVRAM and ADB (Apple Desktop Bus) for on-board ADB peripherals. The 6502 was the same processor used in the Apple II line (but not the IIgs), but now in the Mac it's been reduced to a very small embedded computer to run stuff for a larger computer. Heh.

    Battery death on Macs was common before the Intel switchover. Owners of systems would be surprised to find the system not working properly after 5 or more years, only to call 1-800-SOS-APPLE and be told to order a $30 or so battery. I think Apple made the battery choice so it would provide enough power for all system types they might make and on the assumption that customers would be buying a new computer before the 5 year mark. Well, not when you charge Apple prices I guess.
    This size battery is still readily available for a few dollars. I bought a four pack on Amazon because it was the smallest quantity that was eligible for Prime.
  • The hardware clock recorded garbage. Related to the battery death problem. Once the battery was not useful, when the system tried to store the system time to the hardware clock (NVRAM), it failed. But that failure also wrote garbage to the NVRAM. Once I replaced the battery, restoring the clock caused it to reset to some time in 1978. Even the system clock was resetting automatically after I reset it using date(1) or ntpdate(8). It was incredibly strange, but I eventually got past this hurdle through various combinations of erasing NVRAM settings, resetting the SMU, unplugging the system, and using a more recent OS to force the hardware clock value back to something usable.
  • The SATA cable for a second drive was broken.  This was just an unfortunate side effect of it being a second hand system.  The drive connector appeared to have gunk stuck in it.  I can probably find a replacement at work or just order a new one.  At least this part is standard, though I have to thread it through the beautifully designed interior of the G5 tower and hope I don't break something.
  • My replacement SATA drive was not recognized.  Here is another gotcha for G5 owners.  The system will fail to recognize a SATA disk that is not forced to operate at 150 MB/s.  Now how do you force the disk to operate in that mode?  A jumper.  Yes, a jumper.  In 2015 it seems there are cases of jumpers still being required in some corner cases.  So corner, in fact, that the disk does not come with an unused jumper meaning I had to find one somewhere.

    There is no error message here either or a failure to boot. It just doesn't see the disk. At all. So your first thought may be that the disk is dead.
The system is now up and running, though I am now experiencing the fun of figuring out the magic kernel boot parameters to make sure the ATI adapter works correctly. So far I've passed radeon.agpmode=-1 to the kernel and that at least gets me console support. X doesn't like that though. Oh well, it's an older system but one that I can get working eventually.  I am glad that current hardware is a little less picky about itself.

And some other notes I've collected:
  • If using a non-Apple keyboard, the Apple key is the same as the Windows logo key.  The Option key is the same as Alt.
  • If using a non-Apple mouse, the left button is the same as the single button on an Apple mouse.  Common mistake is to use the center button.
  • Hold down Option (Alt) to get a firmware boot menu.  It's graphical and presents icons of bootable volumes found.  It will scan for a while and display a wristwatch mouse pointer, but it is working.
  • Apple+Option+O+F gets you in to Open Firmware.  Hold this sequence down on boot up and don't let up until after the chime.  Or keep pressing it repeatedly like you're hitting a chord on a piano until you see the Open Firmware interface.
  • eject from an Open Firmware prompt ejects the optical drive.
  • mac-boot from the Open Firmware prompt boots the system in the Mac-specific way (i.e., searching for a bootable volume).
  • Pressing and holding the mouse button while the system boots up may eject the optical drive.  I dunno, doesn't seem to on my system though people online claim it works.  May be OS-specific, not firmware-specific.
  • Resetting the clock in Open Firmware is possible with the decimal dev rtc sec min hour day month year set-time command.  The values given need to be UTC.
 With the issues I've encountered with this system, I am glad I bought a tower rather than a Xserve G5 system.  It's at least a little easier to work in.