2007 Dec 10

I upgraded my MacBook to Leopard recently. I am now running 10.5.1. Things have gone pretty well and the new features I want work.

One problem nags. Perhaps one time in ten it will not go to sleep when I ask it to. After either closing the lid or selecting “Sleep” in the Apple menu, it continues to consume power, remain quite warm and make a small noise which I take to be continuous disk seeks. This state lasts at least for hours. Until now I have killed this by either

I have needed the last option only once or twice. I have not needed the ultimate option of removing the battery.

Sometimes it wakens after having gone to sleep. About twice per week I find it warm in the morning, even though I now tend to verify that it has gone to sleep about 15 seconds after closing the lid.

I observe three states which are related to the white light visible on the edge of the closed Mac; these phenomena are consistently associated:
OffEither operating interactively or powered off.
On SteadyAfter having been told to sleep but with disk still threshing and dissipating heat.
Waxing and Waning over a few second periodSleeping with no noise and little battery drain

I hear the incessant disk action now. My Mac is running on its power adaptor. Under [System Preferences > Energy Saver > Power Adaptor > Custom] I have checked “Put the hard disk(s) to sleep when possible”. Under “Options” only “Automatically reduce ..” and “Show battery status ...” are checked. The sound persists even when Finder is the only ‘app’ marked as running in the Dock.

Aside from disk wear this situation limits my use of my Mac when I run on the battery. In the past I have slept for days without power and very limited waking periods. Now the battery is dead in a few hours even with the lid closed.

2008 June 29

This may be relevant, which supposes that the problem is bogus detection of lid opening. Such would not by itself explain the incessant disk operation observed when the machine should be sleeping, and the concomitant inability to turn on screen and interact. It is worth a try. (I am on OS 10.5.3 and the problem persists.)

Well I did “sudo pmset lidwake 0” like the article said and indeed opening the lid does not wake my sleeping Mac. The next morning, however found my Mac unwakeable as it thrashed its disk. So now I do “sudo pmset lidwake 1”! Nothing I found to do with pmset fixed my problem.

2008 July 11

My Mac was turning on the screen light for a few seconds every 20 seconds when it should have been sleeping. The lid was closed. I went to:
System Preferences > Accounts > Norman Hardy > Login Items
and found “SpeechSynthesizerServer” listed there. I deleted it. It seems I had turned on time announcement which had the side effect of adding SpeechSynthesizerServer to that list. For now it looks like the problem is fixed, or at least improved.

2008 July 12

That worked for a while and I think I like the mode. But just now I put the machine to sleep two ways: closing the lid and Menu > Apple > Sleep. Both ways seemed to work but only for a few seconds. Within 3 sec the machine would wake. I think that this action relates to the previous failure mode where the RAM is copied to /var/vm/sleepimage just after a command to sleep.

I just launched the ‘Console’ utility, and did:
This elicits a much larger and frequent collection of missives from various sources. I then commanded sleep and it immediately awoke (as per current malfunction). The console reports this cryptic message:

08/07/12 18:21:46  kernel System Sleep 
08/07/12 18:21:47  kernel System Wake 
08/07/12 18:21:47  kernel USB caused wake event (EHCI) 
I go to System Profiler and under: Hardware > USB
I see entries that lead me to think that there are these internal USB devices: Someone was here before me. This looks interesting. Background.

I rebooted and the problem stopped. In about ten of ten sleep commands sleep failed before reboot. This venture is littered with dead hypotheses. So is the web if you search for “USB caused wake event (EHCI)”. Nonetheless it may be a USB device sending garbage that EHCI passes thru to a higher level program that silently discards it.

I turned off Bluetooth as I seldom use it. I don’t know when to conclude that that was the problem. Bluetooth noise cannot explain why rebooting temporarily cured insomnia.

2008 July 14

Sometimes System Profiler reports that my machine has bluetooth and sometime not.

System is bad when no Bluetooth is reported.

Observations taken both when system is behaving and not:
Only transition from bad to good is upon boot.
System is bad iff no Bluetooth is reported.

I suspect that transition to bad from good is while sleeping. I have not observed such a transition while awake but I would have probably missed it.

In the last 48 hours I have frequently checked System Profiler for Bluetooth. All observations compatible with above hypothesis but sleep has been reliable since last boot. But I have thought the problem was gone several times before!

I tried turning on Bluetooth and Profiler immediately thought it was gone and Insomnia returned. After two short sleep cycles BT is back and so is good sleep.

2008 July 15

This morning the Mac was cool as I grasped it the first time. Profiler showed Bluetooth. All was well; it slept when I closed the lid. An hour later I closed the lid and it did not sleep. Profiler showed no Bluetooth. I rebooted and still no Bluetooth and no sleep. I had to leave the house with my Mac and so I powered it down. 35 minutes later I booted and Bluetooth was back and it would sleep.

Net new observation: It goes bad sometimes while awake and in use.

Peculiarity: System Profiler > Contents > Hardware > USB
shows 5 USB entries—I presume one per USB host interface. The things attached thereto are not always in the same order.

Just now I saw it go from good to bad to good again without rebooting. And again on July 16.


The following was written when I suspected that Spotlight was working overtime. I think that is not so now.

I added my hard disk to the initially empty list of Spotlight exclusions. The insomnia was not observed for several hours and I think it ceased. To narrow down the problem I selected the top 4 entries in Finder’s display of the disk content: Applications, Applications (Mac OS 9), DamagedFiles, Developer. I dragged the 4 into the exclusion window, as I had originally dragged the hard disk. Very slowly each of the 4 were in turn rejected with the message: “Privacy List Error The item couldn’t be added or removed because of an unknown error.” Perhaps the problem is that the resulting state would have included many things twice.

I closed System Preferences, slept successfully, woke, and started System Preferences again and went to the Spotlight privacy list. The five entries were shown. I deleted the Hard disk from them. I closed the window and Spotlight says it is indexing.

Nearly a day later and no problems. I have removed ‘DamagedFiles’ from the list and then reboot. I see that the files therein are all symbolic links to files in other directories. There are about 25 files in the folder and about 1/2 are to files in “Applications/Adobe Reader 7.0.5/Adobe Reader 7.0.5.app/Contents/Plug-ins/Spelling.acroplugin/Linguistics/Providers/proximity” which is no longer with us. I recognize that the underlying problem may be with the media and not file content. This suggests that fsck or the “Disk Utility” produces the “DamagedFiles” directory. “man fsck” is ignorant of “DamagedFiles” however.

I conclude that the DamagedFiles folder is not part of the problem. I now remove “Applications (Mac OS 9)” from the exclusion list and reboot.

Now, only the Applications folder remains in the exclusion list. The next day, after no further problems, I removed the last member of the exclusion list. After about 24 hours, and also doing a TimeMachine backup which had not been done since this trouble shooting, the symptoms restarted. I added my Dilbert folder and rebooted. So far so good.

this is interesting but unrelated, I think.

Ultimately I asked the Apple store if it was right for Bluetooth to appear in System Profiler sometimes and not others. They said no and agreed to fix my machine. The sleep problem has not returned since.