I suddenly noticed that both my MacBook and Mac Mini were not respecting the idle sleep timer, i.e. they never went to sleep mode even if I didn’t touch the keyboard or mouse for hours. Both did go to sleep when selecting “Sleep” from the Apple menu, and MacBook slept when the lid was closed. However, when running MacBook in the “clamshell mode” (lid closed with external display + keyboard + mouse), it acted as Mac Mini, never sleeping automatically.
I started to Google about the problem and found several discussion threads offering different types of solutions to the problem. I tried resetting the PMC, disabling BlueTooth, disconnecting all external devices, disabling all sharing, disabling iCloud, Time Machine backups, uninstalling Google Updater, etc. And suddenly the sleep started working. I rebooted and started more systematical tracing of the problem software. Eventually, by following the “kill process-idle-kill another process-idle” -technique, I found out that the two problem software I had were the SMC Fan Control and Hardware Monitor. It seems that a recent update to Mac OS X had changed the SMC API and these two utilities accessing that API somehow caused the idle timer never reaching even the lowest one minute setting I was using. Uninstalling those two, and the idle sleep works again as it should (in 10.7.4). I hope those utilities get an update in the future so that I can install them again.
It would have been much easier to debug (and fix) this if Mac OS X was open source…