~pcwiz
Jun 22 2008, 05:16 AM
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

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
EDIT: As of July 8th, new version attached
mitch_de
Jun 22 2008, 05:44 AM
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
Jun 22 2008, 06:06 AM
Wouldn't "usb fix 1.3.mpkg" be a better option?
BugsB
Jun 22 2008, 11:06 AM
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
Jun 22 2008, 02:11 PM
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!
Jun 22 2008, 05:07 PM
I have this message "The command gaves back an result <> zero." too
pivy
Jun 22 2008, 05:10 PM
same problem....
thiathias
Jun 22 2008, 06:29 PM
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
Jun 22 2008, 08:12 PM
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
Jun 24 2008, 07:18 PM
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
Jun 30 2008, 10:47 PM
Ok, I will take a look at this back when I am at my hack.
BugsB
Jul 2 2008, 11: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)
BugsB
Jul 3 2008, 11:55 AM
.. and the same thing as above as an app ..

(gracias to ~pcwiz for his
lil how2)
~pcwiz
Jul 3 2008, 04:17 PM
Lol no problemo
BugsB
Jul 3 2008, 08:17 PM
don't you love it when your students apply right away what you teach them ..
mtrog007
Jul 3 2008, 08:46 PM
Hey hey hey bugsBunny I made that happen! pcwiz creates some good stuff
~pcwiz
Jul 3 2008, 09:01 PM
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
Jul 3 2008, 09:08 PM
~pcwiz, you might want to check
this out
~pcwiz
Jul 3 2008, 09:11 PM
Hey thanks for putting that up! I'm sure it will help many people

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
rals2007
Jul 3 2008, 11:32 PM
Still getting the error zero on a P4 System.
BugsB
Jul 6 2008, 09:55 AM
QUOTE(rals2007 @ Jul 4 2008, 01:32 AM)

Still getting the error zero on a P4 System.

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
Jul 6 2008, 03:54 PM
Ah...I get it. I need to add an error handler for it
BugsB
Jul 6 2008, 08:08 PM
QUOTE(~pcwiz @ Jul 6 2008, 05:54 PM)

Ah...I get it. I need to add an error handler for it

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 ..
~pcwiz
Jul 6 2008, 09:59 PM
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 ..


"So that message would only have to be suppressed in the script"

I'll fix this up when I have time
DarkGhostHunter
Jul 7 2008, 07:14 AM
Not working here either.
~pcwiz
Jul 8 2008, 05:54 PM
OK another new one attached. This time I added an error handler--
chesca_m
Jul 9 2008, 01:22 AM
iam insatalling leo4allv3final.
and i got this error dont know how to fix it.
i think it is a usb problem.
thanks
CTAC
Jul 17 2008, 09:13 PM
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
Jul 17 2008, 09:36 PM
Thanks for the fix

Yeah, you'd have to set it to run as a background process and to rerun it every few minutes, if that happens.
BugsB
Jul 17 2008, 09:39 PM
yes, as a daemon. However the best solution is to always have same version of kernel + sys.kext..

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