Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I put my PowerMac at work to sleep so that I can use Wake-on-LAN to do remote work on it. However the office cleaner often touches the keyboard or the mouse button unintentionally. So the question is:

How to disable mouse and keyboard wake up; to just use the power button and wake-on-LAN to wake/sleep instead?

Don't tell me to disconnect mouse and keyboard.

share|improve this question
Is there a reason why you need to use wake on LAN to access it? – jmlumpkin May 6 '11 at 17:07
It's an old Powermac (G5) and it's quite loud even at idle. And i don't access it frequently as my Linux box to be always powered on. – Lamnk May 6 '11 at 20:49
Ah, makes sense. Though if its at work, is the noise that much of a concern, when you would wake it up anyways with WoL? – jmlumpkin May 6 '11 at 21:20
Are you ok with solutions that minimize the awake time or do you truly require that the sleeping Mac truly not respond to existing KB and mouse events? – bmike Apr 22 '12 at 14:40

The solution I can offer is to use Sleepwatcher and add the following to your ~/.wakeup script:


WR=`syslog | grep -i "Wake reason =" | tail -1 | awk '{ print $11 }'`

if [[ "$WR" =~ EHC[0-9] ]]; then
    pmset sleepnow

This won't prevent your Mac from waking via keyboard or mouse. It will however sleep the computer immediately after it is woken via keyboard, mouse, or any other USB device.

According to an anonymous user this works for some versions of OS X (e.g. Mavericks):


WR=`syslog | grep -i "Wake reason:" | tail -1 | awk '{ print $11 }'`

if [[ "$WR" =~ EHC[0-9] ]]; then
    pmset sleepnow
share|improve this answer
Thanks, will try it next week – Lamnk May 6 '11 at 21:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.