Contribute
Register

[Guide] Disabling discrete graphics in dual-GPU laptops

Skip this message's first part, strange but I reapplied patches to 9 and this time worked... Really strange... Let's continue from PART 2. I've added 9, applied the exact patch in the guide to 11 and DSDT for _OFF and _REG, I can boot up with DropOem=true now, battery warning fixed. But Nvidia is still running.

As I wrote, SSDT-9.aml is missing. Therefore wrong.

No errors in SSDT-9.dsl with proper disassembly procedures.
Read guide:
https://www.tonymacx86.com/threads/guide-patching-laptop-dsdt-ssdts.152573/

Rename patches are tricky.
If the patch misses a B0D3 reference, change it manually to HDAU.
So the issue is just missing 9, no any other thing is wrong, even with the DSDT file in the patched folder which doesn't allow me to boot up and gives me prohibited sign all the time. Strange...

You always point people to your guides but this time you seem didn't read, again. Let me quote and elaborate it. Here comes the quote.
As for SSDT-9, I wasn't that lucky as whenever I apply B0D3 patch I got these error below. First two can be fixed by manual renaming B0D3 -> HDAU however I couldn't find any solution for other 7. So I omitted this file. I already tried Rename _DSM instead of Remove _DSM, it didn't worked either. Since I already used ref.txt, it's not related to me, I suppose.
Code:
800, 6085, Object not found or not accessible from scope (\_SB.PCI0.B0D3)
800, 6116, Forward references from Scope operator not allowed (\_SB.PCI0.B0D3)
3122, 6084, Object does not exist (\_SB.PCI0.HDAU.ABWA)
3123, 6084, Object does not exist (\_SB.PCI0.HDAU.ARST)
3124, 6084, Object does not exist (\_SB.PCI0.HDAU.ASTR)
3125, 6084, Object does not exist (\_SB.PCI0.HDAU.AINI)
3126, 6084, Object does not exist (\_SB.PCI0.HDAU.CXDC)
3127, 6084, Object does not exist (\_SB.PCI0.HDAU.ABWA)
3145, 6084, Object does not exist (\_SB.PCI0.HDAU.DCCC)
I made them bold this time. First of all, I already fixed B0D3 ones with replacing HDAU as I wrote 3 times. The problem is other ones, Object does not exist ones. I couldn't find any solution for them.

You claim that there is no error with proper disassembly procedures which I already applied. I mean, If there is something wrong with my disassembly, how come I patched 9 files without any error? I followed your guide, directly copied and pasted your code, there shouldn't be any issues but there is with the 9.

According to grep findings, 9 is the only file that needs 3 patches, Remove _DSM, GFX0 and B0D3. Please disassemble it and apply those 3 patches in that order and compile, I'm sure you'll get the same errors.

Alternatively, maybe I just should delete them? I read some people deleted lines that causes errors.


PART 2:
------------------------------------------------------------------------------------------------

As per guide, your _OFF method is in SSDT-11, associated _INI is in SSDT-10.
_OFF calls SGOF. SGOF has EC references that must be moved to _REG.

Here's my _OFF method, what should I move to where?
Code:
        Method (_OFF, 0, Serialized)  // _OFF: Power Off
        {
            If (LEqual (CTXT, Zero))
            {
                If (LNotEqual (GPRF, One))
                {
                    Store (VGAR, VGAB)
                }

                Store (One, CTXT)
            }

            SGOF ()
        }
_Reg from DSDT.
Code:
            Method (_REG, 2, NotSerialized)  // _REG: Region Availability
            {
                If (LEqual (Arg0, 0x03))
                {
                    Store (Arg1, ECFL)
                }
            }
Moving SGOF () to _REG will do the job? Like below? Is that correct?
Code:
            Method (_REG, 2, NotSerialized)  // _REG: Region Availability
            {
                If (LEqual (Arg0, 0x03))
                {
                    Store (Arg1, ECFL)
                }
             
                SGOF ()
            }
The patch I applied to _INI in 10 is correct?
Code:
        Method (_INI, 0, NotSerialized)  // _INI: Initialize
        {
            Store (Zero, \_SB.PCI0.RP05.PEGP._ADR)
            //added to turn nvidia/radeon off
            External(\_SB.PCI0.RP05.PEGP._OFF, MethodObj)
            _OFF()
        }

And I'm not touching 11, right? (Except for Remove _DSM and GFX0 patches.

Thanks man, I'm reading your guides as well as your replies, do not worry about it.
 
Last edited:
So the issue is just missing 9, no any other thing is wrong, even with the DSDT file in the patched folder which doesn't allow me to boot up and gives me prohibited sign all the time. Strange...

You always point people to your guides but this time you seem didn't read, again. Let me quote and elaborate it. Here comes the quote.

I made them bold this time.

You ignored what I wrote in post #1319.
Here it is again:
Rename patches are tricky.
If the patch misses a B0D3 reference, change it manually to HDAU.

Hint: Before you applied the "Rename B0D3 to HDAU" patch you had no errors. Then you applied the patch and had errors. The errors are due to the patch missing a reference to B0D3. It is obvious if you click on the first error. Change the code you find there manually.
 
You ignored what I wrote in post #1319.
Here it is again:
I just edited the message. I already did it in the previous session and it didn't worked, but this time worked with no errors. Lets move on to REG part. I applied it just like in the guide, it didn't worked. What should I do to DSDT for _REG?
 
Here's my _OFF method, what should I move to where?


Nothing in _OFF needs moving.
_OFF calls SGOF.
And SGOF has EC related code.
It is the EC related code in SGOF that must be moved.
Please read the guide for details.

Moving SGOF () to _REG will do the job? Like below? Is that correct?

No.
You move only the EC related code from SGOF to _REG.
And the code added to _REG is only executed under specific conditions.
It is covered in the guide.

The patch I applied to _INI in 10 is correct?

Yes.
As per guide, the goal is to cause _OFF to be executed from _INI.
 
There is nothing refers to SGOF in the guide?
 
There is nothing refers to SGOF in the guide?

It is impossible for me to predict all the possible ways _OFF may be coded.
Anything in the code path for _OFF must be analyzed and patched appropriately.
In your case, _OFF is clearly calling SGOF (it is plain as day), and SGOF clearly accesses the EC.

As per guide, all EC related code as related to the execution of _OFF must be moved to _REG.
From post #1:
If you examine the code, you can see it accesses the EC (\_SB.PCI0.LPCB.EC0.SPIN (0x96, Zero). This is going to be a problem and will prevent _OFF from executing fully when called from _INI. Keep in mind it is not always this obvious. The code could have called a method not directly related to the EC, which in turn calls a method in the EC (indirect access). So you may need to do some digging. This example was obvious as the method path includes EC0.
 
I found it in SSDT-10
Code:
        Method (SGOF, 0, Serialized)
        {
            If (LEqual (CCHK (Zero), Zero))
            {
                Return (Zero)
            }

            Store (\_SB.PCI0.LPCB.EC0.RRAM (0x0521), Local0)
            And (Local0, 0xCF, Local0)
            \_SB.PCI0.LPCB.EC0.WRAM (0x0521, Local0)
            \_SB.PCI0.LPCB.EC0.WRAM (0x0520, 0x95)
            \_SB.PCI0.LPCB.EC0.WRAM (0x03A4, Zero)
            \_SB.PCI0.LPCB.EC0.WRAM (0x03A5, Zero)
            Store (LCTL, ELCT)
            Store (SVID, HVID)
            Store (SDID, HDID)
            Store (LREN, LTRE)
            Store (One, LNKD)
            While (LNotEqual (LNKS, Zero))
            {
                Sleep (One)
            }

            SGPO (HLRS, One)
            SGPO (PWEN, Zero)
            Return (Zero)
        }
This one is tricky. Should I cut from 1st Store to 2nd store? Cuz all have EC0?
 
I found it in SSDT-10
Code:
        Method (SGOF, 0, Serialized)
        {
            If (LEqual (CCHK (Zero), Zero))
            {
                Return (Zero)
            }

            Store (\_SB.PCI0.LPCB.EC0.RRAM (0x0521), Local0)
            And (Local0, 0xCF, Local0)
            \_SB.PCI0.LPCB.EC0.WRAM (0x0521, Local0)
            \_SB.PCI0.LPCB.EC0.WRAM (0x0520, 0x95)
            \_SB.PCI0.LPCB.EC0.WRAM (0x03A4, Zero)
            \_SB.PCI0.LPCB.EC0.WRAM (0x03A5, Zero)
            Store (LCTL, ELCT)
            Store (SVID, HVID)
            Store (SDID, HDID)
            Store (LREN, LTRE)
            Store (One, LNKD)
            While (LNotEqual (LNKS, Zero))
            {
                Sleep (One)
            }

            SGPO (HLRS, One)
            SGPO (PWEN, Zero)
            Return (Zero)
        }
This one is tricky. Should I cut from 1st Store to 2nd store? Cuz all have EC0?

This code needs to move to _REG:
Code:
            Store (\_SB.PCI0.LPCB.EC0.RRAM (0x0521), Local0)
            And (Local0, 0xCF, Local0)
            \_SB.PCI0.LPCB.EC0.WRAM (0x0521, Local0)
            \_SB.PCI0.LPCB.EC0.WRAM (0x0520, 0x95)
            \_SB.PCI0.LPCB.EC0.WRAM (0x03A4, Zero)
            \_SB.PCI0.LPCB.EC0.WRAM (0x03A5, Zero)
 
This code needs to move to _REG:
Code:
            Store (\_SB.PCI0.LPCB.EC0.RRAM (0x0521), Local0)
            And (Local0, 0xCF, Local0)
            \_SB.PCI0.LPCB.EC0.WRAM (0x0521, Local0)
            \_SB.PCI0.LPCB.EC0.WRAM (0x0520, 0x95)
            \_SB.PCI0.LPCB.EC0.WRAM (0x03A4, Zero)
            \_SB.PCI0.LPCB.EC0.WRAM (0x03A5, Zero)

Thank you RehabMan, Nvidia disappeared from H/W / Graphics/Display! However, battery reading broken now again, red bar with 45%. EC0 -> EC hotpatch makes this issue. Should I post Problem reporting to battery thread?
 
Thank you RehabMan, Nvidia disappeared from H/W / Graphics/Display! However, battery reading broken now again, red bar with 45%. EC0 -> EC hotpatch makes this issue. Should I post Problem reporting to battery thread?

Battery questions should be addressed in the battery guide thread.
 
Back
Top