tylernguyen / x1c6-hackintosh

READMEs, OpenCore configurations, patches, and notes for the Thinkpad X1 Carbon 6th Gen 2018 Hackintosh
https://tylernguyen.github.io/x1c6-hackintosh/
The Unlicense
628 stars 110 forks source link

Waking up causes reboot #89

Closed lubixxx96 closed 3 years ago

lubixxx96 commented 3 years ago

Describe the bug Hi Tyler, After the latest changes, I am no longer able to put my X1C6 (identical hw specs as yours btw) to sleep. Waking up causes cold boot with one weird side effect: My keyboard's not working. I need to manually reset via pwr button one more time to get it back. I use your EFI folder without any additional changes, it has been always working for me just like that. Also modded bios, with default setting and changed only what you listed in the 1_README-HARDWAREandBIOS I've tried both "Windows 10" and "Linux" sleep options form bios and 0,3 and 25 hibernatemodes in pmset, no difference.

Here is the log from pmset":

Time stamp Domain Message Duration Delay
========== ====== ======= ======== =====
UUID: BA3850A9-D3A0-4E8E-9A8C-FF94DC621D6A 2020-11-04 07:34:23 +0100 Sleep Entering Sleep state due to 'Software Sleep pid=186': Using AC (Charge:99%)
2020-11-04 07:34:26 +0100 PM Client Acks Delays to Sleep notifications: [com.apple.apsd is slow(3015 ms)]
2020-11-04 07:35:55 +0100 ShutdownCause SMC shutdown cause: 5: Software initiated shutdown
2020-11-04 07:35:57 +0100 HibernateStats hibmode=0 standbydelaylow=0 standbydelayhigh=0 0
Sleep/Wakes since boot at 2020-11-04 07:27:46 +0100 :0 Dark Wake Count in this sleep cycle:2

Time stamp Domain Message Duration Delay
========== ====== ======= ======== =====
UUID: Unknown UUID 2020-11-04 07:35:57 +0100 Sleep Entering Sleep state due to '': Using AC (Charge:0%)
2020-11-04 07:35:57 +0100 Failure Failure during wake: 0x00000023 : Failure while halting boot CPU panic
Sleep/Wakes since boot at 2020-11-04 07:27:46 +0100 :0 Dark Wake Count in this sleep cycle:2

tylernguyen commented 3 years ago

@lubixxx96

Did you do a clean update the newest EFI?

If not, could you please provider a copy of your EFI?

In addition, could I see your current pmset settings?

Could you revert to the last commit's old battery patch and retain the new sleep patch? I've attached it in this comment. Legacy Battery Patch.zip

All you need to do is is replace the battery patch with the old one and install the ACPI renames.

Also, during your testing, I'd like for you to reset pmset settings and also reset NVRAM.

lubixxx96 commented 3 years ago

Sure, I did clean update. Here is EFI folder: https://drive.google.com/file/d/1RxhOcZG4o74hv8841ezx2rU3necVEJYR/view?usp=sharing

here are pmset settings: Currently in use: hibernatemode 3 halfdim 1 lidwake 1 womp 0 networkoversleep 0 sleep 0 (sleep prevented by mds_stores, coreaudiod, coreaudiod, coreaudiod) ttyskeepawake 1 disksleep 10 hibernatefile /var/vm/sleepimage gpuswitch 2 displaysleep 15 (display sleep prevented by zoom.us)

I will try the legacy battery patch.

EDIT: didn't help, same issue with legacy battery patch

benbender commented 3 years ago

@lubixxx96

First: please stay on hibernatemode 3 to have a testing-ground.

Then a few questions:

@tylernguyen if the system seems to crash that hard its not a simple issue but one that hits OSX really hard on the kernel-level. Never seen that on S3 though...

lubixxx96 commented 3 years ago

When I put notebook to sleep, the light on the power button first blink quickly, similar or same as when you attach the AC cable to the notebook, and then it stats pulsating. When I hit the button to wake the notebook, it will start booting, not waking up. It shows the message that my PC was not shut down correctly etc...

Charlyo commented 3 years ago

@lubixxx96 do you have any kind of undervolt?

lubixxx96 commented 3 years ago

@lubixxx96 do you have any kind of undervolt?

Not in the BIOS, only via VoltageShift. It does not caused any issues so far...

Charlyo commented 3 years ago

Remove the undervolt and try to sleep again.

benbender commented 3 years ago
  • I do have USB-C dock, which also powers the notebook. A few usbs, hdmi screen and ethernet connected to the dock too.

Remove every device connected before going to sleep. Check if the issue persists.

  • patched bios, currently with Windows 10 sleep mode and bios assisted thunderbolt

Any other, noteable changes in bios?

  • I put keepsyms=1 in the boot-args, but the notebook does not show any information when the issue happend When I put notebook to sleep, the light on the power button first blink quickly, similar or same as when you attach the AC cable to the notebook, and then it stats pulsating. When I hit the button to wake the notebook, it will start booting, not waking up. It shows the message that my PC was not shut down correctly etc...

And the message doesn't have a "report"-button to send/look at the stacktrace?

One unanswered question: is it reproduceable on any sleep?

Besides that: It seems to be related to your specific config as f.e. neither me nor tyler have those issues. Strategy should be to try to remove moving parts (remove attached devices, remove undervolt, reset bios etc) one by one and see what changes the behaviour.

lubixxx96 commented 3 years ago

UUID: Unknown UUID 2020-11-04 16:11:30 +0100 Sleep Entering Sleep state due to '': Using AC (Charge:0%)
2020-11-04 16:11:30 +0100 Failure Failure during wake: 0x2FE995C900000028 : Informing clients about completed changes to system caps
Sleep/Wakes since boot at 2020-11-04 15:59:41 +0100 :0 Dark Wake Count in this sleep cycle:0

EDIT:

panic(cpu 0 caller 0xffffff8019ac23c2): "Rooting from the live fs of a sealed volume is not allowed on a RELEASE build\n"@/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/apfs/apfs-1677.41.3/kext/apfs_vfsops.c:2011 Backtrace (CPU 0), Frame : Return Address 0xffffffa05d37aea0 : 0xffffff8016ab76dd mach_kernel : _handle_debugger_trap + 0x3dd 0xffffffa05d37aef0 : 0xffffff8016bfa0e3 mach_kernel : _kdp_i386_trap + 0x143 0xffffffa05d37af30 : 0xffffff8016bea71a mach_kernel : _kernel_trap + 0x55a 0xffffffa05d37af80 : 0xffffff8016a5ca2f mach_kernel : _return_from_trap + 0xff 0xffffffa05d37afa0 : 0xffffff8016ab6f7d mach_kernel : _DebuggerTrapWithState + 0xad 0xffffffa05d37b0c0 : 0xffffff8016ab7268 mach_kernel : _panic_trap_to_debugger + 0x268 0xffffffa05d37b130 : 0xffffff80172b9c9a mach_kernel : _panic + 0x54 0xffffffa05d37b1a0 : 0xffffff8019ac23c2 com.apple.filesystems.apfs : _apfs_vfsop_mount + 0x339b 0xffffffa05d37b990 : 0xffffff8019acba1c com.apple.filesystems.apfs : _apfs_vfsop_mountroot + 0x3d 0xffffffa05d37b9c0 : 0xffffff8016d3dc40 mach_kernel : _vfs_mountroot + 0x140 0xffffffa05d37bb40 : 0xffffff8016ffa763 mach_kernel : _set_rootvnode + 0x3c53 0xffffffa05d37be70 : 0xffffff8016ae4fe3 mach_kernel : _max_valid_stack_address + 0xdf3 0xffffffa05d37bfa0 : 0xffffff8016a5c13e mach_kernel : _call_continuation + 0x2e Kernel Extensions in backtrace: com.apple.filesystems.apfs(1677.41.3)[29D97AD6-33D1-3D1C-B372-716630C04FC7]@0xffffff8019a48000->0xffffff8019baafff dependency: com.apple.driver.AppleEFINVRAM(2.1)[5F9F73AC-C2C4-34AE-88B9-BB0982B680C4]@0xffffff8017e39000->0xffffff8017e42fff dependency: com.apple.driver.AppleEffaceableStorage(1.0)[BF24E31D-5778-3392-AF41-D74D4E2215D9]@0xffffff8017e4c000->0xffffff8017e51fff dependency: com.apple.iokit.CoreAnalyticsFamily(1)[7FA40AFC-0508-30AC-96B2-3B04317AA975]@0xffffff8018287000->0xffffff801828dfff dependency: com.apple.iokit.IOStorageFamily(2.1)[FEB044B0-421F-3F29-8E6B-EF16162C1A18]@0xffffff8019514000->0xffffff8019525fff dependency: com.apple.kec.corecrypto(1.0)[F0B4250F-76E4-34C4-BCBC-344BFC372FA2]@0xffffff8019bd8000->0xffffff8019c64fff dependency: com.apple.security.AppleImage4(3.0.0)[2BA77033-F1E2-3AA1-908E-C0A26A42DD8A]@0xffffff8017eae000->0xffffff8017ebdfff

Process name corresponding to current thread: kernel_task Boot args: keepsyms=1 -hbfx-dump-nvram rtcfx_exclude=80-AB chunklist-security-epoch=0 -chunklist-no-rev2-dev chunklist-security-epoch=0 -chunklist-no-rev2-dev

Mac OS version: Not yet set

Kernel version: Darwin Kernel Version 20.1.0: Sat Oct 24 21:21:05 PDT 2020; root:xnu-7195.50.3.201.1~1/RELEASE_X86_64 Kernel UUID: 2BA1C8BD-9C95-3FA7-B7A4-F991BB96D49C KernelCache slide: 0x0000000016800000 KernelCache base: 0xffffff8016a00000 Kernel slide: 0x0000000016810000 Kernel text base: 0xffffff8016a10000 __HIB text base: 0xffffff8016900000 System model name: MacBookPro14,1 (Mac-B4831CEBD52A0C4C) System shutdown begun: NO Panic diags file unavailable, panic occurred prior to initialization Hibernation exit count: 0

System uptime in nanoseconds: 986738499 Last Sleep: absolute base_tsc base_nano Uptime : 0x000000003ad072ea Sleep : 0x0000000000000000 0x0000000000000000 0x0000000000000000 Wake : 0x0000000000000000 0x00000016b10e81db 0x0000000000000000

lubixxx96 commented 3 years ago

Update:

With hibernatemode 3 and linux bios option, sleep works with hibernatemode 25, the led wont stop blinking and fan wont stop, but when I kill it by holding the power button and then start again, it will recover, which I never experienced on Mac. I can see Bios message, and then it will boot mac but exactly where I left it. Like good old windows hibernate.

benbender commented 3 years ago

@lubixxx96 Please update to the latest commit and hibernatemode 25 should work. I fixed it a few hours after @tylernguyen push.

@tylernguyen For reference: keepsyms=1 -hbfx-dump-nvram rtcfx_exclude=80-AB is the problem.

lubixxx96 commented 3 years ago

It works now. I updated to the latest commit and its working now. Even with 25 hibernatemode and Windows 10 set in bios.

Thank you guys!