syscl / Fix-usb-sleep

Fix issue of "Diks not ejected properly upon sleep" on macOS
71 stars 20 forks source link

Fix "Disk not ejected properly" Issue on OS X/Mac OS X

Hola, this is an ongoing project aims at fixing the issue of disk not ejected properly upon sleep. This issue has a really long history since Mavericks (Mac OS X 10.9) even on a real Mac. Without the help of Bernhard Baehr (bernhard.baehr@gmx.de)'s great sleepwatcher daemon, this project will not be created.

I've tested on my DELL Precision M3800. Wish you all enjoy it. Any feedback is welcomed!

How to use fixUSB.sh?

Download the latest fixUSB.sh by entering the following command in a terminal window:

curl -o ./fixUSB.sh https://raw.githubusercontent.com/syscl/Fix-usb-sleep/master/fixUSB.sh

This will download fixUSB.sh to your current directory (./) and the next step is to change the permissions of the file (add +x) so that it can be run.

chmod +x ./fixUSB.sh

Run the script in a terminal window by:

./fixusb.sh

Once you finish the procedures, sleep your OS X and see if the issue is fixed.

If you do not want to use fixusb.sh in the future, then uninstall it by entering:

./fixusb.sh -u

Use -d argument to see the details of the whole progress.

How to use ramdisk?

Download the latest ramdisk by entering the following command in a terminal window:

curl -o ./ramdisk https://raw.githubusercontent.com/syscl/Fix-usb-sleep/master/ramdisk.sh

This will download ramdisk to your current directory (./) and the next step is to change the permissions of the file (add +x) so that it can be run.

chmod +x ./ramdisk

Run the script in a terminal window by:

./ramdisk

Reboot your OS X to see the change. If you have any problem about the script, try to run deploy in DEBUG mode by

./ramdisk -d

or

./ramdisk -debug

Change Log

2016-12-8

2016-9-16

2016-7-16

2016-5-26

2016-4-18

2016-4-15

2016-4-13

2016-4-10

2016-4-9

2016-3-19

2016-3-18

////