Jump to content
Welcome to InsanelyMac Forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Allan

      Forum Rules   04/13/2018

      Hello folks! As some things are being fixed, we'll keep you updated. Per hour the Forum Rules don't have a dedicated "Tab", so here is the place that we have our Rules back. New Users Lounge > [READ] - InsanelyMac Forum Rules - The InsanelyMac Staff Team. 
VampireHunter_D

[Help] Surface Pro Fixing Power Management For CPU / GPU

8 posts in this topic

Recommended Posts

    I am currently trying to get display sleep and hardware sleep to work on the Surface Pro. From my searches I am not sure anyone has resolved this issue yet. I am a bit more focused on actually getting the display to sleep (or even brightness control) over hardware sleep since I feel that battery life is of less concern that the life of the display unit.

 

    The farthest I can get at this point is that when the display should sleep, the image currently on the screen freezes until you click to wake the display, and when you put the hardware to sleep it appears to sleep but never resumes. 

 

    The configuration I am using is a UEFI boot using Clover r1928, Mac OS ML 10.8.4. I used ssdtprgen.sh to extract my SSDT.aml which is in my EFI/ACPI/patched. Attached you will find my config.plist and a few DSDT files.

 

DSDT.aml.nomod is the default DSDT extracted from the hardware with no modifications. 

 

DSDT.aml.patched is the patched DSDT I created.

 

DSDT.aml.ifire is a patched DSDT I found on the forum here from iFire. 

 

   Using my patched version or iFire's version I get the same results with the display not sleeping and the device never resuming on full sleep. My config.plist has the smbios set to MacBookPro9,2, however I have tried MacBookAir5,1 which matches the processor in the Surface Pro, and have also applied no SMBios data to Clover which auto detects the system as MacBook5,2.

 

    So if anyone has any suggestions or sees something I might be missing please let me know. At this point I just feel like I am going in circles and not making any progress. 

 

    Thanks for any help and if you need any other information please let me know. 

SurfaceProCloverDSDT.zip

Share this post


Link to post
Share on other sites

Did you try darkwake=0 or darkwake=10 bootflags for wake from full sleep? Not sure how to add either of them to clover args though.

 

By the way, did you manage to get the touch capabilities to work under OSX?

Share this post


Link to post
Share on other sites

@theconnactic

 

I will try passing the darkwake options into my boot args a little later and report back. As for touch capabilities the pen seems to work OOTB with no extra modifications needed. I am trying to make a kext for touch using a usb override so it can handle the position that was touched (probably will end up being 1 point for now), however the display not blanking is slowing me up because I have to shut down between sessions I am working on this, because I do not want an image stuck on my screen for an extended period with brightness set to max. 

Share this post


Link to post
Share on other sites

There was no really noticeable change using darkwake=0 or darkwake=10. When using 0 the computer did recognize it was improperly shut down so that might be something. Of note when the display does not go blank the console logs out

 

handle_will_sleep_auth_and_shield_windows: no lock state data

 

and

 

ERROR | -[LWScreenLock(Private) screenIsLockedTimeExpired:] | No lock state found, use built in check

 

I am poking around to see if that leads anywhere, but I figured I would mention it if it is important.

Share this post


Link to post
Share on other sites

The surface does have UEFI. However sleep is not shutting it down cold. It acts like it suspends and does not awake. After sleep you have to hold the power for 10-12 seconds and then release, then tap to power back on. 

 

I made some more tests by modifying my plist and created a new DSDT, and I am now able to boot without using graphics injection. I can not fully decide if this is progression or regression. Attached you will find the modified plist with a new modified DSDT.aml by myself and iFire's DSDT.aml since both of these DSDTs will boot without injection. I think this might possibly be closer to the correct way to boot the device, because the colors seem more natural and the screen is not so bright that it feels like your eyeballs are burning out from inside your skull.  However when booting this way on display sleep or system sleep the screen turns bright gray and then immediately responds via keyboard event. 

Share this post


Link to post
Share on other sites

What revision of Clover do you use? Did you try updating Clover to the latest version?

 

Furthermore, when you wake the computer and check the Console log (Applications/Utilities/Console.app) does it tell the reason for wake? Did you try to run the command pmset -g Assertions in the terminal to see if there's something preventing proper sleep? I recently experienced something near the issues you have when i installed OSX on a laptop for which i had to apply Framebuffer patches for the Intel HD (in this case, first-generation Intel HD) and had also to patch AppleIntelCPUPowerManagement to get rid of NullCPUPowerManagement. Did you patch any of them, or injected anything for them in the DSDT?

 

All the best!

Share this post


Link to post
Share on other sites

@theconnactic

Which frame buffer patches did you have to apply? I have managed to get PM working by tracking the issue down to graphics injector in clover. With clover gfx injection enabled no sleep, display blank, or brightness slider. If I disable it and inject the ig-platform-id with DSDT or string injection etc. everything works, but the display is distorted in a way such that it appears grainy, hazy, or very washed out. Almost like a row pixels is being dropped every other line. I also have DualLink being injected in my DSDT as well.

 

I think the problem has to do with appleintelframebuffercapri.kext , but I am not finding a lot of useful information to fix this issue. I have found a lot of information on patching appleintelframebuffercapri.kext to fix the ports for the different platform-ids and some of that is relevant in my case to enable to internal display using id 3 (01660003). The only ids that seem to work for me are 01660003 (with port patch) and 01660004. I will keep poking around but if anyone has any suggestions please share.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.



×