Skip to content

hackintosh-stuff/Fix-usb-sleep

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

  • Patches for PCIe USB card to behave normal after sleep see issue #7 by @ralexx

2016-9-16

  • Fixed an issue that will potentially mount external EFI partitions see issue #5 by @brousseau6933
  • Fixed typo: "${gFrom}/tools" --> "${gFrom}"

2016-7-16

  • Switch to curl cmd instead of git clone cmd.

2016-5-26

  • Mount points at wake to fix MacBook issue #2 .

2016-4-18

  • Fixed kextload/kextunload issue reported by B1anker. Removed following command lines.

2016-4-15

  • Fixed the launch of "Wireless Network Utility" issue by B1anker & syscl/lighting/Yating Zhou.
  • Totally reconstructed the RTWlan script by syscl/ligthting/Yating Zhou, more efficient.
  • More general situation comes into consideration, support any RTL Wlan USB drivers, thanks for information provided by B1anker.
  • Fixed RTWlan usb sleep issue credit limser.

2016-4-13

  • Fix the permission issue for sysclusbfix.sleep.
  • No more reboot required, the fix will take effect instantly after executing the fixusb.sh!
  • Added uninstall function for fixusb.sh.

2016-4-10

  • More general situation comes into consideration for ramdisk.
  • Added custom size function: add size of ramdisk you want!
  • Added restriction for a more comfortable addition ramdisk size.

2016-4-9

  • Added RAMDISK function for users who want to boost their appliacations by fully using hardware resources (c) syscl/lighting/Yating Zhou.
  • Added UNINSTALL function for ramdisk.sh.

2016-3-19

  • Huge update, use "eject" command line to boost the mount upon sleep. Faster than ever!
  • Fixed two key command lines.
  • Change the permissions of the script (add +x) so that it can be run before sleep.

2016-3-18

  • First version of fixUSB.sh

////

About

Fix issue of "Diks not ejected properly upon sleep" on macOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%