Compatible with Catalina OS?

308 views
Skip to first unread message

Bryan Westberg

unread,
Oct 9, 2019, 7:33:50 PM10/9/19
to Keep Drive Spinning
I love your app.  Keeps my drive connected to Airport Extreme router running.  Before, the drive would start with each Time Machine backup and then wind down -- several times per day.  I'm sure this is what caused my last hard drive to wear out prematurely.  WIth Keep Drive Spinning, this isn't a problem.

However, last night I upgraded to Catalina and now the app appears ineffective.  The app launches and I can choose the drive to keep spinning, but it stops after about two minutes of non-use.

Do you know if this is due to an incompatibility with the new 64-bit Catalina OS?  If so, will you have any plans to make it compatible?  Thanks!

Jon Stovell

unread,
Oct 9, 2019, 7:51:48 PM10/9/19
to Keep Drive Spinning
Hi Bryan, thanks for the kind words! I always like to hear how the app has helped people.

To help me diagnose the problem, please walk through the steps described in the Troubleshooting Guide. It is important not to skip any steps, or else I won't get the information I need.

If the problem is still not resolved after you walk through the Troubleshooting Guide, please post here with the full output produced by Diagnostic.applescript. I will need to see all of it in order to understand what is going wrong.

Jon Stovell

unread,
Oct 9, 2019, 8:01:25 PM10/9/19
to Keep Drive Spinning
Oh, and to answer your question: Keep Drive Spinning is not affected by Catalina's lack of support for 32-bit apps. The Keep Drive Spinning app itself is already 64-bit, and is therefore unaffected. Meanwhile, the configuration files it creates and the .keepThisDriveSpinning files that it puts onto drives are all just simple text files, and are therefore unaffected.

Bryan Westberg

unread,
Oct 9, 2019, 8:12:03 PM10/9/19
to Keep Drive Spinning
Hi, Jon.  Thanks for the quick reply.  The output of the diagnostic script is below.  Other than my upgrade to Catalina, I've made no other changes to hardware or software since the last time Keep Drive Spinning was effective.

One more bit of info...  When I open Keep Drive Spinning and select the drive to keep awake, the drive spins up so I know the app has written to the drive once, but apparently it doesn't write 60 seconds later and within two minutes, the drive stops.

Thanks again for your support.


The Keep Drive Spinning launch agent for WD1000 is not working correctly.
The reason for the failure could not be determined automatically.
The diagnostic information below may yield a clue.
OS version:
10.15

Volume info:
Name: WD1000
Path: /Volumes/WD1000
Format: AppleShare format

Current date:
2019-10-09 19:01:33 CDT

Contents of hidden file:
2019-10-09 18:55:09 CDT

Status of all loaded Keep Drive Spinning launch agents:
-    1    info.stovell.KeepDriveSpinning.WD1000

Launch agent path:
/Users/Westberg/Library/LaunchAgents/info.stovell.KeepDriveSpinning.WD1000.plist

Launch agent contents:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0">
  <dict>
    <key>Label</key>
    <string>info.stovell.KeepDriveSpinning.WD1000</string>
    <key>ProgramArguments</key>
    <array>
      <string>/bin/bash</string>
      <string>-c</string>
      <string>if [[ -w '/Volumes/WD1000'/.keepThisDriveSpinning ]]; then date '+%F %T %Z' &gt; '/Volumes/WD1000'/.keepThisDriveSpinning; fi</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>StartInterval</key>
    <integer>60</integer>
  </dict>
</plist>

Writing to the hidden file:
Succeeded

An error occured:
The variable msg is not defined.

Jon Stovell

unread,
Oct 9, 2019, 11:55:19 PM10/9/19
to Keep Drive Spinning
Thanks Bryan. That was very helpful. I'm still investigating the problem and potential fixes for it, but currently it appears that the issue may be due to this new "feature" that Apple added to launchd in Catalina: 

In general, I applaud Apple's pursuit of high security and privacy protection, but in this case it is causing me a headache. I'll try to figure out the best way to fix the issue as soon as I can.

If you don't mind, I may ask you to run some tests for me once I've had a chance to investigate a bit more. If you are willing to do that, it may help quite a bit.

Brandon Johnson

unread,
Oct 25, 2019, 9:54:29 PM10/25/19
to Keep Drive Spinning
I too look forward to seeing a fix for Catalina.  My movie/TV show storage is on an external drive so the drive going to sleep is a serious problem for me when I want to watch a movie via my Apple TV.

Jon Stovell

unread,
Oct 27, 2019, 7:16:08 PM10/27/19
to Keep Drive Spinning
Hi folks,

I have a beta for Keep Drive Spinning 3.0 for you to test. After you download it, you will need to do the following:
  1. Move the app to /Applications or ~/Applications.
  2. When prompted to do so, grant Keep Drive Spinning permission to send Apple Events to Finder.
  3. When prompted to do so, grant Keep Drive Spinning permission to access files on removable drives. 
  4. Run "Let a drive sleep..." and then "Keep a drive awake..." for all the drives that you want to keep awake.
In the final version of 3.0, I might add some code to automatically handle step 4, but in this beta you'll need to do it the normal way.

Here's the download link: KeepDriveSpinning.3.0.beta1.zip. PLEASE REPLY HERE TO LET ME KNOW WHETHER IT WORKS.

Once I have confirmation that this beta works on other people's Macs, I will probably make further changes to improve efficiency in a second beta. Those who are willing to beta test will get early access to those further improvements, too. :)


For those who are curious, the cause of the failures in macOS Catalina seems to be a combination of two changes that Apple made:
  1. They introduced a new privacy protection that restricts access to files on removable drives. 
  2. They decided that launch agents should be subject to all the privacy protection restrictions that apps are, but failed to create any way for launch agents running a background script to prompt the user to grant the necessary access! 
This combination meant that the launch agents created by Keep Drive Spinning 2.6.2, which executed a simple shell script to do their work as efficiently as possible, were unable to access the .keepThisDriveSpinning file on external drives under Catalina and had no way to prompt the user to request that access, so they failed silently. The only solution I've found is to have the app itself launch in the background and update the hidden file on the drive.

Brandon Johnson

unread,
Oct 27, 2019, 7:39:09 PM10/27/19
to Keep Drive Spinning
I've installed the beta and I can see by the time stamp on .keepThisDriveSpinning that it may be working.  I'm not sure what the default sleep time actually is but since a "watched pot never boils", I assume I may not truly know for sure that things are working until I go away for a while and come back later to see if the drive is actually still spinning.  What process can I watch in the console that would give some indication things are working for the long term?  Obviously it creates a bit of a false positive for me to check the drive for the time stamp of the file since that will spin the drive back up if it did sleep.

Jon Stovell

unread,
Oct 27, 2019, 10:10:34 PM10/27/19
to Keep Drive Spinning
To check programmatically without disturbing your drive, you ca run this command:

launchctl list | grep info.stovell.KeepDriveSpinning

You should see output with three columns, something like this:

- 0 info.stovell.KeepDriveSpinning.DriveName

If the second column is a 0 like in my example above, then the agent completed successfully. If it shows some other number in the second column, then the agent ran into an error. 

If the first column has a number instead of a dash, then the agent happened to be running at the moment you ran the command. Just run the command again to see whether the agent completed successfully or not.

Brandon Johnson

unread,
Oct 28, 2019, 7:22:28 PM10/28/19
to Keep Drive Spinning
Everything seems good for me.  At first this morning when I woke up, I thought it was failing.  I picked up the drive to see if I could feel it spinning and it wasn't.  I logged in to my machine and right then, I heard it spin up.  Turns out, the Catalina upgrade had default the old power save settings so the whole machine was being put to sleep.  That probably explains why Amphetamine wasn't working either but I really didn't want to keep Amphetamine as it's overkill for my purpose.  Your app is EXACTLY what I need and nothing more.

Bryan Westberg

unread,
Oct 28, 2019, 10:38:06 PM10/28/19
to Keep Drive Spinning
Keep Drive Spinning is doing exactly that:  my drive is spinning unceasingly.  Fabulous job!

One interesting note...  I selected one drive to keep awake.  When I choose Let a drive sleep, I don't get a list of awake drives, but rather a dialog box that says, "The command exited with a non-zero status."  When I click OK, it takes me back to the menu.  Choosing Quit exits the menu appropriately, but it appears the drive is still being written to periodically and it continues to spin.  A bug to squash?  (I'm not complaining -- my drive is spinning!)


Thanks again.  I appreciate your work.

scott flora

unread,
Oct 28, 2019, 10:47:24 PM10/28/19
to Keep Drive Spinning
here's what I get 

scott flora

unread,
Oct 28, 2019, 10:49:01 PM10/28/19
to Keep Drive Spinning

Screen Shot 2019-10-28 at 7.48.38 PM.png


hamish

unread,
Nov 9, 2019, 1:15:10 AM11/9/19
to Keep Drive Spinning
Hi Jon, the 3.0 beta1 is not working for me. I have three external drives & the are all beach-balling as they spin up. I also cannot let a drive sleep as this returns an error "The command exited with non-zero status"

The diagnostic report is saying the drive is not currently configure to be kept awake, even though I have attempted to make it so several times.

Result:
-------
G-DRIVE with Thunderbolt is not currently configured to be kept awake.
Run Keep Drive Spinning to change this.


Details:
--------
OS version:
10.15.1

Volume info:
Name: G-DRIVE with Thunderbolt
Path: /Volumes/G-DRIVE with Thunderbolt
Format: Mac OS Extended format

Current date:
2019-11-06 20:54:35 GMT

Contents of hidden file:
2019-11-06 20:54:08 GMT

Status of all loaded Keep Drive Spinning launch agents:
- 0 info.stovell.KeepDriveSpinning.G-DRIVEwithThunderbolt
- 0 info.stovell.KeepDriveSpinning.4000GB
- 0 info.stovell.KeepDriveSpinning.SSDBackup
- 0 info.stovell.KeepDriveSpinning.500GB

Jon Stovell

unread,
Nov 9, 2019, 1:24:43 AM11/9/19
to Keep Drive Spinning
The 2.x diagnostic can't understand the 3.x launch agents, so it will always report that the drive is not configured to be kept awake in the "Result" section. But the details section shows that the hidden file on the drive is being written to as expected.
 

hamish

unread,
Nov 9, 2019, 5:52:19 AM11/9/19
to Keep Drive Spinning
Thanks Jon, I did wonder if that was the case. Strangely since I posted I've not observed the slow spin up I previously reported. Hopefully working as expected now.

Jon Stovell

unread,
Nov 28, 2019, 1:17:48 AM11/28/19
to Keep Drive Spinning
Hi all,

Keep Drive Spinning 3.0 is now available at http://jon.stovell.info/software/keep-drive-spinning

If you tested the beta version, you should follow these steps to upgrade to the final version:
  1. Launch the beta version and use the "Let a drive sleep" button to let all your drive's sleep.
  2. Delete the beta app.
  3. Download and run the final version from the link above.
Jon
Reply all
Reply to author
Forward
0 new messages