Jump to content

Enable nVidia drivers


oldnapalm
 Share

29 posts in this topic

Recommended Posts

You can use a patch to enable nVidia drivers by injecting the needed properties in DSDT.

 

plisteditor.png

 

Please see this topic for more information about device-properties

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

 

To find out where to insert the patch, you can use IORegistryExplorer.

 

ioreg.png

 

Sample code to be inserted (into P0P2 in the above example)

                Device (GFX0)
               {
                   Name (_ADR, Zero)
                   Method (_DSM, 4, NotSerialized)
                   {
                       Store (Package ()
                           {
                               "@0,compatible", 
                               Buffer ()
                               {
                                   "NVDA,NVMac"
                               }, 

                               "@0,device_type", 
                               Buffer ()
                               {
                                   "display"
                               }, 

                               "@0,name", 
                               Buffer ()
                               {
                                   "NVDA,Display-A"
                               }, 

                               "@1,compatible", 
                               Buffer ()
                               {
                                   "NVDA,NVMac"
                               }, 

                               "@1,device_type", 
                               Buffer ()
                               {
                                   "display"
                               }, 

                               "@1,name", 
                               Buffer ()
                               {
                                   "NVDA,Display-B"
                               }, 

                               "NVCAP", 
                               Buffer ()
                               {
                                   /* 0000 */    0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 
                                   /* 0008 */    0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 
                                   /* 0010 */    0x00, 0x00, 0x00, 0x00
                               }, 

                               "NVPM", 
                               Buffer ()
                               {
                                   /* 0000 */    0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                   /* 0008 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                   /* 0010 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                   /* 0018 */    0x00, 0x00, 0x00, 0x00
                               }, 

                               "VRAM,totalsize", 
                               Buffer ()
                               {
                                   0x00, 0x00, 0x00, 0x20
                               }, 

                               "device_type", 
                               Buffer ()
                               {
                                   "NVDA,Parent"
                               }, 

                               "model", 
                               Buffer ()
                               {
                                   "nVidia GeForce 9800 GTX"
                               }, 

                               "rom-revision", 
                               Buffer ()
                               {
                                   "nVidia GeForce 9800 GTX OpenGL Engine"
                               }
                           }, Local0)
                       DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                       Return (Local0)
                   }
               }

 

In some motherboards the device where GFX0 resides is not present in DSDT, so you need to insert it as well (into PCI0)

			Device (PEG1)
		{
			Name (_ADR, 0x00010000)
			Device (GFX0)
			{
				... same as above
			}
		}

 

Sample patches to be applied using DSDT Editor:

 

Asus motherboards

nVidia_9800_GTX_512_MB.txt

Gigabyte motherboards

nVidia_9600_GT_1GB_PCI0.txt

Link to comment
Share on other sites

  • 3 weeks later...

Hello I can explain how you have to compile the dsdt video card.

To be precise this part, I point out your example for the marked in red.

I apologize for English.

 

 Device (GFX0)
               {
                   Name (_ADR, Zero)
                   Method (_DSM, 4, NotSerialized)
                   {
                       Store (Package ()
                           {
                               "@0,compatible", 
                               Buffer ()
                               {
                                   "NVDA,NVMac"
                               }, 

                               "@0,device_type", 
                               Buffer ()
                               {
                                   "display"
                               }, 

                               "@0,name", 
                               Buffer ()
                               {
                                   "NVDA,Display-A"
                               }, 

                               "@1,compatible", 
                               Buffer ()
                               {
                                   "NVDA,NVMac"
                               }, 

                               "@1,device_type", 
                               Buffer ()
                               {
                                   "display"
                               }, 

                               "@1,name", 
                               Buffer ()
                               {
                                   "NVDA,Display-B"
                               }, 

[color="#FF0000"]                               "NVCAP", 
                               Buffer ()
                               {
                                   /* 0000 */    0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 
                                   /* 0008 */    0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 
                                   /* 0010 */    0x00, 0x00, 0x00, 0x00
                               }, 

                               "NVPM", 
                               Buffer ()
                               {
                                   /* 0000 */    0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                   /* 0008 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                   /* 0010 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                   /* 0018 */    0x00, 0x00, 0x00, 0x00
                               }, 

                               "VRAM,totalsize", 
                               Buffer ()
                               {
                                   0x00, 0x00, 0x00, 0x20
                               }, [/color][/color]

                               "device_type", 
                               Buffer ()
                               {
                                   "NVDA,Parent"
                               }, 

                               "model", 
                               Buffer ()
                               {
                                   "nVidia GeForce 9800 GTX"
                               }, 

                               "rom-revision", 
                               Buffer ()
                               {
                                   "nVidia GeForce 9800 GTX OpenGL Engine"
                               }
                           }, Local0)
                       DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                       Return (Local0)
                   }
               }

 

Thank you

Link to comment
Share on other sites

Thanx for sharing, Oldnapalm !

 

But, what about the situation we now have - Chameleon includes already

an automatic power management and graphics card detection,

are EFI-strings, kext-injectors and your way through DSDT obsolete methods ?

 

Thanx in advance for a clarification.

 

Cheers

Link to comment
Share on other sites

@iFabios71

 

Sorry, I don't understand your question. Please note this is only a sample and values are not valid for all cards.

 

 

@MacFanatic76

 

If you use Chameleon's GraphicsEnabler you don't need EFI strings or this DSDT method, this is only a sample I posted as part of this basic nVidia injection guide. It may be useful in other situations, like if you are booting Lion with a boot loader that doesn't have the GraphicsEnabler feature (XPC, [url="http://www.insanelymac.com/forum/topic/279450-why-insanelymac-does-not-support-tonymacx86/"]#####[/url]).

Link to comment
Share on other sites

Hello I can explain how you have to compile the dsdt video card.

To be precise this part, I point out your example for the marked in red.

I apologize for English.

 

 Device (GFX0)
               {
                   Name (_ADR, Zero)
                   Method (_DSM, 4, NotSerialized)
                   {
                       Store (Package ()
                           {
                               "@0,compatible", 
                               Buffer ()
                               {
                                   "NVDA,NVMac"
                               }, 

                               "@0,device_type", 
                               Buffer ()
                               {
                                   "display"
                               }, 

                               "@0,name", 
                               Buffer ()
                               {
                                   "NVDA,Display-A"
                               }, 

                               "@1,compatible", 
                               Buffer ()
                               {
                                   "NVDA,NVMac"
                               }, 

                               "@1,device_type", 
                               Buffer ()
                               {
                                   "display"
                               }, 

                               "@1,name", 
                               Buffer ()
                               {
                                   "NVDA,Display-B"
                               }, 

[color="#FF0000"]                               "NVCAP", 
                               Buffer ()
                               {
                                   /* 0000 */    0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 
                                   /* 0008 */    0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 
                                   /* 0010 */    0x00, 0x00, 0x00, 0x00
                               }, 

                               "NVPM", 
                               Buffer ()
                               {
                                   /* 0000 */    0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                   /* 0008 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                   /* 0010 */    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
                                   /* 0018 */    0x00, 0x00, 0x00, 0x00
                               }, 

                               "VRAM,totalsize", 
                               Buffer ()
                               {
                                   0x00, 0x00, 0x00, 0x20
                               }, [/color]

                               "device_type", 
                               Buffer ()
                               {
                                   "NVDA,Parent"
                               }, 

                               "model", 
                               Buffer ()
                               {
                                   "nVidia GeForce 9800 GTX"
                               }, 

                               "rom-revision", 
                               Buffer ()
                               {
                                   "nVidia GeForce 9800 GTX OpenGL Engine"
                               }
                           }, Local0)
                       DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                       Return (Local0)
                   }
               }

 

Thank you

 

Hi Fabios :D

 

• You can read the NVCAP from IORegistry

 

3496u5u.png

 

 

• The NVPM is the same for every Nvidia Cards:

 

 
/* 0000 */	0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
/* 0008 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
/* 0010 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
/* 0018 */	0x00, 0x00, 0x00, 0x00

 

 

 

• Instead the VRAM depends of RAM of the card

 

512MB

0x00, 0x00, 0x00, 0x20

 

1GB

0x00, 0x00, 0x00, 0x40

 

1,5GB

0x00, 0x00, 0x00, 0x60

 

 

• In the end you can add the reg to complete your work

 

4iykz.png

 

"reg", 
				Buffer (0x78)
				{
					/* 0000 */	0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 
					/* 0008 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
					/* 0010 */	0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x01, 0x02, 
					/* 0018 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
					/* 0020 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
					/* 0028 */	0x14, 0x00, 0x01, 0x42, 0x00, 0x00, 0x00, 0x00, 
					/* 0030 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
					/* 0038 */	0x00, 0x00, 0x00, 0x10, 0x1C, 0x00, 0x01, 0x02, 
					/* 0040 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
					/* 0048 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 
					/* 0050 */	0x24, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 
					/* 0058 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
					/* 0060 */	0x80, 0x00, 0x00, 0x00, 0x30, 0x00, 0x01, 0x02, 
					/* 0068 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
					/* 0070 */	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00
				}
			}, Local0)
		DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))

Link to comment
Share on other sites

  • 4 months later...

Please attach full *.dsl (disassembled dsdt.aml file) file for example (tnx).

I already have information in P0P2 section. New section overwritten old info, or add to the end of section?

Code, present in DSDT:

			Device (P0P2)
		{
			Name (_ADR, 0x00010000)
			Method (_PRW, 0, NotSerialized)
			{
				Return (GPRW (0x09, 0x04))
			}

			Method (_PRT, 0, NotSerialized)
			{
				If (PICM)
				{
					Return (AR02)
				}

				Return (PR02)
			}
		}

Thanx.

My DSDT in attachment.

dsdt.zip

gfx_section.rtf

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 1 month later...

I had my GTX 460 working fine with GraphicsEnabler but seeing as I'm already loading a DSDT I figured it'd be no harm to use this method instead. It works fine but there's one minor (cosmetic) difference. The PCIe slot isn't listed in System Profiler. Here's how it looks with GraphicEnabler

 

screenshot20120202at155.png

 

I figure this could be done by adding the "Slot-1" entry to PEG1, but I'm not savvy enough with DSDT editing to figure out how to do this yet.

Link to comment
Share on other sites

Yep I was just going to reply with that. I'm getting better at this stuff :)

 

"AAPL,slot-name",
							Buffer (0x07)
							{
								"Slot-1"
							}

 

I thought it might have to go under PEG1, but it's actually under GFX0.

 

Adding this also makes the card show up under PCI Cards. Without this it doesn't.

Link to comment
Share on other sites

  • 7 months later...

This silly Slot-1 thing has reared it's head again. I'm on a new board and try as I might i can't get it to change the slot name from PCIEX1_1 (which is wrong anyway as it's in the PCIEX16_1 slot) to Slot-1. Chameleon's graphics enabler can do it just fine, but the DSDT edit doesn't.

Link to comment
Share on other sites

This silly Slot-1 thing has reared it's head again. I'm on a new board and try as I might i can't get it to change the slot name from PCIEX1_1 (which is wrong anyway as it's in the PCIEX16_1 slot) to Slot-1. Chameleon's graphics enabler can do it just fine, but the DSDT edit doesn't.

 

We are all cosmetic nuts.

Link to comment
Share on other sites

We are all cosmetic nuts.

 

Lol, indeed! I guess I'd just like to have it perfect once I'm using it in place of graphics enabler. There's no real reason for me to use the DSDT edit over GE. I just figured that while I'm using a DSDT I might as well use it to enable the graphics as well. One less hack to load on startup.

 

That and the fact that I can't understand why it's not over-riding the slot name.

Link to comment
Share on other sites

Yep, that should work. It worked on my old board. But it doesn't here. It writes the model, the revision number etc just fine. But it won't overwrite the slot name.

 

That reminds me about something I've been meaning to ask about buffer sizes. How come they're often one character more than their contents? In your example PCI3 is 4 characters, but the buffer is 5. I usually set the buffer to match the contents.

Link to comment
Share on other sites

Yep, that should work. It worked on my old board. But it doesn't here. It writes the model, the revision number etc just fine. But it won't overwrite the slot name.

 

That reminds me about something I've been meaning to ask about buffer sizes. How come they're often one character more than their contents? In your example PCI3 is 4 characters, but the buffer is 5. I usually set the buffer to match the contents.

 

I always add 2 over for the buffer sizes when doing names. So I count the characters and say it is 20 I will enter Buffer(0020) and the compiler will change it to Buffer (0x..) and if you put to many you get ,,,,,, that tells you you are over 3 buffer sizes to large or more.

 

The following is what happens you get crazy with the DSDT edits. Attached is a pic that shows what I add to all of my DSDT's I make so that people know who made it and where to go for help:

 

post-810930-0-54419700-1348799286_thumb.png

  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...