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
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:
| Light | Action |
| Off | Either operating interactively or powered off. |
| On Steady | After having been told to sleep but with disk still threshing and dissipating heat. |
| Waxing and Waning over a few second period | Sleeping 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.
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.
I just launched the ‘Console’ utility, and did:
LOG DATABASE QUERIES > All Messages.
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 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.
Hypothesis:
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.
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.
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.
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.