Jump to content
hk93

[DEV] Disabling the nvidia card for battery life (optimus)

20 posts in this topic

Recommended Posts

Yesterday I told myself as a n53sv owner that if there were not any way to use the DGPU (nvidia 540m in my case) there must be at least a way to disable it to save battery power.

I never used anything programming-on-osx-related but I got Xcode and started playing with it.

I must say that it was really easy.

This is the result:

NoNvidia: NoNvidia by michyprima, init
NoNvidia: got the ACPI device
NoNvidia: disabling nvidia card
NoNvidia: nvidia card successfully disabled

The code gets the ACPI device from the PCI device and calls the DOFF method. If your DGPU device (GFX0 in my case) has a DOFF method, you do not have to modify anything (if you don't care about the GFX led remaining white), since the ACPI device is got from the device id (0x0df410de in my case) set in the Info.plist

If your device has not a DOFF method or you want the led to turn blue, you have to do a little mod to your dsdt.

If your disabling function is not DOFF but i.e. GPUOFF is enough to replace any occurrence of GPUOFF with DOFF. (it's not the asus n53sv case)

If you want a complete disable, including the blue led (asus n53sv case) find where the DOFF function is called, in my case the _PS3 method inside the LCDD device:

		Method (_PS3, 0, NotSerialized)
	{
		If (LEqual (^^^GFX0.P3MO, 0x03))
		{
			DOFF ()
			SGPL (0x23, One, Zero)
			Store (0x03, ^^^GFX0._PSC)
			Store (One, ^^^GFX0.DGPS)
			Store (0x02, ^^^GFX0.P3MO)
		}
	}

and move everything under the DOFF() call at the end of the DOFF method, so you will have:

		Method (_PS3, 0, NotSerialized)
	{
		If (LEqual (^^^GFX0.P3MO, 0x03))
		{
			DOFF ()
		}
	}
[…]
Method (DOFF, 0, NotSerialized)
	{
		If (LNotEqual (MFTM, One))
		{
			_OFF ()
			If (LEqual (CTBO, One))
			{
				OBCP (Zero)
			}
		}

		SGPL (0x23, One, Zero)
		Store (0x03, ^^^GFX0._PSC)
		Store (One, ^^^GFX0.DGPS)
		Store (0x02, ^^^GFX0.P3MO)
	}

Congratulations, you got a better battery life, a cooler laptop, and the blue led back.

 

Result:

img20111030144315.th.jpg

 

(yes, michyprima is my 2nd nickname)

 

NoNvidia.kext.zip

 

Please report success or problems.

Enjoy

Share this post


Link to post
Share on other sites
Advertisement

Any further development on this?

 

Was wondering if perhaps this might help with an issue in the l502x thread we're (Well Doix is) trying to enable the Nvidia card (525m or 540m) and thought maybe the reverse of this might help?

 

Dunno just a thought - last thing on my list for a PERFECT hackintosh lol

Share this post


Link to post
Share on other sites

Thanks for your work. It could be a good way to solve my freezing issues due to optimus technology. However as I have no DOFF or GPUOFF in my dsdt, I don't know how to edit it. Could you post your dsdt?

Share this post


Link to post
Share on other sites
Congratulations, you got a better battery life, a cooler laptop, and the blue led back.

 

Result:

img20111030144315.th.jpg

 

Please report success or problems.

Enjoy

 

Which guide/method did you use to install Lion on that laptop. I have the exact same model but when I try to install Lion my mouse and keyboard do not work and the graphics are messed up. When I say messed up I mean shifted to the right, snowy effect with a pink tinge. Cannot do nothing. I used Maldon's guide on here but no luck. Any advice would be greatly appreciated.

 

Thanks

Share this post


Link to post
Share on other sites

Sorry no success. Im in the same boat as myska.

 

The DSDT from my Optimus / Dell L702x has no DOFF, GPUOFF, LCDD and _PS3.

 

I have the HD3000 as GFX0 and Nvidia as PEGP but dont get further

 

EDIT: I added my DSDT and hope that someone will help me with that or a hint what I have to do.

DSDT.aml.zip

Share this post


Link to post
Share on other sites

Hello! Nice work man, I've used this kext here and is working perfectly after some changes in the plist.

 

Now I am trying to make the inverse thing, like the bumblebee guys.

 

 

 

Can you put a link to the source here? so I can make the nvidia working, and I will report back here and put the code back to you and all who want this on their systems.

 

 

 

Thank you.

Share this post


Link to post
Share on other sites

Hi IDPPioneer,

 

yeah the reverse would be really nice but the first big step for me would be to be able to switch off my Nvidia.

 

I have found the Acpi on/off calls. I tried to hardcode the NVOP Call in my _DSM but it doesn't seem to be called. Could you perhaps help me out to get this Disabler working ?

 

Here is the link : https://lists.launchpad.net/hybrid-graphics...x/msg00663.html

Share this post


Link to post
Share on other sites

Good work mate. But no success either. NoNvidia.kext is loaded succesfully but it breaks boot. This is wierd because i have asus n53sn. Only differences between your pc and mine is that i have nvidia geforce gt550m 2gb. I also added gt550m's device id which is 0x0df610de. And i would like to ask which kexts you use for battery manager and touchpad?.

Share this post


Link to post
Share on other sites

hi morbid angel the only thing you need to do is to rename your ACPI ON/OFF calls that you have found to DON and DOFF and of course to adjust the id of your device in the plist file.

 

Example:

Method (_ON, 0, Serialized) this you rename to: Method (DON, 0, Serialized) and

Method (_OFF, 0, Serialized) this you rename to: Method (DOFF, 0, Serialized)

 

it is so easy as you've seen here.

Share this post


Link to post
Share on other sites

Hi! I have the same N53sv, I used your DSDT and my system boot whit garbage on all the screen but the os is functional because I can turn up or down the volume, I can sleep and shut down.

 

I trying to patch my own DSDT but the DOFF function is not called.

 

Ps: the only way I can boot with correct video is deleting the intelgraphicssnbfb.kext

 

What can I do?

 

Thanks for reading

Share this post


Link to post
Share on other sites

To find out what method is working for you, you could try Bumblebee on Ubuntu.

The only thing you need to find out what method is used for your notebook.

Share this post


Link to post
Share on other sites

Hi, I'm using 10.8.2. and I get error loading the kext

 

/System/Library/Extensions/NoNvidia.kext - no compatible dependency found for com.apple.driver.AppleACPIPlatform.

 

Can you share your code, or update the dependency plz. thx!

Share this post


Link to post
Share on other sites

Thanks for guide, finaly blue led without kext.

 

//Asus N53JN 10.8.2

 

 

20130504203701.jpg

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×