-
Notifications
You must be signed in to change notification settings - Fork 3
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
Hibernation results in instant wake if Surface Type Cover is connected #1
Comments
@balopez83 I saw you were working on Surface stuff as well, any ideas here? |
@lazd Judging by the date of last update to this EFI, I suspect it is using an old version of VoodooI2C that simply needs to be updated. I have a version of the VoodooI2C.kext and VoodooI2CHID.kext that is patched to support the Surface Type Cover natively that can be pulled from my Surface Pro 3 repository here and this should resolve this issue. The vanilla release of VoodooI2C will also work and has now been patched however you won't have full support touch screen support or TypeCover support. Not sure if the touch screen is enabled with this EFI but if you use the latest version of BigSurface.kext instead of VoodooI2C.kext (removing all kexts and patches indicated on that github page) you will likely gain touch support as well. The latest version of BigSurface.kext has also implemented my patches to resolve the reboot issue caused by kernel panics. Hope this helps but if not just send me another message and I can look into this deeper.. |
@lazd One other thing; I have actually never had full sleep or hibernation support working on the Surface devices however I may test that again now after you issue here. The only thing that I have gotten working is more of an high power sleep. I don't think I have ever tested this without the Type Cover connected and so while I hope hibernation has been resolved with the latest patches it might actually shed some light on the real issue and why I never cracked hibernation. Please test either the latest BigSurface or my patched kext and see if it resolves your issue with hibernation and let me know. I have some things going on personally that will keep me from looking into this for awhile but depending on what you report back I will take a look. |
hey @balopez83! I pinged you on Gitter earlier, you still use it? Yes, touch is enabled and I'm running the latest main branch of VoodooI2C, plus some patches I recently submitted that fix double, right click, and phantom touches (see VoodooI2C/VoodooI2CHID#69). I do have the Type Cover trackpad patch from this PR VoodooI2C/VoodooI2CHID#48 pulled into the build I'm using, so I'm good there. My touchscreen works perfectly (except no pen support), and my TypeCover + trackpad work great (all buttons work, multitouch, etc). I've removed VoodooI2C, ran older version of it, etc, and it doesn't prevent this issue -- the only way to stop it is to unplug the type cover! Let me try Hardwre
Working
Partially working
Not working
|
@balopez83 I gave your I also tried covering each one of the pins individually on the Type Cover, and there was only one that I could cover and still have the Type Cover work, but that didn't help sleep. I've also tried creating scripts that run on sleep and wake with sleepwatcher, and in those scripts I've tried unloading kexts on sleep:
I was going to try to use uhubctl in conjunction with sleepwatcher to disable USB ports on sleep, but it doesn't recognize any of the inbuilt USB devices (only hubs that I connect externally), so I can't use that to power down the keyboard on sleep. Finally, I tried editing my |
Also, it's worth noting that Successful hibernate with Type Cover disconnected (wake with power button)
Hibernate + instant wake with Type Cover connected
That seems a little strange... I tried setting My guess is that the Type Cover is doing something funky as it's being powered down, because I see its keyboard backlight on for about 20 seconds as the machine is going into hibernation. Then, it shuts off for a few seconds, then comes back on for a few seconds... A few seconds later, I see the Surface logo as the machine wakes up. |
Well this ended up being way easier than I made it. I applied the GPRW/UPRW/LANC Instant Wake Patch and it hibernates without instant wake and wakes up from hibernation perfectly. I had tried this before, but had only added the SSDT, I hadn't applied to patch! The reason I reported it was working in Big Sur was because the Mystery solved! |
@lazd Sorry it took so long to get back to you. I'm glad you figured it out. I did assume it had to do with the way i2c interacts over USB. It seems notoriously problematic on Surface devices. I'll look into that patch as well as it might be the fix to resolve sleep on other Surface devices. |
No worries, thanks @balopez83! Now I just have to solve HDMI/DisplayPort over Type-C, Stylus, device power button for sleep, and HiDPI resolutions when rotated and it'll be good to go! You should get a Surface Go 2, it's a cute little machine and seems like a bit more of it is working under macOS than the larger Surfaces! |
@lazd maybe someday but for now I prob won't be able to help too much. I do have a question. Does your Surface Go 2 have S4 sleep in your DSDT? I think on Surface devices it's labeled a little differently but the Sx sleep options should be there. I ask cause the older Surface devices don't have it which I think prevents Hibernation from working however I could be wrong. If you don't have it then perhaps I am still missing something. |
@balopez83 yep it's definitely mentioned in there, you can peep the DSDT here. Hibernation has been working pretty decently since this change, though I have had a couple random KPs, the most recent one seemingly due to |
Any chance you can send me your config and acpi files for the go? I got the Surface pro 3 to hibernate properly finally but the Surface pro 4 and Book won't and I can't figure it out. The DSDT of the go is very similar and so don't quite understand why it seems to fail. |
@balopez83 yep, sent on Gitter! |
Any chance whoever has the surface go 2 could show me an output of pmset -g? I have one and i have been playing with the various options to get it to hibernate but it just wont. Ofcourse sleep does the surface logo of death sort of thing. Im using the EFI repository in this project here but i upgraded what was available on opencore 0.94. The machine is running fine, a little battery hungry (power mgmt doenst seem to slow the CPU down maybe) but touchscreen and pen and all work just fine. I just cant get any form of sleep or hibernate to disk to work. The screen goes blank and eventually it just reboots. Here's my output of pmset -g. Oh and for some reason the power button my surface go 2 does nothing.
Thank you! |
@u8915055 See @lazd comment above regarding GPRW Patching It needs to be added to your ACPI folder and your config.plist. Once done and once you set your PMSET to 25 it should work properly. I believe it's two total SSDT files and 3 DSDT patches to get it working. The above fix worked on quite a few Surface devices including the Go |
@u8915055 Sure, here ya go:
Here are my shell functions I wrote while testing sleep, use
|
@u8915055 You said you have pen working? I could never get my pen working at all! Any tricks? Note that I did author some new code over at VoodooI2C to make the touchscreen work nicer with fingers, that's worth checking out. They should drop in VoodooI2C 2.9, which will release later this year. I attached the kexts for you to give it a whirl -- can you please test and confirm if your pen works with the next kexts?? |
Hey there @lazd , ya i will admit im very new to this.. so im still working away on understanding the ACPI stuff and what i would need to do following your instructions to get hibernate to work properly. However i used this repository to build my EFI for my Surface Go 2 and then most recently upgraded to opencore 0.94 by just copying over the relevant drivers and such and its been working. Now i have to admit i tried the pen after the 0.94 upgrade and im not sure it was or wasnt working before that as i couldnt find my pen :). Im more than happy to share whatever details may help you with the pen. Just tell me what you need.. The pen works really well including the button for right click. On that note. Again learning the whole DSDT SSDT ACPI thing.. and slowly figuring it out. But to make the patches you mentioned above to get hibernate going, sounds like i need to include an EFI tool to show me the current DSDT of the machine and then using that info i would copy over one or more of those updated GPRW UPRW LANC files depending on what i find on my machine, correct? Then i also have to make the patches in the config.plist to go with those? Thanks for your help. |
Oh, and i just saw the voodooI2C-SurfaceTouch file you included. Ill give that a try. I will say that when i took the stock repository here and built my EFI, and then upgraded it to 0.94 opencore.. i did not upgrade any drivers that were not included in the opencore bundle. So i didnt upgrade VoodooI2c yet.. its still runnign the version on this repository. It says its version 2.6.5. The finger touch works, but ya as is isnt very useful.. big finger, little icons.. :) I will give that a try.. im really getting into this now so ill have more results. |
I'll go ahead and close this issue since it's solved! |
I know sleep doesn't work (wakes up to a Surface logo that never goes away), but I did find that hibernate works great with one caveat: if you have the Surface Type Cover connected, it instantly wakes up.
sudo pmset -a hibernatemode 25;
pmset -g log | grep -e "Sleep.*due to" -e "Wake.*due to"
and observe:Then, disconnect the type cover and choose Apple Menu -> Sleep again. No instant wake! If you then press the power button, it wakes right back up and comes alive in 14-16 seconds.
As stated above, I was getting some
GLAN XDCI
wakes before removing all Bluetooth kexts, as well as a couple random kernel panics, but that's for another issue once I figure this out...The text was updated successfully, but these errors were encountered: