USB driver not loading one USB image but loads another?

99 Views Asked by At

I have a usb driver with multiple IOKitPersonalities each with a IOMediaIcon entry. all works fine if the usb devices are plugged in after the kext has been loaded (kext loads fine, is signed, etc.). but after reboot of the computer, only ONE of the usb devices shows the standard orange default usb image. if I unplug/reload kext/replug the usb device in, the image gets corrected.

Any thoughts?

(Details: running Mac OS X 10.10.1 (I don't think I saw this problem before Yosemite, definitely not a problem on 10.6.8), all the Personalities are the same (except for the IDs (which are correct I think since the usb device loads correctly if I plug in after the kext is loaded) so it isn't mistake with the personality...)

1

There are 1 best solutions below

0
On

I don't know how to fix your specific problem, but I can give you some pointers which may or may not be helpful (sorry, a bit too big for a comment, but not a proper answer):

  • The icon stuff is handled in user space, the only thing that the kernel should have to do in theory is set the IOMediaIcon before registering the service. Setting it in the personality should be fine.
  • In user space, Disk Arbitration takes over. You can download (most of?) the source code for it from Apple's Open Source Site.
  • A quick search reveals that the diskarbitrationd source code does indeed reference the IOMediaIcon, in DADisk.c
  • I don't know how well it works to recompile diskarbitrationd and substitute Apple's binary with your own, but if that works, maybe you can modify it to log output from the icon code, and get closer to your answer that way?
  • The other source of error I can possibly think of is that although the system gets the correct icon information, it can't actually find the icon file? I've heard about various bugs related to bundles and resources in the context of /System/Library/Extensions vs /Library/Extensions since they added the latter. If your icons are in your kext bundle, and you've switched to /Library/Extensions, try switching back to SLE.

I hope that helps your debugging efforts!