Askannz / optimus-manager

A Linux program to handle GPU switching on Optimus laptops.
MIT License
2.25k stars 165 forks source link

Add ACPI call _SB.PCI0.RP05.PEGP #556

Closed ErnyTech closed 3 months ago

ErnyTech commented 6 months ago

This ACPI call was found on the MSI Prestige 15 A10SC with Nvidia GTX 1650 Max-Q

For reference, this is part of the SSDT table:

    Scope (\_SB.PCI0.RP05.PEGP)
    {
        Method (_INI, 0, NotSerialized)  // _INI: Initialize
        {
            \_SB.PCI0.RP05.PEGP._ADR = Zero
        }

        /* Other methods */

        Method (_ON, 0, Serialized)  // _ON_: Power On
        {
            \_SB.PCI0.HGON ()
            If ((GPRF != One))
            {
                Local0 = CMDR /* \_SB_.PCI0.RP05.PEGP.CMDR */
                CMDR = Zero
                VGAR = VGAB /* \_SB_.PCI0.RP05.PEGP.VGAB */
                CMDR = 0x06
                If ((MGC6 == 0x03)){}
                ElseIf (((SGFL & 0x02) == Zero))
                {
                    NHDA = Zero
                }

                CMDR = Local0
            }
        }

        Method (_OFF, 0, Serialized)  // _OFF: Power Off
        {
            If ((CTXT == Zero))
            {
                If ((GPRF != One))
                {
                    VGAB = VGAR /* \_SB_.PCI0.RP05.PEGP.VGAR */
                }

                CTXT = One
            }

            \_SB.PCI0.HGOF ()
        }
    }
es20490446e commented 3 months ago

Thanks for the improvement.

From now on any contribution will be looked upon in a couple of days max.