Contribute
Register

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

Status
Not open for further replies.
You should verify the data has not changed since that was written...
You need to always look at the framebuffer kext binary in a hex editor to make sure Apple hasn't changed something and your assumptions are still valid.

It looks like it hasn't changed. When I open up AppleIntelSKLGraphicsFramebuffer.kext/Contents/MacOS/AppleIntelSKLGraphicsFramebuffer in iHex I see:

Screen Shot 2018-05-19 at 10.21.16 PM.png
 
It looks like it hasn't changed. When I open up AppleIntelSKLGraphicsFramebuffer.kext/Contents/MacOS/AppleIntelSKLGraphicsFramebuffer in iHex I see:

View attachment 331931

Then the patch will apply to that ig-platform-id, assuming you enable it correctly and the kext is in kernel cache.
 
Then the patch will apply to that ig-platform-id, assuming you enable it correctly and the kext is in kernel cache.

I was able to successfully apply the patch. I ended up deterring a few things though:

- my device only has DVMT pre alloc set to 64MB
- I was not running 'sudo kextcache -i /' before rebooting, after applying the patch

A picture of DVMT pre alloc set to only 64MB. I may be mistaken.. but I could have sworn this value read "Video Memory=128 MB" at one time:

20180520_204213.jpg

This is what worked for me with DVMT set to 64MB:

Comment: 0x19160000, 64MB BIOS, 45MB framebuffer, 10MB cursor bytes (credit RehabMan)
Name: com.apple.driver.AppleIntelSKLGraphicsFramebuffer
Find: 01030303 00002002 00005001
Replace: 01030303 0000A002 0000A000

EDIT:

It looks like 4k 30fps video works well now. Unfortunately 4k 60fps video stutters still. I am understanding that this is because I have not specified enough framebuffer memory. How much framebuffer vs cursor bytes should I have? Is it a trial and error thing?
 
Last edited:
I was able to successfully apply the patch. I ended up deterring a few things though:

- my device only has DVMT pre alloc set to 64MB
- I was not running 'sudo kextcache -i /' before rebooting, after applying the patch

A picture of DVMT pre alloc set to only 64MB. I may be mistaken.. but I could have sworn this value read "Video Memory=128 MB" at one time:

View attachment 332106

This is what worked for me with DVMT set to 64MB:

Comment: 0x19160000, 64MB BIOS, 45MB framebuffer, 10MB cursor bytes (credit RehabMan)
Name: com.apple.driver.AppleIntelSKLGraphicsFramebuffer
Find: 01030303 00002002 00005001
Replace: 01030303 0000A002 0000A000

EDIT:

It looks like 4k 30fps video works well now. Unfortunately 4k 60fps video stutters still. I am understanding that this is because I have not specified enough framebuffer memory. How much framebuffer vs cursor bytes should I have? Is it a trial and error thing?

Experiment with larger framebuffer allocation, smaller cursor bytes (still within 64mb).
And even: You might try increasing the framebuffer allocation, and setting the cursor bytes amount to zero.
 
I still can't seem to get sleep working on my device. Below I have described the level of detail I have tried each thing you mentioned.

Your USB configuration looks really wrong... (no USB3 ports?).. .power properties not implemented.

Resolved per: https://www.tonymacx86.com/threads/...ectall-working-on-dell-xps-9250.251812/page-3

You should try other SMBIOS (for example, MacBookPro11,1).
And other ig-platform-id values (for example, 0x191b0000).

Also, try other values for byte 20 in EDID override.

I have tried a bunch of different combinations of all three and they all seem to perform practically the same. Maybe my device takes a little longer to boot every so often, but that's about all.

The ig-platform-id's that my system boots with seem to be (as well as a few haswell ones I can't remember):

0x191e0000
0x191b0000
0x19160000
0x19260000
0x19270000

The three EDID overrides I have tried are:

Code:
00FFFFFFFFFFFF004D103D140000000022190104B51C10780EDF50A35435B5260F5054000000010101010101010101010101010101014DD000A0F0703E8030203500149C10000018000000100000000000000000000000000000000000FE0048474D4A36804C513132354431000000000002410328001200000B010A20200016

00FFFFFFFFFFFF004D103D140000000022190104951C10780EDF50A35435B5260F5054000000010101010101010101010101010101014DD000A0F0703E8030203500149C10000018000000100000000000000000000000000000000000FE0048474D4A36804C513132354431000000000002410328001200000B010A20200036

00FFFFFFFFFFFF004D103D140000000022190104201C10780EDF50A35435B5260F5054000000010101010101010101010101010101014DD000A0F0703E8030203500149C10000018000000100000000000000000000000000000000000FE0048474D4A36804C513132354431000000000002410328001200000B010A202000AB

May also be DVMT-prealloc related. You have DVMT-prealloc set to 128mb? If so, you should patch the framebuffer to match (eg. larger framebuffer memory/cursor bytes to fit within the DVMT-prealloc setting).

I think I have this working well now with:

Comment: 0x19160000, 64MB BIOS, 57MB framebuffer, 5MB cursor bytes (credit RehabMan)
Name: com.apple.driver.AppleIntelSKLGraphicsFramebuffer
Find: 01030303 00002002 00005001
Replace: 01030303 00006503 00004C00

And you might try OsxAptioFixDrv-64.efi + EmuVariableUefi-64.efi + "RC scripts" instead of AptioMemoryFix.efi.

Unfortunately, this hasn't made a difference either. I am using OsxAptioFixDrv-64.efi + EmuVariableUefi-64.efi + "RC scripts" instead and my device appears to boot the same.

One thing I have noticed. The power LED appears to flash maybe twice a second sometimes when I boot. Other times it is off. Not sure if there is any significance of this.

I have also tried disabling Thunderbolt, SD Card reader, and cameras, but still no change.

Another point worth mentioning perhaps. It appears my system has never enter/exited sleep properly. I see this by executing the following commands:

Code:
$ sysctl -a |grep sleeptime
kern.sleeptime: { sec = 0, usec = 0 } Wed Dec 31 16:00:00 1969

Code:
$ sysctl -a |grep waketime
kern.waketime: { sec = 0, usec = 0 } Wed Dec 31 16:00:00 1969
 

Attachments

  • debug_20877.zip
    2.1 MB · Views: 65
I still can't seem to get sleep working on my device. Below I have described the level of detail I have tried each thing you mentioned.



Resolved per: https://www.tonymacx86.com/threads/...ectall-working-on-dell-xps-9250.251812/page-3



I have tried a bunch of different combinations of all three and they all seem to perform practically the same. Maybe my device takes a little longer to boot every so often, but that's about all.

The ig-platform-id's that my system boots with seem to be (as well as a few haswell ones I can't remember):

0x191e0000
0x191b0000
0x19160000
0x19260000
0x19270000

The three EDID overrides I have tried are:

Code:
00FFFFFFFFFFFF004D103D140000000022190104B51C10780EDF50A35435B5260F5054000000010101010101010101010101010101014DD000A0F0703E8030203500149C10000018000000100000000000000000000000000000000000FE0048474D4A36804C513132354431000000000002410328001200000B010A20200016

00FFFFFFFFFFFF004D103D140000000022190104951C10780EDF50A35435B5260F5054000000010101010101010101010101010101014DD000A0F0703E8030203500149C10000018000000100000000000000000000000000000000000FE0048474D4A36804C513132354431000000000002410328001200000B010A20200036

00FFFFFFFFFFFF004D103D140000000022190104201C10780EDF50A35435B5260F5054000000010101010101010101010101010101014DD000A0F0703E8030203500149C10000018000000100000000000000000000000000000000000FE0048474D4A36804C513132354431000000000002410328001200000B010A202000AB



I think I have this working well now with:

Comment: 0x19160000, 64MB BIOS, 57MB framebuffer, 5MB cursor bytes (credit RehabMan)
Name: com.apple.driver.AppleIntelSKLGraphicsFramebuffer
Find: 01030303 00002002 00005001
Replace: 01030303 00006503 00004C00



Unfortunately, this hasn't made a difference either. I am using OsxAptioFixDrv-64.efi + EmuVariableUefi-64.efi + "RC scripts" instead and my device appears to boot the same.

One thing I have noticed. The power LED appears to flash maybe twice a second sometimes when I boot. Other times it is off. Not sure if there is any significance of this.

I have also tried disabling Thunderbolt, SD Card reader, and cameras, but still no change.

Another point worth mentioning perhaps. It appears my system has never enter/exited sleep properly. I see this by executing the following commands:

Code:
$ sysctl -a |grep sleeptime
kern.sleeptime: { sec = 0, usec = 0 } Wed Dec 31 16:00:00 1969

Code:
$ sysctl -a |grep waketime
kern.waketime: { sec = 0, usec = 0 } Wed Dec 31 16:00:00 1969

You should check if it is an "instant wake" situation (eg. laptop never really goes to sleep).
You didn't really provide any details on the specifics of your sleep circumstances.

Keep in mind any change to a BIOS option requires re-extract/re-patch ACPI.
 
You should check if it is an "instant wake" situation (eg. laptop never really goes to sleep).
You didn't really provide any details on the specifics of your sleep circumstances.

Keep in mind any change to a BIOS option requires re-extract/re-patch ACPI.

To provide some more context, when the device is entering sleep mode the screen turns off and visually the device appears to be entering sleep. After I wait several minutes to an hour, I cannot get the device to resume by pressing the power button or the windows button on the bottom of the screen. It appears if I attach the keyboard and trackpad dock, the power LED will light up for about a second and then shut off again. This does not allow the device to come out of sleep or act any differently at this point. The only way I can use my device again is by holding the power button long enough to hard power down the device.

sysctl seems to show that the device never went into sleep--or I suppose never came out of it to update this command

Code:
$ sysctl -a |grep sleeptime
kern.sleeptime: { sec = 0, usec = 0 } Wed Dec 31 16:00:00 1969

I have re-extracted my ACPI and patched it for the following:

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

But my device doesn't seem to be operating any differently. It still does not resume from sleep or enter it--either of which I cannot determine as the logs do not present much information.

With 'pmset -g log|grep -A 20 -e "Entering Sleep state due to"' I see:

Code:
2018-05-23 14:02:06 -0700 Sleep                   Entering Sleep state due to 'Idle Sleep':TCPKeepAlive=inactive Using AC (Charge:100%)        
2018-05-23 14:02:09 -0700 PM Client Acks          Delays to Sleep notifications: [com.apple.apsd is slow(2908 ms)]        
Sleep/Wakes since boot at 2018-05-23 14:00:24 -0700 :0   Dark Wake Count in this sleep cycle:0

And in system.log

Code:
May 23 14:01:45 Peters-MBP com.apple.xpc.launchd[1] (com.apple.mdworker.single.06000000-0000-0000-0000-000000000000): Service only ran for 1 seconds. Pushing respawn out by 9 seconds.
May 23 14:01:45 Peters-MBP com.apple.xpc.launchd[1] (com.apple.mdworker.single.08000000-0000-0000-0000-000000000000): Service only ran for 1 seconds. Pushing respawn out by 9 seconds.
May 23 14:01:46 Peters-MBP nsurlsessiond[334]: DEPRECATED USE in libdispatch client: Setting timer interval to 0 requests a 1ns timer, did you mean FOREVER (a one-shot timer)?
May 23 14:01:55 Peters-MBP com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
May 23 14:08:19 localhost bootlog[0]: BOOT_TIME 1527109699 0

Could updating my BIOS to the latest version help? It is out of date by a year. Dell seems to frequently makes updates to the BIOS, as they make an enterprise 2-in-1 that shares similar specs to my device.
 

Attachments

  • debug_1503.zip
    2.1 MB · Views: 71
Last edited:
To provide some more context, when the device is entering sleep mode the screen turns off and visually the device appears to be entering sleep. After I wait several minutes to an hour, I cannot get the device to resume by pressing the power button or the windows button on the bottom of the screen. It appears if I attach the keyboard and trackpad dock, the power LED will light up for about a second and then shut off again. This does not allow the device to come out of sleep or act any differently at this point. The only way I can use my device again is by holding the power button long enough to hard power down the device.

sysctl seems to show that the device never went into sleep--or I suppose never came out of it to update this command

Code:
$ sysctl -a |grep sleeptime
kern.sleeptime: { sec = 0, usec = 0 } Wed Dec 31 16:00:00 1969

I have re-extracted my ACPI and patched it for the following:

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

But my device doesn't seem to be operating any differently. It still does not resume from sleep or enter it--either of which I cannot determine as the logs do not present much information.

With 'pmset -g log|grep -A 20 -e "Entering Sleep state due to"' I see:

Code:
2018-05-23 14:02:06 -0700 Sleep                   Entering Sleep state due to 'Idle Sleep':TCPKeepAlive=inactive Using AC (Charge:100%)      
2018-05-23 14:02:09 -0700 PM Client Acks          Delays to Sleep notifications: [com.apple.apsd is slow(2908 ms)]      
Sleep/Wakes since boot at 2018-05-23 14:00:24 -0700 :0   Dark Wake Count in this sleep cycle:0

And in system.log

Code:
May 23 14:01:45 Peters-MBP com.apple.xpc.launchd[1] (com.apple.mdworker.single.06000000-0000-0000-0000-000000000000): Service only ran for 1 seconds. Pushing respawn out by 9 seconds.
May 23 14:01:45 Peters-MBP com.apple.xpc.launchd[1] (com.apple.mdworker.single.08000000-0000-0000-0000-000000000000): Service only ran for 1 seconds. Pushing respawn out by 9 seconds.
May 23 14:01:46 Peters-MBP nsurlsessiond[334]: DEPRECATED USE in libdispatch client: Setting timer interval to 0 requests a 1ns timer, did you mean FOREVER (a one-shot timer)?
May 23 14:01:55 Peters-MBP com.apple.xpc.launchd[1] (com.apple.imfoundation.IMRemoteURLConnectionAgent): Unknown key for integer: _DirtyJetsamMemoryLimit
May 23 14:08:19 localhost bootlog[0]: BOOT_TIME 1527109699 0

Could updating my BIOS to the latest version help? It is out of date by a year. Dell seems to frequently makes updates to the BIOS, as they make an enterprise 2-in-1 that shares similar specs to my device.

Try setting DVMT-prealloc to 64MB (or larger), then remove 32MB DVMT patch.
Don't forget to re-extract/re-patch ACPI after the DVMT change.
 
Try setting DVMT-prealloc to 64MB (or larger), then remove 32MB DVMT patch.
Don't forget to re-extract/re-patch ACPI after the DVMT change.

I don't have a BIOS option to change my DVMT-prealloc. I, also, have modified the 32MB DVMT patch to address the 64MB that my DVMT-prealloc is already set to.

Comment: 0x19160000, 64MB BIOS, 57MB framebuffer, 5MB cursor bytes (credit RehabMan)
Name: com.apple.driver.AppleIntelSKLGraphicsFramebuffer
Find: 01030303 00002002 00005001
Replace: 01030303 00006503 00004C00

Still doesn't seem to make any difference for allowing my device to enter and exit sleep properly though.
 

Attachments

  • debug_15819.zip
    2.3 MB · Views: 81
Status
Not open for further replies.
Back
Top