Mac: Set hibernation for internal AND external hard drives

Deactivating macOS hibernation does not always work with external hard drives. In this article I explain how to get them not to go to Spindown (Photo: Sir Apfelot).

I recently had an interesting conversation with a reader who asked if you can disable external hard drives from hibernation on Macs. My first thought was the system setting "Save energy", which includes an option that allows the hard drives to "hibernate" after a certain period of inactivity. However, after doing some research, I found out that disabling this option mostly only works for internal hard drives.

With external hard drives one reads different statements. Some say that these cannot be influenced at all by the setting in the "Energy saving" control panel, while others say that it depends on the manufacturer whether a hard drive takes this setting of macOS into account or not.

One thing is certain: the time until spin-down is not handled uniformly on external hard drives. However, if a certain hard drive does not react to the setting of macOS, there is still the option of allowing a certain degree of influence with third-party apps. But more on that below. First of all, here are the findings that I got when researching the "Save energy" control panel and the option to hibernate the hard drive.

Deactivating macOS hibernation does not always work with external hard drives. In this article I explain how to get them not to go to Spindown (Photo: Sir Apfelot).

Deactivating macOS hibernation does not always work with external hard drives. In this article I explain how to get them not to go to Spindown (Photo: Sir Apfelot).

Inset: Why you should put hard drives to sleep

In some cases it makes perfect sense to prevent a hard drive from spinning down (i.e. shutting it down to sleep). This is the case, for example, when audio or video is being recorded and the hibernation of the hard disk causes frames to be dropped or the audio recording has gaps because the hard disk was unable to write any data for a short period of time. But these are exceptional cases. As a rule, hibernation is not only recommended for hard drives to save energy, but also to avoid shortening the service life of the hard drives.

Conventional hard drives are less designed for this. There are special series of hard drives like the WD RED, WD RED Pro, WD Ultrastar or Seagate IronWolf, which were specially designed for server, RAID and NAS systems. These special hard disks withstand continuous operation with the corresponding heat development and can also cope if they are constantly writing or reading data - which is never the case with a "normal" hard disk. At most a longer copying process takes place, but otherwise the disks tend to be in wait mode.

If you use an inexpensive hard drive that is designed for operation on a desktop computer, in a NAS or RAID system, or if you never allow it to go to sleep, then this is of course reflected in the life expectancy of the hard drive. Certainly it does not get "burnout", as in a server operation, where small amounts of data are constantly queried by many processes at the same time, but it should still have to struggle with problems earlier. If you allow the hard drive to take a break here and there with the option "hibernation", this certainly has a positive effect on the durability.

On the left the hard disk with "rotating parts" and on the right the SSD from SanDisk, which does not have any mechanical parts.

On the left the hard disk with "rotating parts" and on the right the SSD from SanDisk, which does not have any mechanical parts.

External SSDs do not have a sleep mode

I recently had a little one Review of a cheap SSDthat can be connected externally to the Mac. This type of external storage has practically no sleep mode and is always on standby because it is a storage device like a USB stick. There are no rotating parts and accordingly no mechanical wear and tear that would have to be minimized by a spin down. So if you are looking for an external hard drive that offers extremely fast access times, you should look at the external SSDs from SanDisk look, which I have also acquired.

The option for the hibernation of internal and external hard drives can be found under "Save energy" in the system settings.

The option for the hibernation of internal and external hard drives can be found under "Save energy" in the system settings.

System setting "Save energy"

In the system settings under "Save energy" you will find the option "If possible, activate hibernation for hard disks" under the tab "Battery" as well as under "Power supply". This setting can therefore be set separately for battery operation and the time in which, for example, a MacBook is connected to the power supply. I assume that an iMac that only runs without a battery has no separate areas, but the option to hibernate the hard drives is still there.

As mentioned above, this setting usually only affects internal drives. You can still try to deactivate all idle states (including the monitor, etc.) completely. In some cases, an external hard drive will not shut down either. Most of the time, however, you have to trick with third-party apps, which I present below.

The option to activate the spin-down of hard disks is also hidden in the "Save energy" control panel.

The option to activate the spin-down of hard disks is also hidden in the "Save energy" control panel.

Is the hibernation active?

If you check the option "If possible, activate hibernation for hard disks", the time is usually set to 10 minutes of inactivity. If the hard disk has not been in read or write mode for a long time, it is put into hibernation. These 10 minutes cannot be found in the system settings, but they can be read out by entering the following command via the terminal:

pmset -g

The output then shows the corresponding number under the entry "disksleep". The 10 minutes can be seen in the screenshot.

The terminal command pmset can also be used to read out the time until the hard disk is idle.

The terminal command pmset can also be used to read out the time until the hard disk is idle.

Set the hard disk to idle down to the minute

While you can only activate the idle state with yes or no using the "Save energy" control field, there are more options with the terminal. The "disksleep" parameter can be specified to the minute using the "pmset" command. Here is an example with which the hard drive is set to idle after 45 minutes of inactivity:

sudo pmset disksleep 45

The command "sudo" in front of the "pmset" says that it should be executed with administrator rights. For this reason, an administrator password is required after the entry before the command is actually executed.

Incidentally, if you set the value for "disksleep" to "0", the option for sleep mode is deactivated. But this can also be done via the control panel by simply removing the check mark from the option for the hard drives to hibernate.

If you want to make the settings for battery and power supply operation with the terminal command on a MacBook, use the following command:

sudo pmset -c disksleep 0 -b disksleep 60

This deactivates the spin-down for operation on the power supply unit (-c) and sets it to 60 minutes for battery operation (-b).

Influence the spin-down of external hard drives with auxiliary programs

If you still want to deactivate the spindown, i.e. hibernation, on external hard drives on the Mac, there are a few apps that help to influence this. In rare cases, however, even these apps do not work because the time for spin-down is specified by the hard disk controller.

Cocktail's features also cover a few hard drive issues. Among other things, the individual time setting until spin-down.

Cocktail's features also cover a few hard drive issues. Among other things, the individual time setting until spin-down.

Cocktail

The software "Cocktail" is - like Tinkertool and OnyX - basically a recommendation. It can be used to set many system parameters that can otherwise only be accessed via the terminal. Disk hibernation time is just one of them. Ultimately, the same thing can be achieved with the system settings. If this setting is ignored by the external hard drive, Cocktail cannot help either. Then the "Keep Drive Spinning" app may be helpful.

A small warning should perhaps be given with Cocktail before the automated maintenance scripts and the like, which goes beyond pure "settings". These "optimization functions" have done some damage to some people.

http://www.maintain.se/cocktail/

Keep drive spinning

This little app only does one thing: keep external hard drives running. The site only says "Mac OS X 10.4", but there are also new entries from December 2018 in the support forum, so I assume that the software will also work with Mojave. In contrast to Cocktail, which only changes the macOS settings, with "Keep Drive Spinning" there is also the possibility that hard drives that ignore the macOS settings are prevented from spindown.

http://jon.stovell.info/software/keep-drive-spinning/

Outdated apps and abandoned projects

You can find a few other apps online that should help with the problem, but the websites are no longer available, the projects are discontinued or they simply no longer work with the current macOS versions such as Mojave. I hope you have found a helpful approach that solves your problem. If not, please contact me. Maybe we can think of something else together.

 

 

 

-
Do you like my blog? Then I would be happy to receive a short review on Google. Easy leave something here for a moment - that would be great, thank you!

 

Effectively for free: iPhone 13 Mini and iPhone 13 deals with top conditions at Otelo - Advertisement

8 comments

  1. Peter says:

    Interesting article - in fact I had already thought of asking why my external hard drive connected to the iMac via Firewire (on which the startup volume is currently located) apparently occasionally wakes up briefly from sleep mode, which can actually be activated normally little something "and then goes to sleep again. The display (and probably also the internal (data) hard drive) does not wake up.

    I had now assumed that some routine in the controller of the external disk might be causing this behavior, but I'm not sure.

    In general, this external (Toshiba, 2 TB) hard drive tends to let you hear activities for about 15 second briefly during normal operation - quite regularly: perhaps every 1 seconds - even if nothing is actually happening that I assume is happening would mean that read / write operations would have to take place and the internal disk apparently rests peacefully. I have switched off automatic queries (as far as I know) for incoming mail, for example.

    Can that possibly also be a routine of the controller of this disk?

    • Sir Apfelot says:

      Hi Peter! It's very easy to try out. If you watch the hard drive in the login screen, it shouldn't get any activity from the system. If it still shows this brief activity every 15 seconds, it should be due to the controller. But what exactly could that be? I'm overwhelmed by that too. :)

  2. Peter says:

    Hello again…

    So far, my external Firewire hard drive (is the startup volume) is when my iMac (OS El Capitan) goes to sleep after the internal hard drive has spindown (there was a "click" after a few seconds in the iMac after it was activated audible signal for this was ...) always shut down as well.

    For a few days it has suddenly stopped doing that, so it runs through after everything else is mute or dark - without my having changed any setting.

    Is there any idea why this could be, or how I could possibly encourage you to shut down as usual?

    • Sir Apfelot says:

      Hi Peter! In the System Settings> Save Energy there is the option of whether the hard drive should go to sleep. There you could see whether "Power Nap" is activated. If so, it is possible that the Mac is still doing things in the background while on standby and the hard drive does not go to sleep as a result. I have no other idea now.

      • Peter says:

        Hi Jens,

        the one with the power nap is an option that is apparently not available for the iMac. However, today I added the external system partition (on the disk that suddenly no longer wanted to go to sleep) to the hard disks or folders for "privacy" with respect to Spotlight.
        After that it now seems to work again as before: first the display goes out after you have selected the idle state from the menu, then after a while the internal disk and finally the external disk shuts down.
        Since I seldom look for any files on the system partition, it seems to me that doing without the Spotlight search there is more painful. We'll see if it stays that way in the long run ...

        In general, after the update to El Capitan (from Snow Leopard), I noticed that the Mac was "rummaging" much longer on the disk each time it was switched on than ever before (even if it had already started up). I already had the impression that Spotlight works somehow differently with this system version than before. I have already read a number of similar experience reports and questions about it here and there. So maybe there is something to it ...?

        • Sir Apfelot says:

          Hi Peter! I'm not sure if Spotlight works differently, but I could imagine that the external hard drive is currently not sleeping because the Spotlight index is being rebuilt. If the Mac can do that a little longer, it should be through. It should only run sporadically there. I couldn't do without Spotlight. The Spotlight index is also used by the mail search.

          • Peter says:

            Hi Jens,

            Well, the mail search is of course such a thing - because if I am looking for something on the start / system volume, it is almost certainly primarily an e-mail - I actually hadn't thought of that!

            I always assumed that the Spotlight index should be ready or "through" at some point (except for ongoing updates), but the fact is that since that update on El Capitan there has been an often longer-lasting one in the background There was hard drive activity that I can only attribute to Spotlight and that was simply not there before. It is particularly noticeable if the Mac was actually completely switched off in the meantime and not just (e.g. overnight) in sleep mode. And as I said: if you search a bit, it seems as if I am by no means the only one who - especially in connection with El Capitan - found it conspicuous. There must be something to it ...

            In any case, thank you again for pointing out the Spotlight related mail search! Maybe I have to take the system partition out of the "privacy" area from time to time.

          • Sir Apfelot says:

            Well, maybe it will take care of itself. With time and frequent restart. : D

Leave a Comment

Your e-mail address will not be published. Required fields are marked with * .