Contribute
Register

Getting sleep/wake to work on Dell XPS 12 9250 on 10.13.4

Status
Not open for further replies.
Joined
Nov 28, 2015
Messages
146
Motherboard
Lenovo Yoga 920 - OpenCore
CPU
i7-8550U
Graphics
HD620, 3840x2160
Hi,

I am trying to get sleep/wake to work on my Dell XPS 12 9250 running 10.13.4. Some of the steps I have performed can be see in this thread for Sierra: https://www.tonymacx86.com/threads/...k-on-dell-xps-12-9250-on-12-2-5.223714/page-2

I have working SSDT-UIAC.aml + USBInjectAll.kext, per: https://www.tonymacx86.com/threads/...usbinjectall-working-on-dell-xps-9250.251812/. I am not sure if I need to make any adjustments to power management first. As things stand, it seems that the computer goes into sleep when I tell it to. The power LED flashes rapidly as the screen is off, but the computer will not come back on after pressing the power button.

I have included 'gen_debug -sysprofile' files as well as my decompiled DSDT and SSDTs.

I am thinking I need to apply the following patches, but I am very unsure:

"Fix _WAK Arg0 v2"
"HPET Fix"
"SMBUS Fix"
"IRQ Fix"
"RTC Fix"
"OS Check Fix"
"Fix Mutex with non-zero SyncLevel"
"instant wake" (_PRW 0x6d patch)"

Thank you!
 

Attachments

  • debug_15001.zip
    2.2 MB · Views: 184
  • decompiled DSDT+SSDTs.zip
    118.5 KB · Views: 172
Last edited:
Hi,

I am trying to get sleep/wake to work on my Dell XPS 12 9250 running 10.13.4. Some of the steps I have performed can be see in this thread for Sierra: https://www.tonymacx86.com/threads/...k-on-dell-xps-12-9250-on-12-2-5.223714/page-2

I have working SSDT-UIAC.aml + USBInjectAll.kext, per: https://www.tonymacx86.com/threads/...usbinjectall-working-on-dell-xps-9250.251812/. I am not sure if I need to make any adjustments to power management first. As things stand, it seems that the computer goes into sleep when I tell it to. The power LED flashes rapidly as the screen is off, but the computer will not come back on after pressing the power button.

I have included 'gen_debug -sysprofile' files as well as my decompiled DSDT and SSDTs.

I am thinking I need to apply the following patches, but I am very unsure:

"Fix _WAK Arg0 v2"
"HPET Fix"
"SMBUS Fix"
"IRQ Fix"
"RTC Fix"
"OS Check Fix"
"Fix Mutex with non-zero SyncLevel"
"instant wake" (_PRW 0x6d patch)"

Thank you!
Seems like the patch you going to use is correct.
Only one you need to notice. For "instant wake" (_PRW 0x6d patch)", make sure you're using for Skylake.

And "Fix _WAK Arg0 v2" seems no needed too since you're installed High Sierra.
 
Seems like the patch you going to use is correct.
Only one you need to notice. For "instant wake" (_PRW 0x6d patch)", make sure you're using for Skylake.

And "Fix _WAK Arg0 v2" seems no needed too since you're installed High Sierra.

I applied the "instant wake" (_PRW 0x6d patch)" patch via MaciASL and exported the AML, which I saved to Clover/ACPI/patched. Even though it appears the DSDT is being loaded, I still am unable to recover from sleep.

Found in my bootleg.txt:
Code:
15:984  0:003  DSDT found in Clover volume OEM folder: EFI\CLOVER\ACPI\patched\DSDT.aml
15:993  0:008  Apply DsdtFixMask=0x10020000
15:993  0:000     drop _DSM mask=0x0000

Here is an updated 'gen_debug -sysprofile' run. Thank you.
 

Attachments

  • debug_5427.zip
    2.3 MB · Views: 176
I applied the "instant wake" (_PRW 0x6d patch)" patch via MaciASL and exported the AML, which I saved to Clover/ACPI/patched. Even though it appears the DSDT is being loaded, I still am unable to recover from sleep.

Found in my bootleg.txt:
Code:
15:984  0:003  DSDT found in Clover volume OEM folder: EFI\CLOVER\ACPI\patched\DSDT.aml
15:993  0:008  Apply DsdtFixMask=0x10020000
15:993  0:000     drop _DSM mask=0x0000

Here is an updated 'gen_debug -sysprofile' run. Thank you.
Not sure it help or not, but I found few problems:
  • FixRegion is not correct, should remove or disable it.
  • FixHeaders should put inside ACPI/DSDT/Fixes.
  • You set ACPI/SSDT/Generate/PluginType=true, but you didn't set type inside config.plist/CPU.
Also make sure you're using "USB3 _PRW 0x6D Skylake (instant wake)" from RehabMan's repository.
 
Not sure it help or not, but I found few problems:
  • FixRegion is not correct, should remove or disable it.
  • FixHeaders should put inside ACPI/DSDT/Fixes.
  • You set ACPI/SSDT/Generate/PluginType=true, but you didn't set type inside config.plist/CPU.
Also make sure you're using "USB3 _PRW 0x6D Skylake (instant wake)" from RehabMan's repository.

Thank you. I removed FixRegion and PluginType, as I wasn't using them correctly. Now, after applying the "USB3 _PRW 0x6D Skylake (instant wake)" patch, I see my power LED does not flash rapidly. When I press my windows key on the screen the device appears to come back on.

How can I tell if sleep is working properly? Battery drain seems kind of high when it appears to be in sleep mode, I'm guessing power management is not configured properly.
 

Attachments

  • debug_7599.zip
    2.3 MB · Views: 173
Please note, I actually re-enabled ACPI/SSDT/Generate/PluginType=true, per https://www.tonymacx86.com/threads/macos-native-cpu-igpu-power-management.222982/
I'm not say to disable or remove PluginType.

To get power management work, you have to notice 2 things.
  1. config.plist/ACPI/SSDT/Generate/PluginType should set "true".
  2. Set -xcpm on ur boot-arg, or using SSDT-XCPM. (not sure.)
Also the machine type may a reason, too. But I'm not sure MBP13,1 is a right choice or not.
 
Last edited:
No to both.

It looks like power management is working somewhat at least. I see 24 P States. I say somewhat, because I don't know how many P States my processor should have.

Screen Shot 2018-05-07 at 5.28.46 PM.png
According to the guide: https://www.tonymacx86.com/threads/macos-native-cpu-igpu-power-management.222982/ It shows that I only need PluginType=1 or (YES, which is supported in Clover v4307 which I have).

Screen Shot 2018-05-07 at 5.16.10 PM.png

As for sleep, I notice my system will resume sleep after a short period of time ~10 minutes, but if I leave it for several hours it does not resume. I can tell it is still asleep and powered on as the windows button at the bottom of my device has haptic feedback when I press it. It does not appear to do anything though.

These are the following DSDT patches I have:

"HPET Fix"
"SMBUS Fix"
"IRQ Fix"
"RTC Fix"
"OS Check Fix"
"Fix Mutex with non-zero SyncLevel"
"instant wake" (_PRW 0x6d patch)"
"Fix ADBG Error"

Here are my pmset assertions (pmset -g assertions):

Code:
2018-05-07 17:35:04 -0700
Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    0
   PreventSystemSleep             0
   ExternalMedia                  1
   PreventUserIdleSystemSleep     1
   NetworkClientActive            0
Listed by owning process:
   pid 52(powerd): [0x0000005500088129] 00:34:06 ExternalMedia named: "com.apple.powermanagement.externalmediamounted"
   pid 244(UserEventAgent): [0x00000841000b81ef] 00:00:18 BackgroundTask named: "com.apple.AddressBook.ScheduledSync"
    Created for PID: 683.
   pid 92(hidd): [0x0000003600098122] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle.4294968043.3"
    Timeout will fire in 600 secs Action=TimeoutActionRelease
   pid 683(AddressBookSourceSync): [0x00000841000181ee] 00:00:19 PreventUserIdleSystemSleep named: "Address Book Source Sync"
    Timeout will fire in 1781 secs Action=TimeoutActionTurnOff
Kernel Assertions: 0xc=USB,BT-HID
   id=500  level=255 0x4=USB mod=12/31/69, 4:00 PM description=com.apple.usb.externaldevice.00300000 owner=USB5537B
   id=502  level=255 0x4=USB mod=12/31/69, 4:00 PM description=com.apple.usb.externaldevice.14100000 owner=Alps Touchpad
   id=503  level=255 0x4=USB mod=12/31/69, 4:00 PM description=com.apple.usb.externaldevice.00100000 owner=USB2137B
   id=505  level=255 0x4=USB mod=12/31/69, 4:00 PM description=com.apple.usb.externaldevice.00320000 owner=USB 10/100/1000 LAN
   id=506  level=255 0x8=BT-HID mod=12/31/69, 4:00 PM description=com.apple.driver.IOBluetoothHIDDriver owner=AppleHSBluetoothDevice
   id=507  level=255 0x8=BT-HID mod=12/31/69, 4:00 PM description=com.apple.driver.IOBluetoothHIDDriver owner=AppleBluetoothHIDKeyboard
   id=508  level=255 0x4=USB mod=12/31/69, 4:00 PM description=com.apple.usb.externaldevice.00330000 owner=Ultra USB 3.0
Idle sleep preventers: IODisplayWrangler

Also, here is the output of "log show --style syslog | fgrep "Wake reason"":

Code:
log: warning: The log archive contains partial or missing metadata
log: warning: The log archive contains partial or missing metadata
2018-04-17 16:08:19.410622-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-04-20 12:29:47.359179-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-04-20 21:08:42.272889-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-04-20 22:10:38.882336-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-04-21 20:03:15.617090-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
2018-04-22 16:58:01.303143-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-04-22 17:16:24.598356-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-04-22 17:32:25.554021-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-04-22 17:46:30.416057-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-05 19:58:06.519544-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-05 20:24:42.942603-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-05 20:31:03.654352-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-05 20:44:17.769430-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-05 20:47:07.479454-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-05 20:53:52.272956-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-05 21:06:28.916674-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-05 23:23:11.192312-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-06 00:17:41.859602-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-06 00:42:58.426815-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-06 00:50:43.958231-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-06 00:57:27.784145-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-06 01:00:58.997749-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-06 01:41:54.166462-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-06 02:04:11.696551-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-06 12:43:37.215606-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-06 13:05:27.633918-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-06 14:50:39.016529-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-06 15:08:03.321481-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-06 15:11:54.801139-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-06 15:53:04.205577-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-06 16:03:34.069958-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
2018-05-06 16:08:47.012457-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
2018-05-06 16:12:31.298915-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
2018-05-06 16:15:30.141009-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
2018-05-06 16:36:46.029374-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
2018-05-06 16:46:52.379775-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
2018-05-06 18:48:06.367655-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
2018-05-06 18:52:43.389667-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
2018-05-06 18:58:32.379068-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
2018-05-06 20:37:51.346202-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
2018-05-06 21:07:37.513372-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
2018-05-06 22:25:25.414122-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
2018-05-06 22:31:20.442907-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
2018-05-06 22:48:08.756462-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
2018-05-06 22:58:16.023519-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
2018-05-06 23:15:19.860826-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Host (0x01)
2018-05-06 23:23:21.640116-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-07 00:12:07.827871-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-07 01:28:17.273067-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-07 11:39:35.683898-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-07 11:51:59.110412-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-08 16:02:08.897963-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)
2018-05-07 16:59:47.190019-0700  localhost kernel[0]: (AppleTopCaseHIDEventDriver) [HID] [ATC] AppleDeviceManagementHIDEventService::processWakeReason Wake reason: Button (0x03)

Should I be concerned about 'IODisplayWrangler' or 'AppleTopCaseHIDEventDriver'?
 

Attachments

  • debug_15930.zip
    2.3 MB · Views: 156
It looks like power management is working somewhat at least. I see 24 P States. I say somewhat, because I don't know how many P States my processor should have.

View attachment 330236

Image shows X86PlatformPlugin loaded.
So, yes... should be expected to be working.

According to the guide: https://www.tonymacx86.com/threads/macos-native-cpu-igpu-power-management.222982/ It shows that I only need PluginType=1 or (YES, which is supported in Clover v4307 which I have).
View attachment 330237

Same as laptop guide:
https://www.tonymacx86.com/threads/guide-native-power-management-for-laptops.175801/

As for sleep, I notice my system will resume sleep after a short period of time ~10 minutes, but if I leave it for several hours it does not resume.

Make sure you disabled hibernation.

These are the following DSDT patches I have:

"HPET Fix"
"SMBUS Fix"
"IRQ Fix"
"RTC Fix"
"OS Check Fix"
"Fix Mutex with non-zero SyncLevel"
"instant wake" (_PRW 0x6d patch)"
"Fix ADBG Error"

Maybe some of those are not needed (HPET, SMBUS), but otherwise it is a typical list.

Here are my pmset assertions (pmset -g assertions):

Code:
2018-05-07 17:35:04 -0700
Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    0
   PreventSystemSleep             0
   ExternalMedia                  1

External media is a problem. Eject all USB storage devices before attempting sleep.

Looks like your USB configuration is wrong... (why is SS03 marked internal [UsbConnector=255], but nothing connected?).
 
Status
Not open for further replies.
Back
Top