acidanthera / bugtracker

Acidanthera Bugtracker
385 stars 45 forks source link

Sleep Wake failure in EFI #817

Closed soffyo closed 4 years ago

soffyo commented 4 years ago

I've been searching around for a fix to this issue and the number of different configuration and fixes I have tried suggests me that this is not an installation or configuration mistake but something else that I hope we can investigate together.

I am using the following system:

Asus Zenbook UX331UN

System: 10.15.4 Bootloader: Opencore 0.5.7

I attach my ACPI folder + config.plist: Archive.zip

IOREG.zip

Kernel Panic

This kernel panic happens in a very precise situation. When the laptop is running on AC Power: Sleep and Wake work very fast and smooth. When the laptop in on Battery Power: The system goes to sleep as normal but freezes right on wake up leaving the machine hanging with a dead black screen, no keyboard, no usb, no input at all. On hard-restart (long press the power button) the system shows a panic report but without many useful info, I report it as follow

Sleep Wake failure in EFI

Failure code:: 0xffffffff 0x0000001f

Please IGNORE the below stackshot

================================================================
Date/Time:        2020-04-05 14:03:16 +0200
OS Version:       ??? ??? (Build ???)
Architecture:     x86_64
Report Version:   29

Data Source:      Stackshots
Shared Cache:     0x1663000 236F19A6-FD35-3AC8-8DDA-55A6E2DEA5F1

Event:            Sleep Wake Failure
Duration:         0.00s
Steps:            1

Time Awake Since Boot: 14s

Process:          swd [294]
Architecture:     x86_64
Footprint:        448 KB
Start time:       2020-04-05 14:03:16 +0200
End time:         2020-04-05 14:03:16 +0200
Num samples:      1 (1)

  Thread 0xeb8    1 sample (1)    priority 4 (base 4)
  <thread QoS background (requested background), thread darwinbg, process darwinbg, IO tier 2>
  1  start + 1 (libdyld.dylib + 109769) [0x7fff6876bcc9] 1
    1  ??? [0x104917454] 1
      1  ??? [0x1049171dd] 1
        1  __stack_snapshot_with_config + 10 (libsystem_kernel.dylib + 135862) [0x7fff688cd2b6] 1
         *1  ??? [0xffffff80002c8206] 1
           *1  ??? [0xffffff80009875f7] 1
             *1  ??? [0xffffff80008a0001] 1
               *1  ??? [0xffffff80002eb9e7] (running) 1

  Binary Images:
        0x7fff68751000 -     0x7fff68787fff  libdyld.dylib (750.5)               <D2A07EF5-A64B-3692-BE13-89DAA2EC5E80>  /usr/lib/system/libdyld.dylib
        0x7fff688ac000 -     0x7fff688d8fff  libsystem_kernel.dylib (6153.101.6) <E76440E1-D1E8-3D9A-8B47-D01F554FF1C4>  /usr/lib/system/libsystem_kernel.dylib
Model: MacBookPro15,2, BootROM 1037.80.53.0.0, 4 processors, Quad-Core Intel Core i7, 2 GHz, 8 GB, SMC 1.74f4
Graphics: Intel UHD Graphics 620, Intel UHD Graphics 620, spdisplays_builtin
Memory Module: BANK 0/ChannelA-DIMM0, 4 GB, LPDDR3, 2133 MHz, Samsung, K4E6E304EB-EGCG
Memory Module: BANK 2/ChannelB-DIMM0, 4 GB, LPDDR3, 2133 MHz, Samsung, K4E6E304EB-EGCG
Bluetooth: Version 7.0.4f6, 3 services, 26 devices, 1 incoming serial ports
Network Service: Ethernet, Ethernet, en0
Network Service: USB WiFi, Ethernet, en4
Serial ATA Device: SanDisk SD8SN8U512G1002, 512,11 GB
USB Device: USB 3.0 Bus
USB Device: Bluetooth HCI
USB Device: USB2.0 VGA UVC WebCam
USB Device: 802.11ac NIC
Thunderbolt Bus: 

Only two times (seems randomly) similar panics occurred on AC Power too, this time leaving a richer report that I attach but I don't know if it's related since it happened two times in months and this system sleeps very often on ac power without issues (several times a day).

panic(cpu 7 caller 0xffffff800ba4c32a): Kernel trap at 0xffffff800ba63d9e, type 14=page fault, registers:
CR0: 0x000000008001003b, CR2: 0x000001100c3ef898, CR3: 0x0000000255fc902f, CR4: 0x00000000003626e0
RAX: 0x0000018ffffffe70, RBX: 0x0000000000001d51, RCX: 0x0000000000000000, RDX: 0xffffff800c3efa20
RSP: 0xffffff81189ebd70, RBP: 0xffffff81189ebe20, RSI: 0x0000000000000000, RDI: 0x00000000ffffffff
R8:  0x0000000000000000, R9:  0x00000000000016c0, R10: 0x0000000005de7a5e, R11: 0xffffff800c3f5280
R12: 0xffffffffffffaef2, R13: 0x00000000000057f3, R14: 0xffffff800c3f0380, R15: 0x0000000000000006
RFL: 0x0000000000010002, RIP: 0xffffff800ba63d9e, CS:  0x0000000000000008, SS:  0x0000000000000000
Fault CR2: 0x000001100c3ef898, Error code: 0x0000000000000000, Fault CPU: 0x7, PL: 1, VF: 5

Backtrace (CPU 7), Frame : Return Address
0xffffff81189eb7d0 : 0xffffff800b9215cd 
0xffffff81189eb820 : 0xffffff800ba5a3c5 
0xffffff81189eb860 : 0xffffff800ba4bf7e 
0xffffff81189eb8b0 : 0xffffff800b8c7a40 
0xffffff81189eb8d0 : 0xffffff800b920c97 
0xffffff81189eb9d0 : 0xffffff800b921087 
0xffffff81189eba20 : 0xffffff800c0c2c7c 
0xffffff81189eba90 : 0xffffff800ba4c32a 
0xffffff81189ebc10 : 0xffffff800ba4c028 
0xffffff81189ebc60 : 0xffffff800b8c7a40 
0xffffff81189ebc80 : 0xffffff800ba63d9e 
0xffffff81189ebe20 : 0xffffff800ba4e64e 
0xffffff81189ebe70 : 0xffffff800b943deb 
0xffffff81189ebed0 : 0xffffff800b94370b 
0xffffff81189ebf40 : 0xffffff800b945035 
0xffffff81189ebf80 : 0xffffff800b9468bb 
0xffffff81189ebfa0 : 0xffffff800b8c713e 

BSD process name corresponding to current thread: timed

Mac OS version:
19E266

Kernel version:
Darwin Kernel Version 19.4.0: Wed Mar  4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64
Kernel UUID: AB0AA7EE-3D03-3C21-91AD-5719D79D7AF6
Kernel slide:     0x000000000b600000
Kernel text base: 0xffffff800b800000
__HIB  text base: 0xffffff800b700000
System model name: MacBookPro15,2 (Mac-827FB448E656EC26)
System shutdown begun: NO
Panic diags file available: YES (0x0)

System uptime in nanoseconds: 5517765630742
panic(cpu 1 caller 0xffffff800584c32a): Kernel trap at 0xffffff8005863d9e, type 14=page fault, registers:
CR0: 0x000000008001003b, CR2: 0x00000110061ef898, CR3: 0x000000011c55e14e, CR4: 0x00000000003626e0
RAX: 0x0000018ffffffe70, RBX: 0x0000000000001d73, RCX: 0x0000000000000000, RDX: 0xffffff80061efa20
RSP: 0xffffff9122543d70, RBP: 0xffffff9122543e20, RSI: 0x0000000000000000, RDI: 0x00000000ffffffff
R8:  0x0000000000000000, R9:  0x0000000000000340, R10: 0x0000000000368c98, R11: 0xffffff80061f5280
R12: 0xffffffffffffa8bb, R13: 0x0000000000005859, R14: 0xffffff80061f0060, R15: 0x0000000000000004
RFL: 0x0000000000010002, RIP: 0xffffff8005863d9e, CS:  0x0000000000000008, SS:  0x0000000000000000
Fault CR2: 0x00000110061ef898, Error code: 0x0000000000000000, Fault CPU: 0x1, PL: 1, VF: 5

Backtrace (CPU 1), Frame : Return Address
0xffffff91225437d0 : 0xffffff80057215cd 
0xffffff9122543820 : 0xffffff800585a3c5 
0xffffff9122543860 : 0xffffff800584bf7e 
0xffffff91225438b0 : 0xffffff80056c7a40 
0xffffff91225438d0 : 0xffffff8005720c97 
0xffffff91225439d0 : 0xffffff8005721087 
0xffffff9122543a20 : 0xffffff8005ec2c7c 
0xffffff9122543a90 : 0xffffff800584c32a 
0xffffff9122543c10 : 0xffffff800584c028 
0xffffff9122543c60 : 0xffffff80056c7a40 
0xffffff9122543c80 : 0xffffff8005863d9e 
0xffffff9122543e20 : 0xffffff800584e64e 
0xffffff9122543e70 : 0xffffff8005743deb 
0xffffff9122543ed0 : 0xffffff800574370b 
0xffffff9122543f40 : 0xffffff8005745035 
0xffffff9122543f80 : 0xffffff80057468bb 
0xffffff9122543fa0 : 0xffffff80056c713e 

BSD process name corresponding to current thread: Code Helper (Ren

Mac OS version:
19E266

Kernel version:
Darwin Kernel Version 19.4.0: Wed Mar  4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64
Kernel UUID: AB0AA7EE-3D03-3C21-91AD-5719D79D7AF6
Kernel slide:     0x0000000005400000
Kernel text base: 0xffffff8005600000
__HIB  text base: 0xffffff8005500000
System model name: MacBookPro15,2 (Mac-827FB448E656EC26)
System shutdown begun: NO
Panic diags file available: YES (0x0)

System uptime in nanoseconds: 3135776330806

Things I have tried:

Everything I try, the same behaviour is observed. Sleep and Wake work well on AC, Wake doesn't work on Battery, no matter what I do. One noticeable thing may be that the same issue happened on Windows too. I had a BSOD when waking the machine from sleep while it was on battery power. This only happened one time, normally it wakes on battery if I am using Windows.

Looking around on the web about this same issue on real Macs I've found that it can occur because the system wakes faster than the ssd and panics not finding any drive. This could be possible but then why the system wakes smoothly if it's on AC Power with this only happening on Battery? I have even considered an hardware failure but I think it should be happening on Windows too in this case.

vandroiy2013 commented 4 years ago

Hi. How does it concern to Acidanthera projects? Did you read statement before opening issue? Sorry but i'm closing this as invalid. Use forums for support.

soffyo commented 4 years ago

I've red the statement. I thought it might be worth investigate if this is related to the kexts from Acidanthera projects that I a am using and I have specified that this doesn't look like a configuration/installation issue that I need to troubleshoot into a forum. I'm sorry if this results in an invalid request.

vandroiy2013 commented 4 years ago

Do you see any acidanthera kext in panic backtrace? I don't. Highly likely this is your laptop firmware problem.