Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Make HP Communications work with sleep in 10.3 System
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...

  1. Install Bernhard Baehr's excellent Sleepwatcher (credit to this hint). And credit here for scripts.

  2. 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).

  3. 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.
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[12,509 views]  

Make HP Communications work with sleep in 10.3 | 9 comments | Create New Account
Click here to return to the 'Make HP Communications work with sleep in 10.3' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Make HP Communications work with sleep in 10.3
Authored by: LC on Sep 23, '04 01:16:18PM
The first script might use a form of killall 'HP Communications' to replace the bulky ps and multiple greps;

[ Reply to This | # ]
Make HP Communications work with sleep in 10.3
Authored by: Christian Leue on Sep 24, '04 02:19:43AM

Better yet, get rid of the buggy, bloated HP software. I scrubbed my machine of everthing related to HP (search for Hewlett Packard, too), then went to www.linuxprinting.org/macosx/ to install Gimp-Print and hpijs

Prints like a champ, and you can use VueScan if you have one of the supported All-in-One devices (VueScan runs great with my PSC 1210).

Good riddance, HP Communications!



[ Reply to This | # ]
Make HP Communications work with sleep in 10.3
Authored by: magir on Sep 24, '04 04:29:08AM

This works for printing but not for all-in-one devices which can scan or fax. What I do is print via the Mac OS X driver and when I need the scanning functionality I manually start HP Communications, do the scan and quit it again. I patched HP Communications to be a foreground app so it shows up in the dock and can easily be quited. Still not very good but circumvents the problems generated by this bloody HP Communications app.



[ Reply to This | # ]
Make HP Communications work with sleep in 10.3
Authored by: thewolf on Sep 24, '04 04:54:52AM

How did you patch the HP Communications application to be a foreground process?

Are you willing to share it with us? :-)

Thanks!



[ Reply to This | # ]
Does this work with printers?
Authored by: bedouin on Sep 23, '04 06:51:32PM

Since 10.1 I've had issues with my Deskjet 812C and OS X. Every once in a while OS X fails to open a connection to the printer, and I have to either unplug the USB cable from the hub or printer, or restart the computer. The same thing happens on my father's eMac, and a Deskjet 842C. I've never been able to figure out what causes it, and it happens with the latest drivers from HP. I think it might be related to turning the printer off while the computer is asleep, but I'm not sure. Any ideas?



[ Reply to This | # ]
Make HP Communications work with sleep in 10.3
Authored by: seann on Sep 24, '04 12:44:54PM

If you use classic, make sure pipedaemon.app is being kill'ed/open'ed



[ Reply to This | # ]
Multiple users
Authored by: brianboonstra on Oct 04, '04 10:56:56PM
I just got an OfficeJet 4215 and I'm trying this hint not because I have noted any trouble but just as a prophylactic. I will be trying this for multiple users.

I did NOT put the scripts in rc.sleep and rc.wakeup, because I noticed that if multiple users are logged in via Fast User Switching, then each gets a copy of HP Communications.app, running as their own respective user id. It would be more of a pain to reproduce that at the system level than I want, so i just put the given scripts in all 3 user accounts. However this fails, as Sleepwatcher apparently only runs for the currently active user.

So far printing works anyway. I'll see what else happens.

[ Reply to This | # ]
Multiple users
Authored by: brianboonstra on Nov 01, '04 05:26:10PM
I have authored a new hint on how to work with Fast User Switching. I have not encountered any sleep problems, so I can't speak to those.

[ Reply to This | # ]
Restarting Stuck HP Communications
Authored by: BMarsh on Apr 12, '05 09:08:46PM

not sure how many have had this problem, but sometimes my mothers HP LaserJet 3330 MFP will just die, sometimes this just requires doing a Force Quit on the HP Communications.app, then start it up again.

Other Times, the 3330 itself needs to be powered off, then back on, and then have this Force Quit and relaunch happen (or a restart of the computer as well)

I developed the following applescript for my mother who had trouble remembering the steps, or losing the written instructions to do this, now it is one click on the dock.

[code]
set thePID to 0

set thePID to do shell script "ps axww | egrep -i '/Library/Printers/hp/HP Communications' | egrep -iv 'egrep -i' | awk '{ print $1 }'"


if thePID > 0 then
do shell script "kill -9 " & thePID
end if

delay 5

try
tell application "HP Communications" to run
end try

tell application "Finder"
activate
end tell
[/code]

It is not pretty, I'm sure there are more efficient ways to do this, but given the amount of time I had, it was the best I could do.

In some cases the printer Queue also needs to be started again. (Pressing the Start Jobs button in the specific printer window)
(I'm looking into doing this with the applescript at some point, but ran out of time and a headache, so another day)



[ Reply to This | # ]