For those of us using a scanner, fax or other multifunction device from HP, we are cursed by its buggy communications daemon process known as "HP Communications." It is normally well-behaved, but it can be very grumpy when unexpectedly aroused from a nap :-) [i.e. sleep mode]. Running Panther, after wake from sleep, it sometimes maxes out CPU usage and renders the HP device unusable. Either reboot or try the following...
- Install Bernhard Baehr's excellent Sleepwatcher (credit to this hint). And credit here for scripts.
- Create the the below .sleep and .wakeup shell scripts by copying text into Terminal. Here's .sleep:
#!/bin/sh
#
# sleep: kill HP Communications process
#
kill -HUP `ps axwww | egrep -i \
"/Library/Printers/hp/HP Communications.app" | egrep -iv \
"egrep -i" | awk '{print $1}'`
And here's .wakeup:
#!/bin/sh
#
# wakeup: start HP Commmunications process
#
open /Library/Printers/hp/HP\ Communications.app
To enter these easily, open the Terminal, type cd and hit return (to make sure you're in your home directory), then type cat >.sleep, and paste in the above .sleep script, then type Control-D. Do the same for .wakeup. Then set both scripts executable (via chmod 755 .sleep or .wakeup).
- HP Communications shuts down on sleep, and restarts when you wake.
That's it, though more tweaks may be needed in a multiuser environment, probably moving the code above to
/etc/rc.sleep and
/etc/rc.wakeup as root. See Sleepwatcher for more info.