Contribute
Register

Disable nvidia card to save battery

Status
Not open for further replies.
yeah!! it works, now in Graphics/Displays only appears the intel hd4600!!! Yeah, you rock!! :D

I have more troubles, maybe you can help me with them in my created thread: http://www.tonymacx86.com/mavericks...e-nvidia-optimus-msi-ge60-2pc.html#post938899

I have activated my intel hd4600, and I have glitches (in menubar) with all color profiles except with one. If I logout/login, the glitches are fixed, but is stupid to do that every time I turn on the laptop. When I turn on it, and enter the pass, the mouse is veeeeery laggy about 10-15 seconds, and then, it goes OK :) Im inyecting the intel graphics in clover with the ig-platform-id=0x0A260006. I tried too to patch the DSDT and SSDT9 with graphic hd4600 fix, but glitches still there.

I've patched too the "beta" applehda and patch alc 892 from toleda in my DSDT with layout 1 (not layout 12), and applehda works just with headphones, not the speaker.

And my last problem is the card reader. I dont know how to activate my card reader or if I can. You can check my IOReg to tell me if I can or not.

My last question: did you see my IOReg last time? Is my main SSDT OK with powermanagement? I have to say that I've patched to the main DSDT the following laptop patches too:

"Fix _WAK Arg0 v2"
"HPET Fix"
"SMBUS Fix"
"IRQ Fix"
"RTC Fix"
"OS Check Fix"
"Fix Mutex with non-zero SyncLevel"
"Fix PNOT/PPNT"
"Add IMEI"


Thank you again :)

Probably better to post in the other thread. Off-topic here...
 
Like I said, "renames must be balanced. " If you rename in one file, you must rename in all.

Yes , I 'm sure has done that. Renaming gfxo--igpu in all SSDT.

Does it work?
Yes it work, seems pretty good. Nvidia graphics in the system report has disappeared and only the visible intel hd4600
And now my laptop battery last longer

If it does then you avoid the nasty problem of _OFF
accessing the EC in _INI (because it is not allowed). Usually in these
cases, you have to call _OFF from _REG instead (when Arg0==3 &&
Arg1==1).

The EC may be confused by this (as it may not "know" that the discrete card is off)...

Probably this is a correct method and I tried experimenting call _OFF from Reg that I found in DSDT , like this;
PHP:
Method (_REG, 2, NotSerialized)  // _REG: Region Availability
            {
                If (LEqual (Arg0, 0x03))
                {
                    Store (Arg1, ECON)
                    If (LEqual (Arg1, One))
                    {
                        TINI ()
                        KINI ()
                        Store (0x05, SYSO)
                    }
                }

                Store (One, LIDS)
                Store (One, ^^^IGPU.CLID)
                If (LAnd (LEqual (Arg0, 0x03), LEqual (Arg1, One)))
                {
                    ^^^PEG0.PEGP._OFF ()
                }
            }
Rename GFXO--IGPU in dsdt and all ssdt, then I copy dsdt.aml and all ssdt.aml to the patched folder in clover with drop oem (true)
It did not work , nvidia graphic in the report system is still visible.
 
...
Probably this is a correct method and I tried experimenting call _OFF from Reg that I found in DSDT , like this;
PHP:
Method (_REG, 2, NotSerialized)  // _REG: Region Availability
            {
                If (LEqual (Arg0, 0x03))
                {
                    Store (Arg1, ECON)
                    If (LEqual (Arg1, One))
                    {
                        TINI ()
                        KINI ()
                        Store (0x05, SYSO)
                    }
                }

                Store (One, LIDS)
                Store (One, ^^^IGPU.CLID)
                If (LAnd (LEqual (Arg0, 0x03), LEqual (Arg1, One)))
                {
                    ^^^PEG0.PEGP._OFF ()
                }
            }
Rename GFXO--IGPU in dsdt and all ssdt, then I copy dsdt.aml and all ssdt.aml to the patched folder in clover with drop oem (true)
It did not work , nvidia graphic in the report system is still visible.

ACPIDebug.kext can be useful for seeing if you are executing the code you think you are...

https://github.com/RehabMan/OS-X-ACPI-Debug
 
ACPIDebug.kext can be useful for seeing if you are executing the code you think you are...

https://github.com/RehabMan/OS-X-ACPI-Debug

O Rehabman..! I am newbie and feel so stupid for not being able to understand it .
The code from your giftub Laptop patch, i just applying.

Currently it looks like I have not had any other option, in addition to delete, \ _SB.PCI0.LPCB.EC0.ECNV ( 0x02 , in SSDT - 7, because it works well I think.
I have no idea anymore and so more confused ...!

Now I am trying to implement power management and of course disable nvidia .
To make sure it is working properly, can you see my ioreg .. ? Please.
 

Attachments

  • MyIOReg.zip
    485.3 KB · Views: 51
O Rehabman..! I am newbie and feel so stupid for not being able to understand it .
The code from your giftub Laptop patch, i just applying.

Currently it looks like I have not had any other option, in addition to delete, \ _SB.PCI0.LPCB.EC0.ECNV ( 0x02 , in SSDT - 7, because it works well I think.
I have no idea anymore and so more confused ...!

Now I am trying to implement power management and of course disable nvidia .
To make sure it is working properly, can you see my ioreg .. ? Please.

If your _OFF method accesses the EC, then you should call off from _REG instead.

See: https://github.com/RehabMan/Laptop-DSDT-Patch, Apply: "Disable from _REG (DSDT)"
 
If your _OFF method accesses the EC, then you should call off from _REG instead.

See: https://github.com/RehabMan/Laptop-DSDT-Patch, Apply: "Disable from _REG (DSDT)"

I 'm sure I 've done it
Working with MACIasl at .dsl file, this my step;
1. DSDT.dsl-fix any error-rename GFXO to IGPU- Patch disable from _Reg (DSDT)-save to DSDT.aml
2. SSDT.aml, SSDT-1,-2,-3,-4.aml—not changed because no contain gfxo.
3. SSDT-5.dsl-rename GFXO to IGPU- Patch Brightness fix(Haswell)-save to SSDT-5.aml.--(brightness works well):thumbup:
4. SSDT-6.dsl-fix any error-rename GFXO to IGPU-save to SSDT-6.aml
5. SSDT-7.dsl-fix any error-rename GFXO to IGPU-save to SSDT-7.aml
copy DSDT.aml & all SSDT.aml to patched folder clover, including ssdtPRGen (rename to SSDT-8)--boot.
Nvidia still appear in the system report with no kext loaded
with messages in verbose log
PHP:
2014-12-09 19:26:25 +0700 kernel[0]: IOPPF: XCPM mode
2014-12-09 19:26:25 +0700 kernel[0]: [AGPM Controller] unknownPlatform
2014-12-09 19:26:25 +0700 kernel[0]: fGPUIdleIntervalMS = 0
2014-12-09 19:26:25 +0700 kernel[0]: X86PlatformPlugin::cgRegisterCallbackHandler - gpu internal PLimit notification already registered
2014-12-09 19:26:25 +0700 kernel[0]: PEGP: Not usable
What it means..? work or not.

I just try to compare with option delete, \ _SB.PCI0.LPCB.EC0.ECNV ( 0x02 , in SSDT - 7. (although this is not allowed), i know.
and get messages in verbose log
PHP:
2014-12-09 21:41:30 +0700 kernel[0]: IOPPF: XCPM mode
2014-12-09 21:41:31 +0700 kernel[0]: fGPUIdleIntervalMS = 0
how to call _OFF from_reg ( DSDT ) in verbose log messages can be like that .
 

Attachments

  • DSDTssdt.zip
    528.1 KB · Views: 71
I 'm sure I 've done it
Working with MACIasl at .dsl file, this my step;
1. DSDT.dsl-fix any error-rename GFXO to IGPU- Patch disable from _Reg (DSDT)-save to DSDT.aml
2. SSDT.aml, SSDT-1,-2,-3,-4.aml—not changed because no contain gfxo.
3. SSDT-5.dsl-rename GFXO to IGPU- Patch Brightness fix(Haswell)-save to SSDT-5.aml.--(brightness works well):thumbup:
4. SSDT-6.dsl-fix any error-rename GFXO to IGPU-save to SSDT-6.aml
5. SSDT-7.dsl-fix any error-rename GFXO to IGPU-save to SSDT-7.aml
copy DSDT.aml & all SSDT.aml to patched folder clover, including ssdtPRGen (rename to SSDT-8)--boot.
Nvidia still appear in the system report with no kext loaded
with messages in verbose log
PHP:
2014-12-09 19:26:25 +0700 kernel[0]: IOPPF: XCPM mode
2014-12-09 19:26:25 +0700 kernel[0]: [AGPM Controller] unknownPlatform
2014-12-09 19:26:25 +0700 kernel[0]: fGPUIdleIntervalMS = 0
2014-12-09 19:26:25 +0700 kernel[0]: X86PlatformPlugin::cgRegisterCallbackHandler - gpu internal PLimit notification already registered
2014-12-09 19:26:25 +0700 kernel[0]: PEGP: Not usable
What it means..? work or not.

I just try to compare with option delete, \ _SB.PCI0.LPCB.EC0.ECNV ( 0x02 , in SSDT - 7. (although this is not allowed), i know.
and get messages in verbose log
PHP:
2014-12-09 21:41:30 +0700 kernel[0]: IOPPF: XCPM mode
2014-12-09 21:41:31 +0700 kernel[0]: fGPUIdleIntervalMS = 0
how to call _OFF from_reg ( DSDT ) in verbose log messages can be like that .

Download patchmatic: https://github.com/RehabMan/OS-X-MaciASL-patchmatic.
Extract the 'patchmatic' binary from the ZIP. Copy it to /usr/bin, such that you have the binary at /usr/bin/patchmatic.

In terminal,
Code:
rm -Rf ~/Downloads/RehabMan
mkdir ~/Downloads/RehabMan
cd ~/Downloads/RehabMan
patchmatic -extract

Post contents of Downloads/RehabMan directory (as ZIP).

Also, post ioreg: http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html. Please, use the IORegistryExplorer v2.1 attached to the post! DO NOT reply with an ioreg from any other version of IORegistryExplorer.app.
 
Download patchmatic: https://github.com/RehabMan/OS-X-MaciASL-patchmatic.
Extract the 'patchmatic' binary from the ZIP. Copy it to /usr/bin, such that you have the binary at /usr/bin/patchmatic.

In terminal,
Code:
rm -Rf ~/Downloads/RehabMan
mkdir ~/Downloads/RehabMan
cd ~/Downloads/RehabMan
patchmatic -extract

Post contents of Downloads/RehabMan directory (as ZIP).

Also, post ioreg: http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html. Please, use the IORegistryExplorer v2.1 attached to the post! DO NOT reply with an ioreg from any other version of IORegistryExplorer.app.

This is it my files, thanks.
 

Attachments

  • IOReg.zip
    459.7 KB · Views: 76
  • RehabMan.zip
    41.3 KB · Views: 80
This is it my files, thanks.

It is partially disabled. Calling from _REG is always a bit unreliable because sometimes it is called rather late.

Here's what I would try:

Move the EC specific parts of _OFF to _REG and call _OFF from _INI.

So.. in _OFF, you have:
Code:
        Method (_OFF, 0, Serialized)  // _OFF: Power Off
        {
            \_SB.PCI0.LPCB.EC0.ECNV (0x02)
            If (LEqual (CTXT, Zero))
            {
                If (LNotEqual (GPRF, One))
                {
                    Store (VGAR, VGAB)
                }

                Store (One, CTXT)
            }

            SGOF ()
        }

Make it:
Code:
        Method (_OFF, 0, Serialized)  // _OFF: Power Off
        {
            if (0) { \_SB.PCI0.LPCB.EC0.ECNV (0x02) }
            If (LEqual (CTXT, Zero))
            {
                If (LNotEqual (GPRF, One))
                {
                    Store (VGAR, VGAB)
                }

                Store (One, CTXT)
            }

            SGOF ()
        }

Then in _REG:
Code:
...
                If (LAnd (LEqual (Arg0, 0x03), LEqual (Arg1, One)))
                {
                    \_SB.PCI0.LPCB.EC0.ECNV (0x02)
                }

And in _INI (SSDT6 in patchmatic output):
Code:
        Method (_INI, 0, NotSerialized)  // _INI: Initialize
        {
            Store (Zero, \_SB.PCI0.PEG0.PEGP._ADR)
            External(\_SB.PCI0.PEG0.PEGP._OFF)
            \_SB.PCI0.PEG0.PEGP._OFF()
        }

Basic idea is this: You can't manipulate the EC in _INI, so move the stuff that touches EC out of _OFF and into _REG. Then, you can safely call _OFF from _INI.

Hope that makes sense...

Note: Further analysis/debugging may be necessary in the case it doesn't work as maybe there are more areas where _OFF touches the EC (initial glance... doesn't look like it though)...
 
Status
Not open for further replies.
Back
Top