Skip to main content.
16 November 2005

Quieting a Mirrored Drive Door G4 with CHUD

posted 6:30 AM UTC in Apple

This hint posted yesterday at MacOSXHints discusses using Apple’s CHUD Tools to disable the processor “nap” feature of a G5. (No, not those CHUD tools.)

I’ve actually been doing this for a while on our Mirrored Drive Door G4 Power Mac, but in reverse; by enabling processor nap, I’ve been able to get the computer to run significantly quieter than normal, to the point where it is almost as silent as an original G4 tower. You see, the MDD G4s were notoriously loud computers, so much so that Apple essentially over-engineered the G5 case to run super-quiet. (Which, in all honesty, it doesn’t. But that’s another story.)

Anyway, by using hwprefs to turn napping on, the G4 runs much quieter. Because it’s running as a server, and because we don’t have a dedicated server room in the house — yet! — it’s important that the machine not only run quiet, but do so without manual intervention. So I turned it into a StartupItem, as shown below. (The server runs 10.3, so I couldn’t use launchd.)

First, I created the folder /Library/StartupItems/Nap and added two files to it. The first one, also named Nap, is the script that runs at startup. It’s based on similar system-level scripts located in /System/Library/StartupItems. (Don’t forget to make it executable.)

#!/bin/sh

. /etc/rc.common

##
# Put the processors into nap mode (requires CHUD v3.5.2)
##
if [ "${NAP:=-NO-}" = "-YES-" ]; then

	ConsoleMessage "Starting nap service"
	hwprefs cpu_nap=1

fi

Note that the script really should test to see if hwprefs exists as a command; it’s not a fatal error in this case, but it is a best practice.

The second file is the StartupParameters.plist file which tells the system how to load the Nap script.

{
	Description     = "Nap";
	Provides        = ("Nap");
	Requires        = ("Disks", "Resolver");
	OrderPreference = "Last";
	Messages =
	{
		start = "Starting Nap";
		stop  = "";
	};
}

Next, I added a line to the /etc/hostconfig file, to control whether the script runs at startup or not.

.
.
.
WATCHDOGTIMER=-YES-
FTPSERVER=-NO-
ARDAGENT=-YES-
LDAPSERVER=-YES-
MYSQL=-YES-
# user defined below
REBOOTNOTICE=-YES-
NAP=-YES-

(REBOOTNOTICE is for another startup script I have that emails me whenever the server restarts. I’ll write that one up later, perhaps.)

Anyway, with this mechanism in place, I’ve managed to get the MDD to a tolerable noise level, and I haven’t seen a dramatic performance differential.

As noted in the script, this relies on an older version of the CHUD tools; version 4 and later appear to have removed the ability to set processor nap on G4 processors. Also, not every MDD will respond happily to the nap setting; although it works fine on our dual-processor 1 GHz model, it crashes an identical model at work. Still, if yours responds successfully, and you’re frustrated by its sound output, this might be worth a try. (No support express or implied, etc.)

none

No Comments »

Follow any responses to this entry through the comments RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

You must be logged in to post a comment.