Jump to content
11 posts in this topic

Recommended Posts

I have a PCI soundcard with an Envy chipset that I got working thanks to this guy here:

http://forum.insanelymac.com/index.php?showtopic=25145

 

It has stopped working due to memory allocations when loading drivers, and a possible solution would be to enforce the sound cards drivers to be loaded as "first" as possible.

 

For example, ask the Graphics drivers to require the sound cards drivers to be loaded first.

 

Does anyone know how to add such a dependancy within a kext's plist?

Ok so I might've stumbled upon something that could help:

 

In the relevant plist, one might add:

key:"OSBundleRequired"

value:"Root"

 

This ought to dictate priority in the kext in SOME fashion, not sure what though.

 

Question: If I do this in a plist and simply save it (using plist edit pro), would that be enough for it to take effect?

I actually go into the disc utility and hit repair permissions, but I don't know if it catches that one.

 

Of course I've tried this, but I can't see any change whatsoever, checking the system.log for example for changes in driver load order.

I don't believe OSBundleRequired changes the order in which kexts are loaded but more so if they are loaded at all in certain situations. From what I have experienced, when OSBundleRequired apears in the plist it means that it will be loaded even in Safe Mode. http://developer.apple.com/DOCUMENTATION/D.../20002369-97330

 

*Before you do anything I would recomend backing up your extensions folder. Let me know if you need instructions.

 

OSBundleLibraries is probably the answer to your problem. You will need to find out the CFBundleIdentifier for the kext you that you need loaded first. You can do this by opening the info.plist or if the file is currently loaded you can use kextstat in Terminal. For example the kext IOATAFamily.kext has a CFBundleIdentifier of com.apple.iokit.IOATAFamily.

 

Once you have this you can open info.plist in the kext which needs the dependency and add the following (replacing com.apple.iokit.IOATAFamily with the CFBundleIdentifier you found in the previous step):

<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IOATAFamily</key>
</dict>

Save info.plist and then type the following in Terminal:

sudo -s
cd /System/Library/
chmod -R 755 Extensions/
chown -R root:wheel Extensions/
touch Extensions/
rm -Rf Extensions.mkext

 

Reboot with -f

 

The above with set the proper permissions for your kexts. Using the Touch command, removing the cache file and booting with -f is pretty much redundant but it will make 100% sure that OSX rebuilds the cache with your modified file.

Even that big red star didn't save my sorry ass. (the one saying "BACKUP DAMNIT!")

 

Ok so now I can't boot mac os. Here's what I did:

 

In my system.log I noticed a NVDHAL50 (I'm guessing the exact name) being loaded before my sound card. I thought that I'd try to make that load AFTER the sound card.

 

Looked inside the envy (soundcard) kext's plist, found the CFBundleIdentifier with it's associated string.

Went to the NVDHAL50's plist and basically added that in as another key within the <dict> tag.

When I saved it, the plist edit pro said it needed a string value as well.

In the spirit of improvisation I found a version ID in the envy kext which I added as a string, "0.14.0".

 

So when I boot up, mac os says I have to reboot simply.

When I do it verbose mode (-v) it halts after some nvinject stuff.

 

I've done this:

boot -s

mount -uw /

/movevideodrivers

 

Which didn't help unfortunately.

 

So here's the question:

Any way to fix this without reinstalling?

Luckily I haven't settled into mac os just yet so it's no biggie, but it would be preferable to avoid reinstall.

Even that big red star didn't save my sorry ass. (the one saying "BACKUP DAMNIT!")

 

Ok so now I can't boot mac os. Here's what I did:

 

In my system.log I noticed a NVDHAL50 (I'm guessing the exact name) being loaded before my sound card. I thought that I'd try to make that load AFTER the sound card.

 

Looked inside the envy (soundcard) kext's plist, found the CFBundleIdentifier with it's associated string.

Went to the NVDHAL50's plist and basically added that in as another key within the <dict> tag.

When I saved it, the plist edit pro said it needed a string value as well.

In the spirit of improvisation I found a version ID in the envy kext which I added as a string, "0.14.0".

 

So when I boot up, mac os says I have to reboot simply.

When I do it verbose mode (-v) it halts after some nvinject stuff.

 

I've done this:

boot -s

mount -uw /

/movevideodrivers

 

Which didn't help unfortunately.

 

So here's the question:

Any way to fix this without reinstalling?

Luckily I haven't settled into mac os just yet so it's no biggie, but it would be preferable to avoid reinstall.

 

Try booting with -v -x and see if you can get in to correct the problem. If not read below.

 

So the only thing you did was modify NVDHAL50? If so here is mine from 10.5.5. http://rapidshare.com/files/193606737/NVDANV50Hal.zip Place it on a thumb drive and follow the below instructions.

 

Mount a USB thumb drive in Single User Mode -s

You can copy files to a USB thumb drive and then mount the drive in Single User Mode to correct certain issues.

Boot into Single User Mode without the USB thumb drive plugged in. You can do this by entering -s on start up.

 

1. Allow for the modification of files by typing:

/sbin/mount -uw /

2. Make a directory in /Volumes to mount your USB thumb drive to. We will call it "usbdrive" by typing:

mkdir /Volumes/usbdrive

3. Before we plug it in we need to take notice at what drives we see in /dev by typing (You might want to write them down):

ls /dev/disk*

4. Now plug in the usb thumb drive, wait a second then look for the new addition by typing:

ls /dev/disk*

5. Now lets mount it. Lets say you there are two new additions disk4 & disk4s1. Type the following (replace msdos with hfs depending on how the usb thumb drive is formatted. If you use it on a PC too then its most likely msdos):

mount -t msdos /dev/disk4s1 /Volumes/usbdrive

 

Then you can access your usb thumb drive at /Volumes/usbdrive

 

Copy kexts from your mounted USB thumb drive to your Extensions folder

Once you have the USB drive mounted you can move files around. For example you can do the following to install a kext stored on the USB thumb drive to your extensions folder. Assuming you followed the steps in the previous section.

1. Change directories to /System/Library This will shorten some of the commands we have to type in.

cd /System/Library

2. Make a backup copy of your kexts. First we will make a directory called "backup" in our root directory to store them. Open Terminal and type:

mkdir /backup

3. Copy your kexts to the new "backup" folder.

cp -r Extensions/ /backup/

4. Copy the kext from your USB thumb drive to the extensions folder (Replace MYKEXT.kext with the name of the kext you want to install Assuming that the file on is in the root directory of the USB thumb drive).

cp -r /Volumes/usbdrive/MYKEXT.kext Extensions/MYKEXT.kext

5. Set the proper permissions for the extensions folder.

chmod -R 755 Extensions/

6. Set the proper ownership for the extensions folder.

chown -R root:wheel Extensions/

7. Touch the extensions folder

touch Extensions/

8. Remove the extensions cache to force OSX to rebuild it with our new kext.

rm -rf Extensions.mkext

9. Reboot using the boot-flags -v -f

-v Verbose Mode displays useful information durring the boot process.

-f Forces OSX to load kexts from the extensions folder instead of the cache file. We did delete the cache file so this is just a precaution.

I got pretty far, to the point of copying over the file.

My lack of unix skills hindered me there.

 

It said I was trying to copy over a directory so it wouldn't work.

I tried copying the myname.kext/*.* to extensions/myname.kext/*.*

 

Otherwise, everything seemed to work so far.

You replaced myname.kext with the name of your kext correct? and why did you use *.*? Oh wait I left out -r on the 4th line.

 

cd /System/Library

mkdir /backup

cp -r Extensions/ /backup/

cp -r /Volumes/usbdrive/NVDANV50Hal.kext Extensions/NVDANV50Hal.kext

chmod -R 755 Extensions/

chown -R root:wheel Extensions/

touch Extensions/

rm -rf Extensions.mkext

You replaced myname.kext with the name of your kext correct? and why did you use *.*? Oh wait I left out -r on the 4th line.

 

cd /System/Library

mkdir /backup

cp -r Extensions/ /backup/

cp -r /Volumes/usbdrive/NVDANV50Hal.kext Extensions/NVDANV50Hal.kext

chmod -R 755 Extensions/

chown -R root:wheel Extensions/

touch Extensions/

rm -rf Extensions.mkext

 

The *.* was just a test to see if I could copy everything within the kext folder to the other kext folder. As in dos-style, which is only what I've used before. Anways..

 

I tried this method now and it seemed to work as far as inputting everything in prompt mode.

However, when I boot up again, it halted at the regular stop, namely:

"NVinject: Setting NVPM=<data not shown>"

 

I redid the process, then it halted at a line just after that, but I suspect it's the same error causing the halt;

ATSServer[64]: FODBReconcileWithAuxFile - font/annex_aux failed with -3129 at line 2233

 

Both of these times though, about a screen up, it said:

Cannot resolve dependencies for kernel extension NVDANV50Haldisplay

 

Which first had me believe it was still the same file giving me the same problem (which I initially created). Then I realized that I'm using 10.5.2, and the file you had was from 10.5.5.

 

Now, you've helped me more than I could ask for, so I will be reinstalled mac os and updating it instead, but I'm curious if I was correct in my reasoning about the version discrepancy. What do you think?

The *.* was just a test to see if I could copy everything within the kext folder to the other kext folder. As in dos-style, which is only what I've used before. Anways..

 

I tried this method now and it seemed to work as far as inputting everything in prompt mode.

However, when I boot up again, it halted at the regular stop, namely:

"NVinject: Setting NVPM=<data not shown>"

 

I redid the process, then it halted at a line just after that, but I suspect it's the same error causing the halt;

ATSServer[64]: FODBReconcileWithAuxFile - font/annex_aux failed with -3129 at line 2233

 

Both of these times though, about a screen up, it said:

Cannot resolve dependencies for kernel extension NVDANV50Haldisplay

 

Which first had me believe it was still the same file giving me the same problem (which I initially created). Then I realized that I'm using 10.5.2, and the file you had was from 10.5.5.

 

Now, you've helped me more than I could ask for, so I will be reinstalled mac os and updating it instead, but I'm curious if I was correct in my reasoning about the version discrepancy. What do you think?

 

That I am not 100% about :angel: Let us know how the next install goes.

Kext load order, and how the Info.plist should be edited is explained in apples docs. Just putting Root will not help, if you don't have a nub the kext can attach to during matching.

 

You seem to be up on these things. Was my explanation in post #3 correct in regards to OSBundleLibraries? I was not 100% sure.

×
×
  • Create New...