Inert Detritus The Internet's dust bunnies

30 September 2007 @ 11am

Hacking the OS: Kernel Extensions and Software Updates

Hack­ing the OS: Ker­nel Exten­sions and Soft­ware Updates

My iBook G4 can’t be con­sid­ered a com­put­ing beast by any stretch of the imag­i­na­tion. The inter­nal dri­ve was a measly 30 GB when I received it from Apple in the spring of 2005. As a workaround, I quick­ly migrat­ed to exter­nal dri­ves for stor­ing data: start­ing with a 40 GB FireWire exter­nal dri­ve in 2004 (back when I had my iBook G3), to a com­bined total of 1.05 TB across six dri­ves, all attached over a FireWire hub.

Life was grand: I had three 3.5″ dri­ves, with 200, 300, and 320 GB of space. I had my iTunes library on the 200 GB, movies and TV shows on the 300 GB, and the 320 GB was spare space, used for inter­mit­tent back­ups and tem­po­rary stor­age. All three dri­ves were in 3.5″ MacAl­ly FireWire/USB 2.0 dri­ve enclosures.

10.4.9 intro­duced a nasty bug: dri­ves con­tained in any 3.5″ MacAl­ly enclo­sures no longer spun down when not being used, nor did they spin down when unmount­ing and eject­ing the dri­ves. Sud­den­ly, I had three exter­nal hard dri­ves which were con­stant­ly spinning.

After rolling back my sys­tem to 10.4.8, I began to brain­storm solu­tions. I had test­ed the dri­ves with oth­er point releas­es, and knew that some­thing in 10.4.9 was get­ting in the way. I down­loaded the 10.4.8 Com­bo update, and the 10.4.9 Delta, and opened up both in Paci­fist, look­ing at the ker­nel exten­sions to see what kexts were updat­ed in 10.4.9.

Some Googling and dig­ging around inside the kext pack­age con­tents led me to set­tle upon AppleStorageDrivers.kext as the like­ly offend­er. I ran a spe­cial back­up to a spare hard dri­ve to test my the­o­ry, and installed the 10.4.8 ver­sion of the kext over a sys­tem updat­ed to 10.4.9. Lo and behold, the dri­ves spun down prop­er­ly once more.

I was much more care­ful with the 10.4.10 update, and for good rea­son: AppleStor­ageDrivers were even worse. The dri­ves would now inter­mit­tent­ly spin down, with no rhyme or rea­son as far as I can tell. After anoth­er kext replace­ment and test­ing, I’m now run­ning 10.4.10 with my alter­na­tive kext.

I sub­mit­ted a bug report to Apple and am in the process of updat­ing them with the ker­nel exten­sion find­ings. I should find a devel­op­er with Leop­ard to make sure that the bug did­n’t sneak into 10.5 via kext changes. It’s Bug Radar 5084136.