Contribute
Register

Lenovo Yoga 700 restarts after shut down with power cable plugged in

Status
Not open for further replies.
Joined
Nov 8, 2015
Messages
33
Motherboard
MSi B150M BAZOOKA
CPU
i5-6500
Graphics
Sapphire Tri-X R9 290X
Mac
  1. MacBook
Classic Mac
  1. PowerBook
Mobile Phone
  1. Android
  2. iOS
If I have the power cable plugged in and I try to shut down, the laptop will automatically restart itself after approx. two seconds.

If I don't have the power cable plugged in, it shuts down normally. I searched and came across two possible solutions. One was applying the shutdown fix v2 patch from RehabMan's repo in MaciASL, but it had no effect (the apply button was always grayed out so I couldn't apply the regular shutdown fix patch)

I then came across a thread about about editing the _PTS overrdie to fix ""auto restart after shutdown" but I need assistance with where to put the following code:

Code:
// _PTS override to fix "auto restart after shutdown"

//DefinitionBlock ("", "SSDT", 2, "hack", "hack", 0)
//{
    // In DSDT, native _PTS is renamed ZPTS
    // As a result, calls to these methods land here.
    External(ZPTS, MethodObj)
    External(_SB.PCI0.XHC.PMEE, FieldUnitObj)
    Method(_PTS, 1)
    {
        ZPTS(Arg0)
        If (5 == Arg0)
        {
            // avoid "auto restart" after shutdown
            \_SB.PCI0.XHC.PMEE = 0
        }
    }
//}
//EOF

I can see the _PST entry in my .dsl file but I'm confused as to where exactly I need to insert the above code. It makes a reference to _SB.PCI0.XHC.PMEE but this is not in my dsdt.dsl file.

I want to note that the power port on this laptop acts also as an USB port. I have a usb wireless mouse receiver and a USB WiFi adapter in the other 2 regular USB 3.0 ports, which are always plugged in and don't contribute to this problem.

I plugged the wireless USB mouse receiver to the charge port and it shut down normally.
 

Attachments

  • debug_27485.zip
    5 MB · Views: 63
  • DSDT_batt_shutdown.dsl
    606.9 KB · Views: 174
Last edited:
If I have the power cable plugged in and I try to shut down, the laptop will automatically restart itself after approx. two seconds.

If I don't have the power cable plugged in, it shuts down normally. I searched and came across two possible solutions. One was applying the shutdown fix v2 patch from RehabMan's repo in MaciASL, but it had no effect (the apply button was always grayed out so I couldn't apply the regular shutdown fix patch)

I then came across a thread about about editing the _PTS overrdie to fix ""auto restart after shutdown" but I need assistance with where to put the following code:

Code:
// _PTS override to fix "auto restart after shutdown"

//DefinitionBlock ("", "SSDT", 2, "hack", "hack", 0)
//{
    // In DSDT, native _PTS is renamed ZPTS
    // As a result, calls to these methods land here.
    External(ZPTS, MethodObj)
    External(_SB.PCI0.XHC.PMEE, FieldUnitObj)
    Method(_PTS, 1)
    {
        ZPTS(Arg0)
        If (5 == Arg0)
        {
            // avoid "auto restart" after shutdown
            \_SB.PCI0.XHC.PMEE = 0
        }
    }
//}
//EOF

I can see the _PST entry in my .dsl file but I'm confused as to where exactly I need to insert the above code. It makes a reference to _SB.PCI0.XHC.PMEE but this is not in my dsdt.dsl file.

I want to note that the power port on this laptop acts also as an USB port. I have a usb wireless mouse receiver and a USB WiFi adapter in the other 2 regular USB 3.0 ports, which are always plugged in and don't contribute to this problem.

I plugged the wireless USB mouse receiver to the charge port and it shut down normally.

See hotpatch guide/README regarding SSDT-PTSWAK and XPEE option in SSDT-RMCF.
http://www.tonymacx86.com/threads/guide-using-clover-to-hotpatch-acpi.200137/
 

Attachments

  • Screen Shot 2018-02-12 at 11.39.11 AM.png
    Screen Shot 2018-02-12 at 11.39.11 AM.png
    72.2 KB · Views: 120
Last edited:
I opened SSDT-RMCF and I see some variable to change, so I did that. Opened up SSDT-PTSWAK and didn't see anything int here.

Am I supposed to just save as .aml file and copy them to clover/apci/patched? Clover does say those are loaded successfully.

You should read the README... Because SSDT-PTSWAK.aml has certain requirements in config.plist/ACPI/DSDT/Patches.
 
@RehabMan, I have been reading the README and trying to make sense of it all. Reading the RMCF.dsl file and going through the variables, it makes mention of PTSWAK and XHC so I saved those as .aml.

What the README doesn't say is the config.pliist. Do I have to make my .plist exactly it? What Acpi>DSDT>Patches do I need? All of them or just the ones with names that I copied? There are four entries in the patches list ending in SSDT-PTSWAK.aml, so do I copy all those to my config.plist? There are no mention of the other two files in there. You also got "fixIPIC", "FixHPET", "FitRTC", "FitHeaders," FitTMR" checked, so do I check those as well to get it to work.

What about the two signatures under the drop tables.

So can you verify if the attached .dsl are correct? Do I just save them as .aml and put them my acpi/patched folder? Anything special I need to do for the Acpi>DSDT>Patches.

Thanks.
 

Attachments

  • SSDT-PTSWAK.dsl
    2.9 KB · Views: 147
  • SSDT-XHC.dsl
    1 KB · Views: 127
  • SSDT-RMCF.dsl
    4.5 KB · Views: 132
@RehabMan, I have been reading the README and trying to make sense of it all. Reading the RMCF.dsl file and going through the variables, it makes mention of PTSWAK and XHC so I saved those as .aml.

What the README doesn't say is the config.pliist. Do I have to make my .plist exactly it? What Acpi>DSDT>Patches do I need? All of them or just the ones with names that I copied? There are four entries in the patches list ending in SSDT-PTSWAK.aml, so do I copy all those to my config.plist? There are no mention of the other two files in there. You also got "fixIPIC", "FixHPET", "FitRTC", "FitHeaders," FitTMR" checked, so do I check those as well to get it to work.

What about the two signatures under the drop tables.

So can you verify if the attached .dsl are correct? Do I just save them as .aml and put them my acpi/patched folder? Anything special I need to do for the Acpi>DSDT>Patches.

Thanks.

In order to completely understand hotpatch and the "rename/replace" pattern used by SSDT-PTSWAK.dsl, you will need to read the ACPI hotpatch guide.

And the README does mention hotpatch/config.plist (read the SSDT-PTSWAK description carefully), which has the needed patches to use SSDT-PTSWAK.dsl along with appropriate comments embedded in the file itself.
 
Thanks @RehabMan, I will do some more research and reading!
 
Thanks @RehabMan, I will do some more research and reading!

Note also that I added a patch in my laptop repo that does the same thing: "[sys] Shutdown restart (XHC.PMEE) Fix"
 
@RehabMan, thanks for that. I am still reading about hotpatching. Taking your PTSWAK.dsl and leaving only the auto restart fix. Would the following code be correct? I looked at my original DSDT and it's _PTS, but your comment states that " // In DSDT, native _PTS and _WAK are renamed ZPTS/ZWAK" So do I change the "ZPTS (Arg0)" back to "_PTS(argo)" and the "External(ZPTS, MethodsObj) back to External(_PTS, MethodObj)"??

Thanks again!

Code:
// Overriding _PTS and _WAK

DefinitionBlock("", "SSDT", 2, "hack", "_PTSWAK", 0)
{
    External(_PTS, MethodObj)

    External(_SB.PCI0.XHC.PMEE, FieldUnitObj)


    // In DSDT, native _PTS and _WAK are renamed ZPTS/ZWAK
    // As a result, calls to these methods land here.
    Method(_PTS, 1)
    {
        // call into original _PTS method
        _PTS(Arg0)

        If (5 == Arg0)
        {
           \_SB.PCI0.XHC.PMEE = 0
        }
    }
}
//EOF
 
@RehabMan, thanks for that. I am still reading about hotpatching. Taking your PTSWAK.dsl and leaving only the auto restart fix. Would the following code be correct? I looked at my original DSDT and it's _PST, but your comment states that " // In DSDT, native _PTS and _WAK are renamed ZPTS/ZWAK" So do I change the "ZPTS (Arg0)" back to "_PTS(argo)" and the "External(ZPTS, MethodsObj) back to External(_PTS, MethodObj)"??

Thanks again!

Code:
// Overriding _PTS and _WAK

DefinitionBlock("", "SSDT", 2, "hack", "_PTSWAK", 0)
{
    External(_PTS, MethodObj)

    External(_SB.PCI0.XHC.PMEE, FieldUnitObj)


    // In DSDT, native _PTS and _WAK are renamed ZPTS/ZWAK
    // As a result, calls to these methods land here.
    Method(_PTS, 1)
    {
        // call into original _PTS method
        _PTS(Arg0)

        If (5 == Arg0)
        {
            // XHC.PMEE fix, if enabled
            If (CondRefOf(\RMCF.XPEE)) { If (\RMCF.XPEE && CondRefOf(\_SB.PCI0.XHC.PMEE)) { \_SB.PCI0.XHC.PMEE = 0 } }
        }
    }
}
//EOF

No idea what you mean by "it's _PST"...

PST is "Pacific Standard Time"... no meaning in ACPI.
But _PTS is a reserved method in ACPI "Prepare To Sleep".

Note: Your edits to the _PTS method are nonsense (infinite recursion).
 
Status
Not open for further replies.
Back
Top