Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sleep doesn't work and forces reboot [un-resolved] #106

Open
JonnIEnglish opened this issue Apr 29, 2020 · 21 comments
Open

Sleep doesn't work and forces reboot [un-resolved] #106

JonnIEnglish opened this issue Apr 29, 2020 · 21 comments

Comments

@JonnIEnglish
Copy link

Hi all, I hope everyone is doing well.

I am experiencing an issue regarding sleep on my 2018 Matebook x Pro 16GB.
After a reboot, the laptop sleeps fine the first time by either sleeping from the power options or closing the lid. The problem I am having occurs only when I try to put the laptop to sleep for a second time. On the second time the laptop's screen goes dark and the fans stop spinning but the Fn and Caps lock key's lights keep shining and they do not go off. Nothing can be done to wake the laptop up again and one has to hold the power button until it force shuts-down. Then it can be booted up again.

I am using Darkwake = 10 in my clover startup commands and I have hibernate mode set to 0. (Although I have changes these to a few different values with the same results)

I have also deleted the USBInjectAll kext as it was causing further sleep problems such as the laptop immediately waking up from sleep after being put to sleep.

Any help regarding this issue would be much appreciated as this problem has been with me for a while now.

Many thanks and stay safe,

Jonathan

@mircoianese
Copy link

mircoianese commented Apr 30, 2020

Hello! Can you please send your Clover folder here? I got much stabler sleep by manually patching SSDT-UIAC and using USBInjectAll without USBMap

@JonnIEnglish
Copy link
Author

Alright sure thing. GitHub was having issues uploading the whole EFI folder as it was apparently too big.
CLOVER.zip

@mircoianese
Copy link

Your SSDT-UIAC does not seem to be patched at all.
Try this (backup yours first and be ready if the system does not boot anymore):
SSDT-UIAC.aml.zip

Also remove USBMap.kext and add only USBInjectAll.kext and try!

@mircoianese
Copy link

Note that I also just had a crash:

panic(cpu 0 caller 0xffffff8007491b2c): Sleep transition timed out after 180 seconds while calling power state change callbacks. Suspected bundle: com.apple.iokit.IOUSBHostFamily. Thread 0x4f715.
Failure code:: 0x00000008 00000014

I think it is related with bluetooth chip not working sometimes after sleep, that then breaks the next sleep. I will investigate into this and let you know if I find a fix

@mircoianese
Copy link

Note that I also just had a crash:

panic(cpu 0 caller 0xffffff8007491b2c): Sleep transition timed out after 180 seconds while calling power state change callbacks. Suspected bundle: com.apple.iokit.IOUSBHostFamily. Thread 0x4f715.
Failure code:: 0x00000008 00000014

I think it is related with bluetooth chip not working sometimes after sleep, that then breaks the next sleep. I will investigate into this and let you know if I find a fix

It was because I forgot to remove the USB patches from Clover after applying SSDT-UIAC.
So, correct steps are:

  1. Patch SSDT-UIAC.aml (the one I sent two messages above should work fine for you)
  2. Put USBInjectAll.kext in EFI/CLOVER/Kexts/Others
  3. Remove USBMap.kext
  4. Remove / Disable the two USB patches from config.plist (you find those under "Kernel and kext patches" in Clover configurator)
  5. Reboot

Everything should working fine without any sleep issue (also Bluetooth unavailable after sleep seems to be fixed in my case)

@jonescamilla
Copy link

Are these the two you are referring to?
<key>Comment</key> <string>USB Port limit patch #2/2 10.15.x (credit DalianSky)</string> <key>Disabled</key>

<key>Comment</key> <string>USB Port limit patch #1/2 10.15.x (credit DalianSky)</string> <key>Disabled</key>

@mircoianese
Copy link

mircoianese commented May 1, 2020 via email

@jonescamilla
Copy link

jonescamilla commented May 1, 2020

I know people hate questions like these but just delete from <dict> to </dict> right? Thank you in advance.

@mircoianese
Copy link

mircoianese commented May 1, 2020 via email

@JonnIEnglish
Copy link
Author

Okay so I have followed the steps you wrote out and have slept and woken up the laptop a few times. No errors and everything seems to be working perfectly! (Although I will keep an eye out for any errors in the coming days and report back if there are any)

Thank you so much for the help! My problem seems to be solved.

@kilgil27
Copy link

kilgil27 commented May 1, 2020

@mircoianese Where do I put the SSDT-UIAC? Everything else I was able to do. Thanks

@mircoianese
Copy link

mircoianese commented May 1, 2020 via email

@kilgil27
Copy link

kilgil27 commented May 1, 2020

@mircoianese Thank you, I will test and see how it goes

@JonnIEnglish JonnIEnglish changed the title Sleep doesn't work and forces reboot. Sleep doesn't work and forces reboot [Resolved] May 1, 2020
@JonnIEnglish JonnIEnglish changed the title Sleep doesn't work and forces reboot [Resolved] Sleep doesn't work and forces reboot [un-resolved] May 1, 2020
@JonnIEnglish
Copy link
Author

Okay, so after closing the lid on the laptop and coming back to it a few hours later, it had crashed and restarted, giving the same error message as before.

@mircoianese
Copy link

Okay, so after closing the lid on the laptop and coming back to it a few hours later, it had crashed and restarted, giving the same error message as before.

It's giving you the same message that it gave me? Related to IOUSBFamily?
Please paste here the full error stacktrace.

Also send again your Clover folder, thanks

@JonnIEnglish
Copy link
Author

Yes, it is the same IOUSBFamily error, I will have to wait for it to happen again s I can copy and paste it here though.

CLOVER.zip

@JonnIEnglish
Copy link
Author

Here is the error message:

panic(cpu 0 caller 0xffffff80202a2d1c): Sleep transition timed out after 180 seconds while calling power state change callbacks. Suspected bundle: com.apple.iokit.IOUSBHostFamily. Thread 0x128e9d.
Failure code:: 0x00000008 00000014

Backtracing specified thread
Backtrace (CPU 0), Frame : Return Address
0xffffff923b713900 : 0xffffff801fc60178
0xffffff82153a3c40 : 0xffffff801fb5d771
0xffffff82153a3cb0 : 0xffffff801fb5bf6f
0xffffff82153a3d00 : 0xffffff801fc5d2b9
0xffffff82153a3d40 : 0xffffff801fc5cbdb
0xffffff82153a3d70 : 0xffffff802023f578
0xffffff82153a3da0 : 0xffffff8020242489
0xffffff82153a3e00 : 0xffffff802022794b
0xffffff82153a3ea0 : 0xffffff8020227344
0xffffff82153a3ec0 : 0xffffff801fb7d7e5
0xffffff82153a3f40 : 0xffffff801fb7d311
0xffffff82153a3fa0 : 0xffffff801fae213e

BSD process name corresponding to current thread: kernel_task
Boot args: dart=0 -cdfon -igfxmlr gfxrst=1 darkwake=8

Mac OS version:
19D76

Kernel version:
Darwin Kernel Version 19.3.0: Thu Jan 9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64
Kernel UUID: A8DDE75C-CD97-3C37-B35D-1070CC50D2CE
Kernel slide: 0x000000001f800000
Kernel text base: 0xffffff801fa00000
__HIB text base: 0xffffff801f900000
System model name: MacBookPro14,1 (Mac-B4831CEBD52A0C4C)
System shutdown begun: NO
Panic diags file available: YES (0x0)

System uptime in nanoseconds: 58694612463683
last loaded kext at 58460327817588: >!UAudio 320.49 (addr 0xffffff7fa4efb000, size 434176)
last unloaded kext at 58291065166691: ru.joedm.SMCSuperIO 1.0.9 (addr 0xffffff7fa3a01000, size 28672)
loaded kexts:
com.realtek.driver.RtWlanU 1830.32.b13
org.virtualbox.kext.VBoxNetAdp 6.1.6
org.virtualbox.kext.VBoxNetFlt 6.1.6
org.virtualbox.kext.VBoxUSB 6.1.6
org.virtualbox.kext.VBoxDrv 6.1.6
com.intel.driver.EnergyDriver 3.7.0
com.zxystd.!I!BFirmware 1.0.1
as.acidanthera.voodoo.driver.PS2Keyboard 2.1.0
ru.joedm.SMCSuperIO 1.0.9
as.acidanthera.voodoo.driver.PS2!C 2.1.0
org.rehabman.driver.NullEthernet 1.0.6
com.alexandred.VoodooI2CHID 1
com.alexandred.VoodooI2C 2.3
org.coolstar.VoodooGPIO 1.1
as.vit9696.SMCProcessor 1.0.9
as.lvs1974.HibernationFixup 1.3.1
xyz.racermaster.NoTouchID 1.0.3
as.vit9696.!AALC 1.4.5
org.tw.CodecCommander 2.7.1
as.vit9696.WhateverGreen 1.3.5
com.rehabman.driver.USBInjectAll 0.7.1
org.vanilla.driver.CPUFriend 1.2.0
ru.usrsse2.SMCBatteryManager 1
ru.usrsse2.SMCLightSensor 1
as.vit9696.VirtualSMC 1.0.9
as.vit9696.Lilu 1.4.0
com.alexandred.VoodooI2CServices 1

usb.!UHostBillboardDevice 1.0
@filesystems.msdosfs 1.10
@fileUtil 20.036.15
AudioAUUC 1.70
@filesystems.autofs 3.0
@filesystems.exfat 1.4
@filesystems.ntfs 3.14.3
!APlatformEnabler 2.7.0d0
AGPM 111.4.2
X86PlatformShim 1.0.0
!AUpstreamUserClient 3.6.8
!AHDA 283.15
!AGraphicsDevicePolicy 4.7.2
@AGDCPluginDisplayMetrics 4.7.2
!AHV 1
|IOUserEthernet 1.0.1
|IO!BSerialManager 7.0.3f5
@private.KextAudit 1.0
pmtelemetry 1
@Dont_Steal_Mac_OS_X 7.0.0
eficheck 1
!A!IKBLGraphics 14.0.4
!ABacklight 180.1
!A!IPCHPMC 2.0.1
!ASMCLMU 212
!A!IKBLGraphicsFramebuffer 14.0.4
!A!ISlowAdaptiveClocking 4.0.0
!AMCCSControl 1.13
!ATopCaseHIDEventDriver 3430.1
!AVirtIO 1.0
@filesystems.hfs.kext 522.0.9
@!AFSCompression.!AFSCompressionTypeDataless 1.0.0d1
@BootCache 40
@!AFSCompression.!AFSCompressionTypeZlib 1.0.0
@filesystems.apfs 1412.81.1
!ASmartBatteryManager 161.0.0
!ARTC 2.0
!AACPIButtons 6.1
!AACPIEC 6.1
!AHPET 1.8
!ASMBIOS 2.1
!AAPIC 1.7
$!AImage4 1
@nke.applicationfirewall 303
$TMSafetyNet 8
@!ASystemPolicy 2.0.0
|EndpointSecurity 1
!UAudio 320.49
usb.cdc 5.0.0
|IOUSBUserClient 900.4.2
@kext.triggers 1.0
DspFuncLib 283.15
@kext.OSvKernDSPLib 529
!AGraphicsControl 4.7.2
|IOAVB!F 800.17
!ASSE 1.0
!ABacklightExpert 1.1.0
X86PlatformPlugin 1.0.0
IOPlatformPlugin!F 6.0.0d8
!AHDA!C 283.15
|IOHDA!F 283.15
|IONDRVSupport 569.4
|IOAccelerator!F2 438.3.1
@!AGPUWrangler 4.7.2
@!AGraphicsDeviceControl 4.7.2
|IOSlowAdaptiveClocking!F 1.0.0
!ASMBus!C 1.0.18d1
@plugin.IOgPTPPlugin 810.1
|IOEthernetAVB!C 1.1.0
|IOSkywalk!F 1
!AActuatorDriver 3430.1
!AHS!BDriver 3430.1
IO!BHIDDriver 7.0.3f5
!AMultitouchDriver 3430.1
!AInputDeviceSupport 3430.1
usb.networking 5.0.0
usb.!UHostCompositeDevice 1.2
usb.!UHub 1.2
|Broadcom!BHost!CUSBTransport 7.0.3f5
|IO!BHost!CUSBTransport 7.0.3f5
|IO!BHost!CTransport 7.0.3f5
|IO!B!F 7.0.3f5
|IO!BPacketLogger 7.0.3f5
|IOSerial!F 11
|IOSurface 269.6
@filesystems.hfs.encodings.kext 1
usb.!UHostPacketFilter 1.0
|IOUSB!F 900.4.2
|IONVMe!F 2.1.0
usb.!UXHCIPCI 1.2
usb.!UXHCI 1.2
!AEFINVRAM 2.1
!AEFIRuntime 2.1
|IOGraphics!F 569.4
|IOHID!F 2.0.0
$quarantine 4
$sandbox 300.0
@kext.!AMatch 1.0.0d1
|IOAudio!F 300.2
@vecLib.kext 1.2.0
|IOSMBus!F 1.1
DiskImages 493.0.0
!AFDEKeyStore 28.30
!AEffaceable!S 1.0
!AKeyStore 2
!UTDM 489.80.2
|IOSCSIBlockCommandsDevice 422.0.2
!ACredentialManager 1.0
KernelRelayHost 1
!ASEPManager 1.0.1
IOSlaveProcessor 1
|IOUSBMass!SDriver 157.40.7
|IOSCSIArchitectureModel!F 422.0.2
|IO!S!F 2.1
|IOUSBHost!F 1.2
!UHostMergeProperties 1.2
usb.!UCommon 1.0
!ABusPower!C 1.0
|CoreAnalytics!F 1
!AMobileFileIntegrity 1.0.5
@kext.CoreTrust 1
|IOTimeSync!F 810.1
|IONetworking!F 3.4
|IOReport!F 47
!AACPIPlatform 6.1
!ASMC 3.1.9
watchdog 1
|IOPCI!F 2.9
|IOACPI!F 1.4
@kec.pthread 1
@kec.corecrypto 1.0
@kec.Libm 1

@mircoianese
Copy link

I confirm sleep is working fine for me, and I'm not getting that KP anymore. I can't see anything wrong in your config tho

@mircoianese
Copy link

mircoianese commented May 3, 2020

Hello,
please try with this and let me know. Remove SSDT-UIAC.aml and SSDT-USBX.aml from CLOVER/ACPI/patched and replace USBInjectAll.kext with the kext attached, then reboot.

Note: all USB patches in Clover must be deactivated!

USBPorts.kext.zip

@JonnIEnglish
Copy link
Author

Alright, I have deleted SSDT-UIAC.aml and SSDT-USBX.aml and replaced USBInjectAll.kext with the one you sent. Everything seems to be working okay after reboot but I will juts have to wait and see if I get any KPs.

Many thanks!

@profzei
Copy link

profzei commented May 31, 2020

See my repo with a new fix for sleep & wake issues; I agreed with the gnodipac886 so that all my work (carried out in these months of his absence and stored in my repo) can also be integrated into this repo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants