It seems to be a commonly experienced problem with the Intel
rendition of OS X 10.4 that some power management settings, such as the
halfdim pmset parameter (a.k.a., “automatically reduce the
brightness of the display before display sleep”) may be reset when the
system boots. Since I started dual-booting Vista my reboots have
increased from about once a week to a few times a day, so I decided to
tackle this annoying little bug with a StartupItem.
Here’s how to do it. First, make a directory named PMSetManager in
/Library/StartupItems. Create two files in this new directory,
StartupParameters.plist and PMSetManager, with the specified contents.
/Library/StartupItems/PMSetManager/StartupParameters.plist:
{
Description = "PMSetManager";
OrderPreference = "Late";
Provides = ("PMSetManager");
Message =
{
start = "Starting pmset manager";
stop = "Stopping pmset manager";
};
}
/Library/StartupItems/PMSetManager/PMSetManager:
#!/bin/sh
# pmset manager
#
# Resets the 'halfdim' pmset parameter to false
# on reboot, in order to counteract what appears
# to be a bug on OS X 10.4.
. /etc/rc.common
StartService ()
{
if [ "${PMSETMANAGER:=-NO-}" = "-YES-" ]
then
ConsoleMessage "Starting pmset manager"
pmset -a halfdim 0
fi
}
StopService ()
{
ConsoleMessage "Stopping pmset manager"
}
RestartService ()
{
StopService
StartService
}
RunService "$1"
(The pmset command in this script can do more than …
Read more…