Help - Search - Members - Calendar
Full Version: Injector Kexts And Efi Strings
Project OS X Forums > Snow Leopard Guides & Tutorials > New Users Discussion
calavera
note: this was originally posted in the leopard section on accident, mods please feel free to delete that post from new users over there, sorry

Hi there,

I'm relatively new to osx86, I've been playing with it for about a month now. One thing I have not been able to find is some good descriptions on the "hows and whys" of injector kexts, dsdt, and efi. There's tutorials all over the place on how to use a particular method to get some piece of hardware working correctly (though unfortunately not for my graphics card, 7950 GX2, which I still don't have working with hardware acceleration).

What I don't see anywhere is a good explanation of how something like nvenabler or nvinject gets a graphics card to work with os x. For instance, I took a chance and tried installing nvinject on my system with the easyinstall package. I am able to boot with multiple resolutions enabled in system preferences, but if I change to anything other than the 1280.1024 I booted with, the width sets itself to 640 while the height stays correct. So I started doing my own investigations into what was really going on behind the scenes, and I've been unable to find a working explanation of HOW nvinject actually does what it does. I understand that it inserts values into the ioregistry, and I've even walked through some of the gfxutil source code to understand better what that even means. But, I still don't know why putting a file named nvinject.kext in S/L/E gets OS X to even load it, much less make the card work.

I have similar gaps in knowledge with the other methods like EFI (which was why i looked into the gfxutil source, trying to see if I could modify it to output multiple pciroots for cards with dual gpus like mine, which might help me generate an EFI string). I can grasp the code, but if I don't understand the point of the xml file it outputs, then I don't really know what I'm trying to do.

Can anybody point me towards some more in-depth information on these subjects? It seems to be lacking or I just really suck at using google. I'm surprised at the lack of information on dual-gpu graphics cards as well, seems like I'm the only person on earth trying to use a 7950 GX2 with 10.6.0 smile.gif

Thanks in advance for any direction that can be provided.
Slice
First of all, I see you are trying different methods of the same action instead of changing the action.
Sure
nvinjector==DSDT_patch==EFI_strings
Why? They are injectors.
A driver for NVidia is presented by a set of kexts
CODE
GeForceVADriver.bundle
GeForceFXGLDriver.bundle
GeForceGA.plugin
GeForce3GLDriver.bundle
GeForce2MXGLDriver.bundle
GeForce.kext
NVDAResman.kext
NVDANV40Hal.kext
NVDANV30Hal.kext
NVDANV20Hal.kext
NVDANV10Hal.kext
and variations

Are you sure these kexts have your DeviceID in info.plist?
But these kexts ask to system about properties of Video Card. Family? Video Memory? Serial Number? etc.
The task for any Injector is to write correct properties for the driver to work.
Typical set of working parameters
Click to view attachment
And the last remark. NVidia 7xxx have a problem in Snow, try 10.5.8.
calavera
Hi Slice, thanks for your reply!

QUOTE (Slice @ May 14 2010, 11:24 PM) *
First of all, I see you are trying different methods of the same action instead of changing the action.
Sure
nvinjector==DSDT_patch==EFI_strings
Why? They are injectors.


I haven't been using all these at the same time, just investigating them all to find a working fix for my card. The part where you say "they are injectors" is helpful because now I realize that they're all just different ways of doing the same thing (injecting values into the IORegistry), correct?

QUOTE (Slice @ May 14 2010, 11:24 PM) *
A driver for NVidia is presented by a set of kexts
CODE
GeForceVADriver.bundle
GeForceFXGLDriver.bundle
GeForceGA.plugin
GeForce3GLDriver.bundle
GeForce2MXGLDriver.bundle
GeForce.kext
NVDAResman.kext
NVDANV40Hal.kext
NVDANV30Hal.kext
NVDANV20Hal.kext
NVDANV10Hal.kext
and variations


Are you sure these kexts have your DeviceID in info.plist?


This is also very helpful as I wasn't sure if all these files were necessary. Last night I was following this guide and I thought maybe the OP was saying that I only needed an injector kext (nvenabler 0.1.kext) + NVDAResman.kext and NVDANV40Hal.kext. Sounds like you're saying that all of these files are necessary and they all must contain the device-id regardless of the card series (7xxx, 8xxx, 9xxx, etc) you are using?

QUOTE (Slice @ May 14 2010, 11:24 PM) *
But these kexts ask to system about properties of Video Card. Family? Video Memory? Serial Number? etc.
The task for any Injector is to write correct properties for the driver to work.


This makes sense, but in the case of an injector.kext, HOW is the kext loaded? What makes the OS X system decide to load the injector kext that enables it to inject these values into the IORegistry?

QUOTE (Slice @ May 14 2010, 11:24 PM) *
Typical set of working parameters
Click to view attachment
And the last remark. NVidia 7xxx have a problem in Snow, try 10.5.8.


As far as 7xxx having problem with SL, I did some searching. Seems that a lot of people had problems when updating to 10.6.2. But I'm running 10.6.0, and I couldn't find anything specifically saying that there should be any problems with that version. Also, seems like a lot of the problems were with running the x64 kernel. I don't THINK i'm running the 64 kernel, but I don't know for sure. How can I tell? Does chameleon/pc_efi default to x64 or 32 bit? I'm booting from an install of myHack.

Thanks again for your reply and help!
calavera
An added note:

I installed using the MyHack installer and chose GraphicsDisabler when I installed the bootloader to my os x drive. It appears that all this does is move all the graphics kexts out of S/L/E and into a folder /S/L/E/DisabledGraphics. Well, that folder only has nvdanv40hal.kext and nvdanv50hal.kext. Should I have 10, 20 and 30 or does Snow Leopard not come with these kexts?
Slice
QUOTE (calavera @ May 15 2010, 11:42 PM) *
An added note:

I installed using the MyHack installer and chose GraphicsDisabler when I installed the bootloader to my os x drive. It appears that all this does is move all the graphics kexts out of S/L/E and into a folder /S/L/E/DisabledGraphics. Well, that folder only has nvdanv40hal.kext and nvdanv50hal.kext. Should I have 10, 20 and 30 or does Snow Leopard not come with these kexts?

No, you need only 40hal. It correspond to 7xxx.
But keep also GeforceXXXX.kexts
calavera
QUOTE (Slice @ May 16 2010, 12:47 AM) *
No, you need only 40hal. It correspond to 7xxx.
But keep also GeforceXXXX.kexts


I'm slowly making progress on this. I have stable boot with either dvi output, resolutions enabled in the display preferences, but still no hardware acceleration.

Up till this morning I could only get NVDANV40hal.kext and NVDAResman to load. I realized that I was using the all nvidia device mask and not my device's specific id, which may have been causing problems since there is extra pci hardware involved (bridges) in a GX2 card. So I switched to only using the specific device-id, and also added VRAM,totalsize to NVInject.kext. I'm now using the dual card version of NVInject, v0.2.0d.

Injecting VRAM,totalsize as 0x0200 (512) seemed to enable Geforce.kext to load. But strangely there's still no hardware acceleration. Does hardware acceleration come from Geforce.kext, or is it the plugins like Geforce7xxx and GeforceGA that enable that? I'm not sure how to tell whether the plugins are even loading.

Two things that stand out to me as possible issues:

NVDANV40hal.kext shows up in kernel.log as loaded BEFORE NVInject.kext starts injecting values. Wondering if upping NVInject.kext's IOProbeScore value to 60001 might help because currently they both have an IOProbeScore of 60000. Since NVDANV40hal.kext comes first alphabetically, it gets probed first apparently. But I'm not sure if this even matters, and can find no discussion of this on the inter-webs.

NVInject.kext in System Profiler -> Extensions displays as NO for 64-bit enabled. All of the other Nvidia kexts (nvdanv40hal, nvdaresman, and geforce) say YES. Is there a 32-bit-only version of these kexts, or can I force them to load in 32-bit mode? Would this even solve the hardware acceleration problem?
calavera
QUOTE (calavera @ May 18 2010, 02:02 PM) *
I'm slowly making progress on this. I have stable boot with either dvi output, resolutions enabled in the display preferences, but still no hardware acceleration.

Up till this morning I could only get NVDANV40hal.kext and NVDAResman to load. I realized that I was using the all nvidia device mask and not my device's specific id, which may have been causing problems since there is extra pci hardware involved (bridges) in a GX2 card. So I switched to only using the specific device-id, and also added VRAM,totalsize to NVInject.kext. I'm now using the dual card version of NVInject, v0.2.0d.

Injecting VRAM,totalsize as 0x0200 (512) seemed to enable Geforce.kext to load. But strangely there's still no hardware acceleration. Does hardware acceleration come from Geforce.kext, or is it the plugins like Geforce7xxx and GeforceGA that enable that? I'm not sure how to tell whether the plugins are even loading.

Two things that stand out to me as possible issues:

NVDANV40hal.kext shows up in kernel.log as loaded BEFORE NVInject.kext starts injecting values. Wondering if upping NVInject.kext's IOProbeScore value to 60001 might help because currently they both have an IOProbeScore of 60000. Since NVDANV40hal.kext comes first alphabetically, it gets probed first apparently. But I'm not sure if this even matters, and can find no discussion of this on the inter-webs.

NVInject.kext in System Profiler -> Extensions displays as NO for 64-bit enabled. All of the other Nvidia kexts (nvdanv40hal, nvdaresman, and geforce) say YES. Is there a 32-bit-only version of these kexts, or can I force them to load in 32-bit mode? Would this even solve the hardware acceleration problem?


I also noticed some strange behavior. The description above applies to when I boot with the monitor attached to the 2nd dvi output on my card (farthest from motherboard). If I boot with the 1st output connected, NvInject and Geforce kexts do not show up in System Profiler, but otherwise the behavior is the same (resolutions, no QE/CI).

Also, if I change resolutions while connected to either output, any resolution I switch to (including the one I booted with - 1280x1024) has the width replaced by 640. For example, if I switch to 1024x768, my display goes into 640x768. If I switch back to 1280x1024, it displays as 640x1024, until I reboot.

If I hotswap the outputs, everything works fine... unless I am connected to the second output, pull out the cord, and plug it back into the same (second) outlet. Then, it does the same weird resolution thing on the second output until I reboot, but the 1st output continues to function normally if I plug into it.

Never ending weirdness....
Gringo Vermelho
Try using NVEnabler instead of NVInject. Older injectors like NVInject does not inject a display-config value.
QUOTE (calavera @ May 18 2010, 06:02 PM) *
Wondering if upping NVInject.kext's IOProbeScore value to 60001 might help


You've got it backwards. The lower the IOProbescore, the earlier the extension will load. Krazubu mentions setting the IOProbescore to 0 in one of the Nvidia threads, don't remember if it's his 'guide for all nvidia boards' or the NVEnabler release thread.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.