Since upgrading my 2010 iMac to Os X Lion, I have had an issue with the system failing to respond properly to the manual sleep command. Using Snow Leopard before the upgrade it took about 1 second to sleep after clicking the sleep item in the apple menu, after installing Lion it suddenly took 30 seconds to respond. This happened whether or not any software was running. There were no outstanding items in the print queue. The printer was not shared, neither was anything else. I tried resetting SMC and PRAM and repairing permissions, with no change.
The pmset -g log showed that the cause of the 30 second sleep delay was the KodakAiOBonjour Agent, part of the Kodak printer communication software:
* Domain: applicationresponse.timedout
- Message: Kernel KodakAiOBonjourA com.apple.powermanagement.applicationresponse.timedout 30000 ms
- Time: 17/08/2011 16:25:45 GMT
- Signature: KodakAiOBonjourA
- UUID: 3A16EF47-977F-4DA8-8757-3AD489E81C72
- Result: Noop
- Response time (ms): 30000
When I uninstalled the Kodak printer and software, the problem disappeared completely, and the system would sleep instantly when clicking sleep in the apple menu, as it should. I downloaded and installed the most up to date driver software from Kodak's website - Kodak_AiO_Printer_V6_3.dmg, which has supposedly been updated for OsX Lion, and the sleep problem returned again and it took 30 seconds to sleep. Not a major problem, just annoying.
Kodak sent me this:
Thank you for your e-mail regarding your ESP 3 KODAK All in One Printer and the issue you are experiencing. To resolve this, please do the following, but be aware that depending on your Operating System some functionality may be lost:
USB Connection:
MAC OS 10.4.x / MAC OS 10.5.x:
Scanning from the printer to the computer (using the printer LCD to start the scan) will not work.
MAC OS 10.6.x: No loss of functionality
Move the KodakAiOBonjourAgent.app to the desktop from /Library/Printers/Kodak/AiO_Printers/KodakAiOBonjourAgent.app.
The customer will need to enter the administrator password to perform this action.
Delete the com.kodak.BonjourAgent.plist file from
/Library/launchAgents/com.kodak.BonjourAgent.plist
Restart the computer.
It's obviously not the first time they have answered this question. I did what they suggested. These steps fixed my sleep delay problem completely, but I ended up with the bonjour app file living on the desktop.