IMac – Why does the iMac take so long to go to sleep

imacmacossleep-wake

Note: I have seen this question as well as this question, I don't believe that either pertain to this situation.


When I press the sleep button on my iMac it consistently takes 30-31 seconds to go to sleep. The computer is reasonably old, it is a early 2008 model and because of this, the hard drive is pretty full (only about 2GB left). When the computer sleeps there are no processes taking up a lot of CPU and most of the RAM is available. The computer wakes up reasonably quickly (1-2 seconds)

I would like to know why the computer takes so long to go to sleep, and if there is a solution to the problem.

Here are the stats of the computer:

OS X 10.6.8 (Snow Leopard)

2GB DDR2 SDRAM

2.8 GHz Intel Core 2 Duo

If anymore information is needed, just add a comment.

Edit:

Here is the console output when I put the computer to sleep.

8/20/14 11:58:36 AM kernel  PM notification timeout (pid 199, DashboardClient)
8/20/14 11:58:36 AM kernel  PM notification timeout (pid 199, DashboardClient)
8/20/14 11:58:36 AM kernel  hibernate image path: /var/vm/sleepimage
8/20/14 11:58:36 AM kernel  sizeof(IOHibernateImageHeader) == 512
8/20/14 11:58:36 AM kernel  Opened file /var/vm/sleepimage, size 2147483648,         partition base 0xc805000, maxio 400000 ssd 0
8/20/14 11:58:36 AM kernel  hibernate image major 14, minor 2, blocksize 512, pollers 5
8/20/14 11:58:36 AM kernel  hibernate_alloc_pages flags 00000000, gobbling 0 pages
8/20/14 11:58:36 AM kernel  hibernate_setup(0) took 0 ms
8/20/14 11:58:37 AM Apple80211 framework[113]   ACInterfaceGetPower called with     NULL interface
8/20/14 11:58:37 AM Apple80211 framework[113]   ACInterfaceGetPower called with NULL interface
8/20/14 11:58:37 AM configd[15] network configuration changed.
8/20/14 11:58:37 AM kernel  System SafeSleep
8/20/14 11:58:40 AM kernel  hibernate_page_list_setall start 0x25717000, 0x25728000
8/20/14 11:58:40 AM kernel  hibernate_page_list_setall time: 142 ms
8/20/14 11:58:40 AM kernel  pages 324460, wire 61471, act 103587, inact 609, spec 63, zf 3, throt 0, could discard act 88461 inact 32682 purgeable 14366 spec 23218
8/20/14 11:58:40 AM kernel  hibernate_page_list_setall found pageCount 165733
8/20/14 11:58:40 AM kernel  IOHibernatePollerOpen, ml_get_interrupts_enabled 0
8/20/14 11:58:40 AM kernel  IOHibernatePollerOpen(0)
8/20/14 11:58:40 AM kernel  writing 165142 pages
8/20/14 11:58:40 AM kernel  encryptEnd 73c9a20
8/20/14 11:58:40 AM kernel  IOPolledInterface::checkForWork[5] 0xe00002eb
8/20/14 11:58:40 AM kernel  PMStats: Hibernate write took 2552 ms
8/20/14 11:58:40 AM kernel  all time: 2552 ms, comp time: 552 ms, deco time: 0 ms, 
8/20/14 11:58:40 AM kernel  image 0, uncompressed 410402816 (100196), compressed 197517516 (48%), sum1 1a4d5b57, sum2 0
8/20/14 11:58:40 AM kernel  wired_pages_encrypted 60968, wired_pages_clear 39229, dirty_pages_encrypted 0
8/20/14 11:58:40 AM kernel  hibernate_write_image done(e00002eb)
8/20/14 11:58:40 AM kernel  sleep

Best Answer

Your full hard drive could be a reason. Some space is needed for swap and sleepimages and whatnot, and OS X has difficulties operating when it only has so little space free for those tasks. Try freeing some space (at least 5GB is recommended by Apple if I recall, I'd try to free more just to try).