xma / T480-Clover

Lenovo T480 hackintosh ThinkPad - using Clover
43 stars 7 forks source link

Lid close sleep #13

Closed bugraduz closed 3 years ago

bugraduz commented 4 years ago

When I close the lid of my computer, only the screen turns off and the session is locked. It doesn't go to sleep. It goes to sleep when you press the power button or click on sleep.

xma commented 4 years ago

do you have another monitor / hdmi plugged in at the time you close the lid ?

bugraduz commented 4 years ago

no ı dont use another screen

xma commented 4 years ago

ok, could you try this:

paste the output

bugraduz commented 4 years ago

my problem is not solved

bugraduz@Bugra-MacBook-Pro ~ % sleep 10 && pmset -g assertions 2020-06-04 00:53:43 +0300 Assertion status system-wide: BackgroundTask 0 ApplePushServiceTask 0 UserIsActive 1 PreventUserIdleDisplaySleep 0 PreventSystemSleep 0 ExternalMedia 0 PreventUserIdleSystemSleep 0 NetworkClientActive 0 Listed by owning process: pid 112(hidd): [0x00001a4e00098bb5] 00:00:03 UserIsActive named: "com.apple.iohideventsystem.queue.tickle serviceID:1000004a1 name:AppleUserHIDEventSe product:USB Receiver eventType:17"
Timeout will fire in 596 secs Action=TimeoutActionRelease Kernel Assertions: 0x4=USB id=503 level=255 0x4=USB mod=1.01.1970 02:00 description=com.apple.usb.externaldevice.14100000 owner=USB Receiver id=508 level=255 0x4=USB mod=1.01.1970 02:00 description=com.apple.usb.externaldevice.14a00000 owner=USB3.0-CRW Idle sleep preventers: IODisplayWrangler

xma commented 4 years ago

my problem is not solved

Yeah it was for debugging, not a command that would automagically fix

On the trace I'd see "USB3.0-CRW" which maybe is builtin card reader.

Here I've de-activated in BIOS any device that has no or little use on macOS, namely:

here is attached "USB" panel onto Hackintool on my setup usb

xma commented 4 years ago

another thing that could differ between setup : order of dsdt file patchs which could be loaded on a special order here and not the same for you

(btw for OC it's the same, you could tell order of loading files too, not clover nor OC specific)

12:411  0:000  === [ ACPIPatchedAML ] ==========================
12:411  0:000  Inserting SSDT-EXT4-WakeScreen.aml from EFI\CLOVER\ACPI\patched: size=297 ... Success
12:411  0:000  Inserting SSDT-PS2K.aml from EFI\CLOVER\ACPI\patched: size=536 ... Success
12:412  0:000  Inserting SSDT-WKBD.aml from EFI\CLOVER\ACPI\patched: size=149 ... Success
12:412  0:000  Inserting SSDT-BATC.aml from EFI\CLOVER\ACPI\patched: size=1462 ... Success
12:412  0:000  Inserting SSDT-KBD.aml from EFI\CLOVER\ACPI\patched: size=1637 ... Success
12:413  0:000  Inserting SSDT-XOSI.aml from EFI\CLOVER\ACPI\patched: size=206 ... Success
12:413  0:000  Inserting SSDT-USBX.aml from EFI\CLOVER\ACPI\patched: size=185 ... Success
12:413  0:000  Inserting SSDT-UIAC.aml from EFI\CLOVER\ACPI\patched: size=504 ... Success
12:414  0:000  Inserting SSDT-RMCF.aml from EFI\CLOVER\ACPI\patched: size=614 ... Success
12:414  0:000  Inserting SSDT-PWRB.aml from EFI\CLOVER\ACPI\patched: size=58 ... Success
12:414  0:000  Inserting SSDT-PTSWAK.aml from EFI\CLOVER\ACPI\patched: size=643 ... Success
12:414  0:000  Inserting SSDT-PNLF.aml from EFI\CLOVER\ACPI\patched: size=1028 ... Success
12:415  0:000  Inserting SSDT-MEM2.aml from EFI\CLOVER\ACPI\patched: size=148 ... Success
12:415  0:000  Inserting SSDT-MCHC.aml from EFI\CLOVER\ACPI\patched: size=76 ... Success
12:415  0:000  Inserting SSDT-LPC.aml from EFI\CLOVER\ACPI\patched: size=390 ... Success
12:416  0:000  Inserting SSDT-HPET.aml from EFI\CLOVER\ACPI\patched: size=87 ... Success
12:416  0:000  Inserting SSDT-GPRW.aml from EFI\CLOVER\ACPI\patched: size=74 ... Success
12:416  0:000  Inserting SSDT-GLAN.aml from EFI\CLOVER\ACPI\patched: size=105 ... Success
12:416  0:000  Inserting SSDT-DMAC.aml from EFI\CLOVER\ACPI\patched: size=137 ... Success
12:417  0:000  Inserting SSDT-DDGPU.aml from EFI\CLOVER\ACPI\patched: size=146 ... Success
12:417  0:000  Inserting SSDT-CODEC.aml from EFI\CLOVER\ACPI\patched: size=330 ... Success
12:417  0:000  Inserting SSDT-BATT.aml from EFI\CLOVER\ACPI\patched: size=5127 ... Success
12:417  0:000  Inserting SSDT-ALS0.aml from EFI\CLOVER\ACPI\patched: size=101 ... Success

That would translate to:

    <key>SortedOrder</key>
    <array>
        <string>SSDT-EXT4-WakeScreen.aml</string>
        <string>SSDT-PS2K.aml</string>
        <string>SSDT-WKBD.aml</string>
        <string>SSDT-BATC.aml</string>
        <string>SSDT-KBD.aml</string>
        <string>SSDT-XOSI.aml</string>
        <string>SSDT-USBX.aml</string>
        <string>SSDT-UIAC.aml</string>
        <string>SSDT-RMCF.aml</string>
        <string>SSDT-PWRB.aml</string>
        <string>SSDT-PTSWAK.aml</string>
        <string>SSDT-PNLF.aml</string>
        <string>SSDT-MEM2.aml</string>
        <string>SSDT-MCHC.aml</string>
        <string>SSDT-LPC.aml</string>
        <string>SSDT-HPET.aml</string>
        <string>SSDT-GPRW.aml</string>
        <string>SSDT-GLAN.aml</string>
        <string>SSDT-DMAC.aml</string>
        <string>SSDT-DDGPU.aml</string>
        <string>SSDT-CODEC.aml</string>
        <string>SSDT-BATT.aml</string>
        <string>SSDT-ALS0.aml</string>
    </array>
xma commented 4 years ago

Here is modified file config.DW1820a.plist.txt

xma commented 4 years ago

and if you could redo the test, but with bigger value:

sleep 60 && pmset -g assertions

so type this, press enter (do not wait for the output = I'm expecting this to run once the computer is closed) close the lid, wait for at least 1 minute

if the computer doesn't sleep : paste the output and i'll have a look

bugraduz commented 4 years ago

how can use card reader bro? I have disabled card reader wifi wan and fingerprint in bios.

benbender commented 4 years ago

You have to configure the usb-ports which are connected to internal devices like bt, fp-reader, cardreader as "internal" so that they wont keeping os x from going to sleep. It's easily doable with usbmap or hackintool - just google for some tutorials.

benbender commented 4 years ago

btw, there is also pmset -g assertionslog to debug