Help - Search - Members - Calendar
Full Version: USB Hotplug Fixer
InsanelyMac Forum > OSx86 Project > New Releases and Updates
~pcwiz
I will just copy and paste from the included ReadMe

QUOTE
USB hotplug not working? This may be due to the fact that the IOUSBMassStorage.kext is not loaded. This simple application automatically detects whether or not the kext is loaded, and if not, it will load the kext and instantly enable USB hotplug. You can just double click it and run it whenever you want, or you can set it as a startup item to load every time you turn on the computer.

If the kext is already loaded and you run the app, it will just open for a split second and then quit. If the kext is not loaded, it will prompt you for an admin password and it will load the kext.


Application is attached smile.gif Hope this solves the problem for the people that are having this problem.

Note: Feel free to leave comments/feedback, however I will be gone for the next week so I can't respond till I get back wink.gif

EDIT: As of July 8th, new version attached
mitch_de
I get an window says: The command gaves back an result <> zero.
Seems thats an error message from the system (applescript envioriment), not from an information output by debug code in script.
PainToad
Wouldn't "usb fix 1.3.mpkg" be a better option?
BugsB
QUOTE (PainToad @ Jun 22 2008, 08:06 AM) *
Wouldn't "usb fix 1.3.mpkg" be a better option?
comparing apples with horses. the .mpkg INSTALLS kexts, ~pcwiz fixer only LOADS a kexts if needed = a totally different ballgame.

My hotplug fix (if needed) has so far been a script which touches the extensions folder, which, however, is a bit of an overdose. This approach is more efficient.

Still, in case anybody still encounters hotplug problems despite of ~pcwiz fixer, just touch the XT folder ..
~pcwiz
QUOTE (mitch_de @ Jun 21 2008, 10:44 PM) *
I get an window says: The command gaves back an result <> zero.
Seems thats an error message from the system (applescript envioriment), not from an information output by debug code in script.


Hm...does that mean that the kext is not loaded on your system?
fr3ak!
I have this message "The command gaves back an result <> zero." too
pivy
same problem....
thiathias
i would recommand everyone to read the "USB NOT MOUNT FIX ...." post
it says that generally this problems is caused by mismatching versions of kernel and system.kext
~pcwiz
Weird...I tested it and it was fine. I won't be at my hack for another week so I'll check it out then.
mitch_de
QUOTE (~pcwiz @ Jun 22 2008, 04:11 PM) *
Hm...does that mean that the kext is not loaded on your system?


1. If no USB Stick : yes it is not loaded (kextstat does not show it), this <> ERROR

2. If USB Stick: it is loaded automatic by system (kextstat shows it), no error message


Does this mean, your tool may help people which usbmass. is not loaded if they plug in an USB Stick ?
But then will get the error ??
~pcwiz
Ok, I will take a look at this back when I am at my hack.
BugsB
~pcwiz, until you have refined the query if the IOUSBMassStorageClass.kext is loaded or not: attached is a lil script that will load the kext without checking. If one runs the correct system/kernel combination and the kext is already loaded, it should simply detect the kext being loaded, and nothing.

kext is loaded with sudo, so if not logged in as root, one will be asked for the admin PW.

If logged in as root, simply add an entry to your account's loggin items (check the box to run hidden). If usually you do rather not log in as root you might simply run the script on demand (desktop, dock whatever).

The script closes with killall Terminal so there is no windows to close.

(Adding the kextload to rc.common as some people suggest does NOT work)
BugsB
.. and the same thing as above as an app .. wub.gif (gracias to ~pcwiz for his lil how2)
~pcwiz
Lol no problemo biggrin.gif
BugsB
don't you love it when your students apply right away what you teach them .. rolleyes.gif
mtrog007
Hey hey hey bugsBunny I made that happen! pcwiz creates some good stuff
~pcwiz
OK, I've attached a new version of the script on the first post. Hopefully this fixes the errors, test it and tell me how it goes. Basically it checks if the kext is loaded using the kextstat command and if it is not loaded, it will load it.
mtrog007
~pcwiz, you might want to check this out wink.gif
~pcwiz
Hey thanks for putting that up! I'm sure it will help many people smile.gif You should also mention 2 more things:

1) "with administrator privileges" part is not necessary unless the command needs to be run as root (with sudo superuser privileges), but most commands are
2) If you have multiple commands you want to execute, you can put in multiple "do shell script" lines, one for each command

smile.gif
rals2007
Still getting the error zero on a P4 System. sad.gif
BugsB
QUOTE (rals2007 @ Jul 4 2008, 01:32 AM) *
Still getting the error zero on a P4 System. sad.gif
same thing here. It is detecting that the kext is already loaded. So that message would only have to be suppressed in the script, that's all, other than that it is working.
~pcwiz
Ah...I get it. I need to add an error handler for it smile.gif
BugsB
QUOTE (~pcwiz @ Jul 6 2008, 05:54 PM) *
Ah...I get it. I need to add an error handler for it smile.gif
yes, darn, this is the pro way of expressing it. Man, I LEARNED stuff like that (Pascal, Basic, VBasic, JavaScript, Action Script, a lil bit of bash/ php/ pearl), but sometimes my brain doesn't provide the right words right away .. hysterical.gif
~pcwiz
QUOTE (BugsBunny @ Jul 6 2008, 01:08 PM) *
yes, darn, this is the pro way of expressing it. Man, I LEARNED stuff like that (Pascal, Basic, VBasic, JavaScript, Action Script, a lil bit of bash/ php/ pearl), but sometimes my brain doesn't provide the right words right away .. hysterical.gif


hysterical.gif "So that message would only have to be suppressed in the script" laugh.gif I'll fix this up when I have time smile.gif
DarkGhostHunter
Not working here either.
~pcwiz
OK another new one attached. This time I added an error handler--
chesca_m
iam insatalling leo4allv3final.
and i got this error dont know how to fix it.
i think it is a usb problem.
thanks
CTAC
QUOTE (~pcwiz @ Jul 8 2008, 05:54 PM) *
OK another new one attached. This time I added an error handler--


Hi PcWiz,

I've modified your script slightly to get rid of those non zero errors, see attached.
Apparently when grep doesn't find a string it returns a 1 and apple script perceives it as a failed run. Without grep script actually runs faster and avoids the above problem.

I am seeing com.apple.iokit.IOUSBMassStorageClass loaded after running the script, but after some time it gets unloaded. Any ideas?
~pcwiz
Thanks for the fix smile.gif Yeah, you'd have to set it to run as a background process and to rerun it every few minutes, if that happens.
BugsB
yes, as a daemon. However the best solution is to always have same version of kernel + sys.kext.. wink.gif but we all know that
soretito
QUOTE (BugsBunny @ Jul 2 2008, 09:29 PM) *
~pcwiz, until you have refined the query if the IOUSBMassStorageClass.kext is loaded or not: attached is a lil script that will load the kext without checking. If one runs the correct system/kernel combination and the kext is already loaded, it should simply detect the kext being loaded, and nothing.

kext is loaded with sudo, so if not logged in as root, one will be asked for the admin PW.

If logged in as root, simply add an entry to your account's loggin items (check the box to run hidden). If usually you do rather not log in as root you might simply run the script on demand (desktop, dock whatever).

The script closes with killall Terminal so there is no windows to close.

(Adding the kextload to rc.common as some people suggest does NOT work)

BIG THANKS




This solved the slow usb problem I was having in my snow leo install, doing an install disk (via restore) from and to usb disk the time went from 14hs to 25 minutes!

Maybe its unstable, I hope not, its working superfast as I write this.



If I only were able to make work lan & wifi on this netbook I would be uber happy (hp mini 5101)

smile.gif

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.