Jump to content

Kexts are being processed on every boot


  • Please log in to reply
41 replies to this topic

#1
KariNeko

KariNeko

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 232 posts
  • Gender:Female
  • Location:Buenos Aires, Argentina
Hi, I'm trying out Lion DP 4 with latest updates on my Asus P6T Deluxe V2, i7 920, GTX 260 Hackintosh.
The bootloader I used is Chameleon_2.0_RC5_r1020.pkg
My only kexts in /Extra/Extensions is fakesmc.kext for now.
Obviously I have my DSDT.aml in /Extra.
Tried latest versions of Kext Utility and Kext Wizard.

I'm having a slow boot because the Kexts are being processed on every boot, and it takes quite some time, when it finishes then the normal boot take place. It happens on every boot. Like a when a mkext is missing.

If I look at /System/Library/Caches/com.apple.kext.caches/Startup/kernelcache and /var/db/BootCache.data boot files always have a modification date from the actual boot time, is this normal?

Any idea of what's happening?

Thanks in advance,
Karina

#2
jfMac

jfMac

    InsanelyMac Protégé

  • Members
  • Pip
  • 13 posts
  • Gender:Not Telling
  • Interests:Everything Apple and OSx86
I was running into the same problem with DP4, and I found a post "somewhere" on some other forum. The poster was Oldnapalm. Here's the command that worked for me:

sudo kextcache -v 1 -a i386 -a x86_64 -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions

It creates kextcache and the mkext for /S/L/E.
Hope it works for you.

#3
BladeRunner

BladeRunner

    InsanelyMac Legend

  • Donators
  • 688 posts
  • Gender:Male
  • Location:New York
Thanks for the post! It solved the same problem for me. I hope it helps the O.P. also.

#4
KariNeko

KariNeko

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 232 posts
  • Gender:Female
  • Location:Buenos Aires, Argentina
Hi guys, thanks for the help. :)

It's working now with that solution!!!, now I'm confused, wasn't the mkext supposed to be created with Kext Utility and Kext Wizard? like in old times. :huh:

#5
efimac

efimac

    InsanelyMac Protégé

  • Members
  • PipPip
  • 53 posts
I use the UseKernelCache=Yes on my com.apple.boot.plist and it works okay.

#6
kitmac

kitmac

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 209 posts
  • Gender:Male
thanx..... I was wondering about that

#7
KariNeko

KariNeko

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 232 posts
  • Gender:Female
  • Location:Buenos Aires, Argentina

I use the UseKernelCache=Yes on my com.apple.boot.plist and it works okay.


Yes, but when you use UseKernelCache how are your /E/E being processed? or did you copy them to /S/L/E ?

----

Also does anyone know an answer to my question about Kext Utility and Kext Wizard not creating the corresponding mkext that the kextload command created?


Karina

#8
efimac

efimac

    InsanelyMac Protégé

  • Members
  • PipPip
  • 53 posts
You want to add -usecache for /E/E

#9
griven

griven

    InsanelyMac Protégé

  • Members
  • Pip
  • 38 posts
  • Gender:Male
  • Location:Bochum, NRW, Germany
Just want to say Thank You works perfect :o

#10
helob

helob

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 218 posts

You want to add -usecache for /E/E


How to add -usecache for/E/E?
Couldn't find use cache.kext.
Try Boot option -usecache but no joy :) .
Using Chameleon RC5 r1020.
TQ

#11
jfMac

jfMac

    InsanelyMac Protégé

  • Members
  • Pip
  • 13 posts
  • Gender:Not Telling
  • Interests:Everything Apple and OSx86
KariNeko-

Also does anyone know an answer to my question about Kext Utility and Kext Wizard not creating the corresponding mkext that the kextload command created?


You would need to look at the source code for Kext Utility and Kext Wizard to see what's going on. Kext Wizard does create an mkext for /E/E, but not for /S/L/E. Lion does not by default create/use an mkext.

helob-
Depending on which Chameleon and or Lion install method you used, some commands work for one and not others at the prompt before boot.

One place to begin seeing what's going or "what's new" in Lion vs Snow is to read:

man kextcache


#12
Kari_Juhani

Kari_Juhani

    InsanelyMac Protégé

  • Donators
  • 83 posts
  • Gender:Male
  • Location:Helsinki
  • Interests:Messing around, annoying other people, fixing things that are not broken, and - of course - put...
Thanks jfMac, this solved my slow boot !!

Kari

#13
tuxuser33

tuxuser33

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 215 posts
  • Gender:Male
I'am on Lion DP4 11A494a

built the kext.cache as mentioned before using

sudo kextcache -v 1 -a i386 -a x86_64 -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions


But I had to move prior all non-OSX kext to /E/E.

Because of kextbuild complaints like "kext xxx is not authentic..bla bla"

i.E. RTL81xxx.kext and PXHCD.kext (for Renesas USB3)

No need for editing apple.com.Boot.plist.

#14
stevekicks

stevekicks

    InsanelyMac Protégé

  • Members
  • Pip
  • 35 posts
Here's some info on using kernelcache...

It works well, but the down side is that all the kexts you want to use have to be in /S/L/E. So for me, i've got:

- AppleHDA.kext (from 10.6.2)
- RealtekRTL81xx.kext
- ALC8xxHDA.kext
- FakeSMC.kext
- JMicron36xSATA.kext

These kexts need to have the root:wheel ownership, and 644 permissions.

In your com.apple.boot.plist file, put in the following:

<key>UseKernelCache</key>
<string>Yes</string>

Once that's done - simply delete /System/Library/Caches/com.apple.kext.caches/Startup/kernelcache and reboot your machine. It'll rebuild the kernelcache file and the bootloader will use it upon startup.

The upside to using this method is that the kernelcache file is rebuilt when new kexts are installed. When using an mkext file, you have to keep it up to date yourself.

Of course - using this method will not touch your /E/E or /EFI/E/E kexts. If you want these to be processed as a once off - just boot with the -f option and it will ignore all caches.

Just thought i'd share

#15
KariNeko

KariNeko

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 232 posts
  • Gender:Female
  • Location:Buenos Aires, Argentina
Hi, thanks for the information, so for now we have two options:

1) Use old kextcache (mkext) method, and have to manually ran kextcache -v 1 blabla to update the cache file on each extensions change. com.apple.boot.plist does not require modification.

or

2) Use new kernelcache method, placing extensions from /E/E in /S/L/E and Lion will rebuild the cache every time something changes in /S/L/E. com.apple.boot.plist modified to UseKernelCache=Yes

#16
wermy

wermy

    InsanelyMac Protégé

  • Members
  • Pip
  • 11 posts
Hi,
I had the kext processing on boot problem as well. Running "sudo kextcache -v 1 -a i386 -a x86_64 -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions" fixed it for me. But, after doing this I installed a kext to make my sound work. Rebooting after installing my sound driver made it process the kext files again, which was somewhat understandable... But it does it on every boot now. Re-running the above command fixed it, but then my sound doesn't work. Can anyone point me in the right direction? At this point I can either live with no sound and fast boots, or sound with slow boots. Not a very good choice to have to make. :P

#17
stevekicks

stevekicks

    InsanelyMac Protégé

  • Members
  • Pip
  • 35 posts
i had the exact same problem using the mkext file.

switching to the UseKernelCache option fixed this for me.

#18
wermy

wermy

    InsanelyMac Protégé

  • Members
  • Pip
  • 11 posts

i had the exact same problem using the mkext file.

switching to the UseKernelCache option fixed this for me.


Thanks. I tried following your directions above, but after doing so it wouldn't boot. It hangs with the error: "ACPI_SMC_PlatformPlugin::registerLPCDriver - failed to locate SMC driver"

If I reboot with -x, I can remove the flag from the boot plist file, reboot again (and wait 5 minutes while it does so), it successfully boots.

I'm a bit of a noobie with this stuff, I'm afraid. Anyone have any suggestions?

EDIT: Fixed it! I had to put the .kext files that were in /E/E to /S/L/E, then run the command that creates the mkext. Seems to be working fine now. :P

#19
Comodin

Comodin

    InsanelyMac Protégé

  • Members
  • Pip
  • 46 posts
  • Gender:Male
  • Location:Ecuador
I had the same problem with verbose boot but it was fast with normal boot. :thumbsup_anim:

#20
snyder9

snyder9

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts
  • Gender:Male
  • Location:Toronto

I was running into the same problem with DP4, and I found a post "somewhere" on some other forum. The poster was Oldnapalm. Here's the command that worked for me:

sudo kextcache -v 1 -a i386 -a x86_64 -m /System/Library/Caches/com.apple.kext.caches/Startup/Extensions.mkext /System/Library/Extensions

It creates kextcache and the mkext for /S/L/E.
Hope it works for you.


This worked for me as well in speeding up my boot. :(
I also added the -z flag.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy