syscl Posted November 15, 2016 Share Posted November 15, 2016 Hola, I just got my own XPS 13 9350 with Iris 540 graphic card, and soon found out that I cannot light my lid up when resume from sleep, finally, I found out the solution. Edited 2016-12-09: Now I found out the secret is the 0A -> 0F fixed the sleep issue(no more 2 stage patches), thus refine patch Comment: Enable lid wake for 0x19260004 credit syscl/lighting/Yating Zhou Kext: AppleIntelSKLGraphicsFramebuffer Find: 0A0B0300 00070600 03000000 04000000 Replace: 0F0B0300 00070600 03000000 04000000 Through Clover config.plist: <dict> <key>Comment</key> <string>Enable lid wake for 0x19260004 credit syscl/lighting/Yating Zhou</string> <key>Disabled</key> <false/> <key>Find</key> <data> CgsDAAAHBgADAAAABAAAAA== </data> <key>Name</key> <string>AppleIntelSKLGraphicsFramebuffer</string> <key>Replace</key> <data> DwsDAAAHBgADAAAABAAAAA== </data> </dict> That's it. For 0x19260002(Iris 540/550) , applied the following patch Comment: Enable lid wake for 0x19260002 credit syscl/lighting/Yating Zhou Kext: AppleIntelSKLGraphicsFramebuffer Find: 0A130300 00000600 00000000 00000000 Replace: 0F130300 00000600 00000000 00000000 For 0x193b0005(Iris P580), applied the following patch Comment: Enable lid wake for 0x193b0005(Iris P580) credit syscl/lighting/Yating Zhou Kext: AppleIntelSKLGraphicsFramebuffer Find: 0A130300 00000600 00000000 00000000 Replace: 0F130300 00000600 00000000 00000000 //// Below contents (posted at 11/15/2016) is no more needed since I refined/removed unnecessary patches! Apply the following patches I developer in Clover to enable lid wake for Iris 540/550 Comment: Enable lid wake for 0x19260004 #1 of 2 credit syscl/lighting/Yating Zhou Kext: AppleIntelSKLGraphicsFramebuffer Find: 0A0B0300 00070600 03000000 04000000 Replace: 0F090000 00000000 00000000 00000000 and Comment: Enable lid wake for 0x19260004 #2 of 2 credit syscl/lighting/Yating Zhou Kext: AppleIntelSKLGraphicsFramebuffer Find: 50EE1A00 00000000 00EF1A00 00000000 Replace: 50EE1A00 00000000 B0EE1A00 00000000 Through Clover config.plist: <dict> <key>Comment</key> <string>Enable lid wake for 0x19260004 #1 of 2 credit syscl/lighting/Yating Zhou</string> <key>Disabled</key> <false/> <key>Find</key> <data> CgsDAAAHBgADAAAABAAAAA== </data> <key>Name</key> <string>AppleIntelSKLGraphicsFramebuffer</string> <key>Replace</key> <data> DwkAAAAAAAAAAAAAAAAAAA== </data> </dict> <dict> <key>Comment</key> <string>Enable lid wake for 0x19260004 #2 of 2 credit syscl/lighting/Yating Zhou</string> <key>Disabled</key> <false/> <key>Find</key> <data> UO4aAAAAAAAA7xoAAAAAAA== </data> <key>Name</key> <string>AppleIntelSKLGraphicsFramebuffer</string> <key>Replace</key> <data> UO4aAAAAAACw7hoAAAAAAA== </data> </dict> Set ig-platform-id = 0x1926004 GFX0 -> IGPU through DSDT hot patch Comment: GFX0 -> IGPU Find: 47465830 Replace: 49475055 Through config.plist: <dict> <key>Comment</key> <string>GFX0 -> IGPU</string> <key>Disabled</key> <false/> <key>Find</key> <data> R0ZYMA== </data> <key>Replace</key> <data> SUdQVQ== </data> </dict> Rebuild kernel cache by the following under Sierra sudo rm -rf /System/Library/Caches/com.apple.kext.caches/Startup/kernelcache sudo rm -rf /System/Library/PrelinkedKernels/prelinkedkernel sudo touch /Library/Extensions && sudo touch /System/Library/Extensions && sudo kextcache -u / Reboot to enjoy the laptop sleep syscl 4 Link to comment Share on other sites More sharing options...
vusun123 Posted November 15, 2016 Share Posted November 15, 2016 Amazing work Can you also port the patch for HD520/HD530 framebuffer ? Link to comment Share on other sites More sharing options...
syscl Posted November 16, 2016 Author Share Posted November 16, 2016 Amazing work Can you also port the patch for HD520/HD530 framebuffer ? I'll try to figure out HD530/520's issue, since I haven't had device with HD530/520, so I have to experiment. And I have too many homework this days, sorry for my late response. syscl Link to comment Share on other sites More sharing options...
x4080 Posted November 16, 2016 Share Posted November 16, 2016 Hi syscl, Is the dsdt patch different from the regular dsdt patch for GFX0 -> IGPU? If not, will I need to patch it again the clover? Since it can boot normally (but with some issues, long story ) The lid wake up patch means when we open the laptop? or just power on? What I've tried : - Using regular DSDT patch for GFX0 -> IGPU (so not using our clover patch) - Using your lid wake up patch - Change the intel id graphics to 0x1926004 - use pmset -a hibernatemode 0 (is this still needed?) Result : - @cold boot, black screen and power off after apple progress screen in the middle, (I think its shutdown but its not, seems like go into sleep mode), when I press power button, it will light up and go into login screen - After sleep, when I open the lid, it wont run, until I press power button, and it will go into login screen - The wifi dongle I use is suddenly automatically reconnect (usually i have to remove and reinsert it), dont know if this because of your lid wake up patch (havent used your usb wake up fix patch yet) Strange things : - After woke up, when I put on the power adaptor, the screen will black and dont know what to do so I just press power until shutdown - Today it crashed after woke up and wifi working, about 5 secs it just restarted on its own Any tips ? Thanks for everything Link to comment Share on other sites More sharing options...
syscl Posted November 16, 2016 Author Share Posted November 16, 2016 Hi syscl, Is the dsdt patch different from the regular dsdt patch for GFX0 -> IGPU? If not, will I need to patch it again the clover? Since it can boot normally (but with some issues, long story ) The lid wake up patch means when we open the laptop? or just power on? What I've tried : - Using regular DSDT patch for GFX0 -> IGPU (so not using our clover patch) - Using your lid wake up patch - Change the intel id graphics to 0x1926004 - use pmset -a hibernatemode 0 (is this still needed?) Result : - @cold boot, black screen and power off after apple progress screen in the middle, (I think its shutdown but its not, seems like go into sleep mode), when I press power button, it will light up and go into login screen - After sleep, when I open the lid, it wont run, until I press power button, and it will go into login screen - The wifi dongle I use is suddenly automatically reconnect (usually i have to remove and reinsert it), dont know if this because of your lid wake up patch (havent used your usb wake up fix patch yet) Strange things : - After woke up, when I put on the power adaptor, the screen will black and dont know what to do so I just press power until shutdown - Today it crashed after woke up and wifi working, about 5 secs it just restarted on its own Any tips ? Thanks for everything I do not know what specs your ops 13 9350 is, but in my case(Iris 540 graphics card), once I open the lid, screen is lighted up as a real MacBook. Pay attention, when you switch ig-platform-id, you will get mixed result, that's the reason why I pointed out you have to rebuild the kernel cache before reboot. Hibernatemode won't affect the patches I developed, but you can switch to hibernatemode = 0 to boost the wake up progress. I do not know why Skylake's wake up progress is much slower than M3800 in macOS. It always took me about 3~4s to wake the login screen up(In M3800 this progress is almost instant). Maybe due to nvme. I will look into this problem later. About restart, you have to apply HaltEnabler = Yes to fix the reboot issue. I still have copious amount of ACPI patch for XPS 13 9350 and thanks for a friend with MacBook give me all the ACPI information I want, so just wait for https://github.com/syscl/XPS9350-macOSto finish. syscl Link to comment Share on other sites More sharing options...
PMheart Posted November 17, 2016 Share Posted November 17, 2016 I do not know what specs your ops 13 9350 is, but in my case(Iris 540 graphics card), once I open the lid, screen is lighted up as a real MacBook. Pay attention, when you switch ig-platform-id, you will get mixed result, that's the reason why I pointed out you have to rebuild the kernel cache before reboot. Hibernatemode won't affect the patches I developed, but you can switch to hibernatemode = 0 to boost the wake up progress. I do not know why Skylake's wake up progress is much slower than M3800 in macOS. It always took me about 3~4s to wake the login screen up(In M3800 this progress is almost instant). Maybe due to nvme. I will look into this problem later. About restart, you have to apply HaltEnabler = Yes to fix the reboot issue. I still have copious amount of ACPI patch for XPS 13 9350 and thanks for a friend with MacBook give me all the ACPI information I want, so just wait for https://github.com/syscl/XPS9350-macOSto finish. syscl Yeah this is certainly due to NVMe. Nevertheless for more details on this sorry I don't know... I guessed that something went wrong with Pike's NVMe patch. And could get an instant wake on my New MacBook 2016 (SKL based) with HibernateMode = 0. Anyway. Log will tell. Just check what is happening when waking up. And the friend is me? LOL Link to comment Share on other sites More sharing options...
syscl Posted December 7, 2016 Author Share Posted December 7, 2016 Amazing work Can you also port the patch for HD520/HD530 framebuffer ? Which ig-platform-id do you use? I have to upload the patch for specific ig platform syscl Yeah this is certainly due to NVMe. Nevertheless for more details on this sorry I don't know... I guessed that something went wrong with Pike's NVMe patch. And could get an instant wake on my New MacBook 2016 (SKL based) with HibernateMode = 0. Anyway. Log will tell. Just check what is happening when waking up. And the friend is me? LOL NO, another friend gave me the ioreg. Yours may be in desktops pc which are thousands mile away. syscl Link to comment Share on other sites More sharing options...
PMheart Posted December 7, 2016 Share Posted December 7, 2016 Which ig-platform-id do you use? I have to upload the patch for specific ig platform syscl NO, another friend gave me the ioreg. Yours may be in desktops pc which are thousands mile away. syscl Ah. I've got it for a few days. LOL Link to comment Share on other sites More sharing options...
Drfrag Posted March 1, 2017 Share Posted March 1, 2017 Hi. I know it is an old thread, but I need some help with returning from sleep on my laptop (Dell 5557). When I open my lid, system come back from sleep with the screen turned off. I need to press a key on keyboard or press the power button again to make the screen on again. Does it has anything related to this patch? If so, could you please help me making a patch specific to my Graphic Card? Which ig-platform-id do you use? I have to upload the patch for specific ig platform syscl NO, another friend gave me the ioreg. Yours may be in desktops pc which are thousands mile away. syscl I am using ig-platform-id 0x19160000 for Intel® HD Graphics 520. Thanks. Link to comment Share on other sites More sharing options...
Slice Posted March 2, 2017 Share Posted March 2, 2017 Hi. I know it is an old thread, but I need some help with returning from sleep on my laptop (Dell 5557). When I open my lid, system come back from sleep with the screen turned off. I need to press a key on keyboard or press the power button again to make the screen on again. Does it has anything related to this patch? If so, could you please help me making a patch specific to my Graphic Card? I am using ig-platform-id 0x19160000 for Intel® HD Graphics 520. Thanks. You have to disable PowerNap. Link to comment Share on other sites More sharing options...
KNNSpeed Posted May 31, 2017 Share Posted May 31, 2017 Hi syscl, I'm trying to port your patch to platform id 0x191b0000, but one thing I can't figure out is how you determined 0x0A needs to become 0x0F. It looks like for 0x191b0000 the corresponding value is already 0x0F (0F110000 while for your platform it's 0A0B0300), however when I open the lid I still must press a button on the keyboard in order to bring up the login screen. Could you provide any insight? I'm talking about the same thing Drfrag mentioned above. Also, Slice, disabling Power Nap does not solve that for me. Link to comment Share on other sites More sharing options...
syscl Posted June 11, 2017 Author Share Posted June 11, 2017 Hi syscl, I'm trying to port your patch to platform id 0x191b0000, but one thing I can't figure out is how you determined 0x0A needs to become 0x0F. It looks like for 0x191b0000 the corresponding value is already 0x0F (0F110000 while for your platform it's 0A0B0300), however when I open the lid I still must press a button on the keyboard in order to bring up the login screen. Could you provide any insight? I'm talking about the same thing Drfrag mentioned above. Also, Slice, disabling Power Nap does not solve that for me. Hi, please use boot argument: darkwake=0 to solve this "issue". Report here. syscl 1 Link to comment Share on other sites More sharing options...
KNNSpeed Posted June 11, 2017 Share Posted June 11, 2017 Darkwake=1 wound up doing the trick. From https://opensource.apple.com/source/xnu/xnu-3789.51.2/iokit/Kernel/IOPMrootDomain.cpp.auto.html // gDarkWakeFlags enum { kDarkWakeFlagHIDTickleEarly = 0x01, // hid tickle before gfx suppression kDarkWakeFlagHIDTickleLate = 0x02, // hid tickle after gfx suppression kDarkWakeFlagHIDTickleNone = 0x03, // hid tickle is not posted kDarkWakeFlagHIDTickleMask = 0x03, kDarkWakeFlagAlarmIsDark = 0x0100, kDarkWakeFlagGraphicsPowerState1 = 0x0200, kDarkWakeFlagAudioNotSuppressed = 0x0400 }; Thanks for responding! Link to comment Share on other sites More sharing options...
thesuffering Posted June 14, 2019 Share Posted June 14, 2019 i know its an old thread, but did you ever fix HD520? I cant get lid wake to work for the life of me. Link to comment Share on other sites More sharing options...
Recommended Posts