-
Notifications
You must be signed in to change notification settings - Fork 4
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
Got SD Card Working on SP4 #2
Comments
EDIT: Apparently, by replacing your "ACPIKeyboard.kext" with my custom one, even keyboard "hot swapping" seems to be working flawelessly now. Again, let me know if you want these files, so I can upload them to you here. |
EDIT 2: Dual Boot DOES work with Windows, provided you use "refindplus". I've never had any luck booting Windows using OpenCore, so I just chainload OC silently and refindplus is my main launcher. Let me know if I can chime in on that for you as well. Cheers. |
Hi @billabongbruno Yes; please send your files and I will take a look at them to see what the differences are and integrate them. Can you list what you changed in the kexts that made the SD card and hot swapping work? I am currently working on an updated EFI that allows for the hot swapping and resume of keyboard use after sleep though haven't yet isolated why it seems to be fixed yet. I haven't uploaded the revisions yet since it needs to be tested a bit more to ensure its fully stable. I have used refind before and it is pretty good software though didn't know there was a new refindplus. I will have to look into it. As for OC dual booting. I am actually pretty confident what is preventing Windows from booting though I am not in a hurry to fix it before resolving the last few bugs in the EFI. Basically, the issues with OC and Windows are almost always caused by the SSDT-XOSI.aml and associated patches. With the SP4/Book there are significantly more patches that are likely also causing ACPI problems for Windows. When I have some time I will add the needed fixes though it usually complicates the aml files and makes it harder to debug issues. |
Hey there, @balopez83 , once again. Hopefully my Kexts help you debug the Keyboard issue. Yeah, refindplus is a great piece of software. Also regarding that, as well as the extra files I'm including... I have tried everything to fix this, apart from fiddling with XOSI. Regarding my changes to USBMap, RealTekCardReaderFriend and ACPIKeyboard, I did them about 2 years ago and sadly I didn't keep track of what I changed regarding the original files then. I do remember that getting the SD Card to work was a bit of a pain, but I edited the PID and VID and eventually got it to work. Regarding ACPIKeyboard I remember that I set something like IOACPIFamily rather than whatever it was. USBMap was just set a long time ago. I have had very little time to debug things, as work is crazy right now. I hope I can help in any way and I am volunteering to test out anything you want. Just to conclude and so you can keep track, here is what I include in the .zip that I am attaching: 1 - ACPIKeyboard.kext ; RealteakCardReaderFriend.kext ; USBMap.kext --> In order to try and fix the SD Card issue, as well as the Keyboard hot swapping issue; 2 - My SSDT-GPI0.aml and SSDT-XOSI.aml so you can compare them to yours and see if there is anything of help to you; 3 - A copy of the error message that MacOS produced after trying (and failing) to boot WITHOUT Verbose. Best regards, |
EDIT 1: I don't know if you want to try another approach or not, but I can share my old EFI folder, which had everything worked flawlessly, apart from the trackpad not being recognized as one after: 1 - Disabling SSDT-ALS0.aml; It might be a different approach to your work, seeing as there is only one thing to fix, but I don't want to overstep here. Let me know if you want that. Best regards, |
This is my current EFI that appears to have the ability to hot plug the keyboard and will reactivate the keyboard after closing and going to sleep. It has verbose off and is working for me though I also am not entirely sure why it works or doesn't though I suspect it has to do with the UEFI>Output section of the config.plist where you choose the "text renderer", console mode, and resolution. I have noticed that in some situations the keyboard may still not be detected when hot plugged but removing and reattaching again seems to make it work. I believe the keyboard issue is related to the USB port power settings and perhaps a need for macOS to need a few extra seconds to detect it. In most cases the keyboard comes alive within 5 seconds of reattaching. The biggest thing I have noticed with the remaining issues are related to ACPI. When using a fully edited DSDT everything works flawless but when using SSDT's only and limited renames problems crop up. With OC SSDT's only are the preferred method and is the only way to get Windows support with OC. I haven't yet compared your files with mine but will do that now. If you have time though go ahead and test the EFI attached here and let me know if it works for you and especially if the keyboard hot plugging works. As for the SD card, your comment about the PID/VID gave me an idea. I think I can add either a device rename to match the stock Realtek card identified in the regular Realtek card kext. This way the kext can be updated without needing to edit every time. I will look into it but worse case it might just make sense to integrate your modded one and roll from there. Thanks for the assist with this. I know there are quite a few Surface Pro 4 projects out there but wanted to create something that brought everything together and included touch support. Next big thing I want to fix is true deep sleep support. I know it should be possible but need to figure out what the missing code is so it can be supported. Had another computer that literally was missing S3 and S4 code in the DSDT and simply adding the correct code as an SSDT fixed sleep. Hopefully its something really simple like that though I am sure its more complicated. The Surface DSDT is kinda a mess so it may be awhile. If you have any ideas there please let me know. If you want to send your previous EFI as well I am happy to take a look and compare to see what may be missing. Could you clarify when you mentioned that everything was working except the trackpad? Did you have the touch support too? Did you use a DSDT or just SSDT's? [EDIT] This also includes support for UEFI secure boot. You must add the key included in the EFI folder. Turning on UEFI secure boot will force the key installation process. [EDIT 2] Make sure you Cold Boot the surface after swapping to the linked EFI. If you don't you will most certainly have things not working. If battery indication or anything else isn't working even after cold booting then do the following: Restart, then at the OC boot selector press the space bar and "CleanNVRAM"; once complete, click "reset device" and let it reboot. It will now forget which boot option is default but should boot to macOS and everything should be working. If you boot this EFI and it boot loops at the Apple logo as you experienced before; press and hold the volume down and power button until the computer forces a shutdown and then try turning the computer on again. With any luck it will boot. [EDIT 3] This EFI won't have anything but the model identifier in the config.plist. Make sure to add your own serial information or generate random ones before booting with it or that could cause boot issues. |
EFI_SP4_OC_0.8.3_billabongruno.zip Hey there, again. I see your EFI.zip. Regarding the verbose boot, I see where you're getting at, but I seem to recall doing a quick compare and having those arguments in line with yours (in my old EFI), but nonetheless, I may be wrong and thus, I will be trying your EFI now. Regarding the hit-and-miss keyboard hot swapping, to be fair, I sometimes have issues with it even with Windows, Kali, Ubuntu or even ChromeOS (I use all of these and MacOS as well through the use of refindplus), so if that were to happen to me under MacOS, I would most likely just brush it off and try again. It seems to be iffy, regardless of the OS. Cleaning the contacts with IPA both on the keyboard itself and on the Surface seemed to help with this. I am glad that all of the mambo-jambo that I wrote you were able to come up with a possible solution / enhancement. You are most welcome. I also enjoy having things fully working and as seemless as possible, as well as aesthetically pleasing (hence my refindplus configured in the way that it is). I do realize that there are numerous projects, but out of all of them, yours seems to be the most promising. Regarding deep sleep, I believe my old EFI had deep sleep working perfectly. Since I'm attaching it, you can have a look. Regarding the trackpad issue: You ask if I touch support before. I absolutely did. Flawlessly. I used both DSDT and SSDT. Regarding your 3 EDITS: I will give it a go now and provide feedback ASAP. Again, thank you for all your hard work. Best regards, |
EDIT 1: Well, everything seems to be working perfectly now, with your latest EFI, apart from the SD Card. |
EDIT 2: I got SD Card working again without breaking anything else (apparently) by: 1 - Disabling your following kexts: 2 - Adding and enabling: It doesn't seem to break any functionality whatsoever, but only time will tell. So, even though you are light-years away from me in terms of Hackintosh knowledge, I hope it sheds some light on any underlying issues (which you pretty much erradicated altogether). Talk soon, I hope. Best regards, |
Well @billabongbruno it looks like the SD card slot is even easier to get running. So it looks like the SP4 SD card slot is supported natively by macOS. All that is actually needed to get it running is your USBmap.kext file. In addition you still should keep the other kexts that you previously disabled, disabled. Additionally, you should now disable the genericcardreaderfriend.kext. I am going to regenerate a new usb mapping that supports the SP4 and Book but for now usbmap kext should work just fine. next up, deep sleep. |
@balopez83 , happy to know that it's all coming together. Very well, then, I will try disabling GenericCardReaderFriend.kext and see how that works out. Glad to know that the USBMap.kext helped, if even just a little bit. As for deep sleep, maybe my DSDT.aml may help with that? Best regards, |
EDIT 1: Yep, SD Card still works even after having disabled GenericCardReaderFriend.kext. Awesome. |
I should be posting a new release soon with all the changes. Looks like the USB mapping can't be combined with the Surface Book without causing failed boot up. While they have the same map the ports are classified different. Going forward I will need to split the Config.plist files. Oh well but at least progress is being made. I will compare your DSDT with a stock one and see what patches you have to see about that deep sleep support. Just so I am clear on it, your device fully sleeps and turns off the USB ports, touch, etc., when using your old EFI? |
Hey there. Good to know a new release is coming up soon, even though it sucks that you have to branch out the config.plist files. Ok, so regarding my DSDT: But back when I was using BigSurface.kext Version 3.0, the only thing that woke up the device while under MacOS was the power button, if I am not mistaken. Hopefully I didn't change it and deep sleep is still working in it. I need to check my backups if that one is the wrong version. Also, on a side note, I took the liberty of updating AppleALC.kext to the latest version, as well as HibernationFixUp.kext too. I have upgraded to OpenCore 0.8.4 with some minor personal adjustments to the config.plist. It's all working great. |
Glad to hear its all working well. Yeah need to update everything but figured I would try and work out some last minute stuff before doing so. Cleaning up the SSDT's now and getting rid of some patches that I don't believe are needed anymore. |
Yeah, it's super smooth. Oh, I see. Also, on a quick unrelated note... Apparently I need a new ACPI patch for it, but I can't, for the life of me, figure it out. |
sure, I can take a look at it. Send me what you want me to look at. |
I really appreciate that. Thank you so much. |
EDIT 1: Apparently, I can't attach it here, because it exceeds 25Mb. I have therefore uploaded it to a publicly shared folder on my GoogleDrive. Here is the link: As a reference, the laptop in question is: Acer Nitro 5 AN-515-52 Again, I can't thank you enough for this. Best regards, |
EDIT 2: And I have indeed followed these instructions to the letter: |
EDIT 3: I had previously also figured some things out with BigSadan regarding USB and remembered that I had seen issues about sleep. I believe that it was this thread that shed some light on the matter: |
So I took a quick look at your EFI, kexts, and ssdt's and at first glance things seem ok so need to dig a little deeper. I wasn't seeing anything about SSDT edits so curious where you saw it? Also, is there any chance that the latest version broke something that needs to be fixed with an update to the kexts themselves? Is there a specific part of the SSDTs/config/kexts that you believe are probably causing the issues? |
I took a look at this before as well and tried these changes but unfortunately it didn't seem to have much effect on sleep. It seems like it goes into only the dark wake mode where it shuts many things off but still runs the USB ports and background tasks. I was able to get it to go to sleep but it then transitions to fully off and restarts once you open the keyboard or hit the power button. I can't figure out how to have it stay in sleep and wake normally. |
Hey there. I really appreciate you taking the time to do so. Well, as I said, it was all working great using MacOS up to 12.3.1. After (and including) 12.4, it just stopped. However, these fixes don't work for everyone. Some people report it's working, but a lot report that it doesn't. Even with the latest kexts. As an extra piece of info, it seems to map the BT module, but then, under MacOS, the address just shows as NULL, as if no firmware had been injected, which it should have been. I am at a complete loss. |
I see. A good example of this is the laptop I have (which we discussed just now). Come Monterey, if I reboot or shutdown normally, it leaves my keyboard and touchpad in a bad state and I can't operate it to choose my boot entry in RefindPlus nor OpenCore. It's weird. Monterey seems poorly optimized. |
Hi @billabongbruno , So I am trying to think of possible options that might be causing the error you're getting with bluetooth. One thing that comes to mind is patching of the kexts to recognize your card assuming its not already listed in the kext's plist? The other thing that stands out is your system product name being iMac. I know you said you changed your information but I believe it being set as an iMac would actually be more harmful than helpful. Something along the lines of MacBookPro 15,1 would likely be a better fit in addition to working power management. I am not sure if it will help here but perhaps try enabling the "ExtendBTFeatureFlags" quirk in the "kernel" section. Can you send me a clean (not patched) DSDT from your computer? I suspect that you could be right about an SSDT patch though it might be something that can be bypassed with a device patch in the Config.plist instead. Can you export your PCI-e list from Hackintool as well and send that? If you can find the information you mentioned regarding a possible SSDT patch for this issue, that could help as well. I have an 11th gen computer with intel wifi and bluetooth as well that I am updating to Monterey now and will see if I experience the same issue you have. That may help me figure out how to resolve it on yours. I don't use it for macOS much cause the graphics are not supported on 11th gen and up though keep it installed just in case my main hacks go down and need to make some edits and fixes. |
ACER_NITRO_5_AN-515-52_INTEL_AC-9560-BT_DSDT_billabongbruno.zip Hey again. Ok, so regarding the first part, the model is listed and supported in the kext (explicitly), so that might not be the issue. I did not in fact try to use the "ExtendBTFeaturesFlags" quirk, tho. Regarding the DSDT, I found a copy of both an original and a patched one on my Google Drive, but there are 2 years old and I stopped importing the DSDT for quite some time now. I can't export the PCI-e list at this moment, but as soon as I get back home (not for a few days), I will be sure to dump it and attach it here. To be fair, it's working more as a desktop than anything else. I once needed to jailbreak my iPad Mini 3 and the Linux distros of checkRa1n weren't working anymore, so I had to start Hackintoshing just so I could jailbreak the damn thing again (tethered jailbreak). lol It's Ok if I can't get BT to work, but as I'm sure you guessed it by now, it really itches me not having it set up properly. Anyway, I'm attaching the DSDTs. If need by, I will dump it again when I have access to it. Hope it helps in your investigation. Best regards, |
EDIT 1: A few links regarding the issue: OpenIntelWireless/IntelBluetoothFirmware#295 https://www.reddit.com/r/hackintosh/comments/qgfxs9/bluetooth_issues_with_monterey_even_after_using/ https://www.olarila.com/topic/17445-help-with-bluetooth-in-monterey/ Some info is contradicting, as some people state that "BlueToolFixUp" should show up prior to "IntelBluetoothFirmware". So weird. |
EDIT 2: Ok, so I have asked for someone to perform the tasks for me, with me on the phone (via videocall). I am attaching a fresh copy of my clean DSDT.aml and also the PCI-E Devices list obtained using Hackintool. I also asked for the order of the kexts to be switched, but it didn't work. |
Haven't yet looked at your DSDT but here is where I am at with it: I updated my computer to Monterey 12.6 and as expected bluetooth stopped working. I dug through some of the links you sent and came across one mentioning USB ports. It seems on some computers the USB ports fail to map and in some cases it can impact bluetooth. Can you determine if your computer still shows the USB ports mapped? On my computer it no longer shows the USB ports mapped. The EFI uses an SSDT to map instead of kext however it seems to have failed to stay mapped. Not sure if this is the solution but figured I would bring it up. I need to fix mine to see if that resolves things or not. |
Yeah, I saw that too. I do believe mine remained mapped, but I will need to investigate further. Which tool and log file would you like me to use in order to check this for you? |
EDIT 1: So, out of nowhere, Bluetooth worked ONCE, but only once. The person who is remotely using my ACER used ChromeOS, rebooted into MacOS as per my instructions and Bluetooth was working normally. After that I lost BT funcionality again. It was a fluke, but it leads me to believe that the issue might reside in the order of which the kexts are loaded and / or a simple timing issue. Anyway, I have attached what you asked. Hope it helps in sorting this issue. Best regards, |
EDIT 2: Ok, so very weird behavior: First I tried remapping USB using USBToolBox and also UTBMap.kext, which didn't work. And then: 1 - After manually turning on Bluetooth in the status bar on top and staying on MacOS for about 10 minutes, the laptop was rebooted into a Linux Distro (Kali Linux); 2 - After leaving Kali, the laptop was rebooted once more; 3 - After reboot, booted into MacOS, but instead of immediately entering the password, a timeout of around 10 seconds was given; 4 - Bluetooth was working; 5 - Rebooted into MacOS again; 6 - Bluetooth was working; 7 - Rebooted into all the other OSes (Kali, Ubuntu, Windows, ChromeOS) and then back to MacOS; 8 - Bluetooth was working; 9 - COLD BOOTED (shutdown from ALL OSes); 10 - Bluetooth was working; 11 - HARD BOOTED (pressed and held down the power Key) and rebooted into MacOS; 12 - Bluetooth was working. The only times Bluetooth failed to work was when the timeout before entering the password was not met, which is super weird. NOTE: How is this simple timeout before entering password making any difference? |
Sorry for the delay getting back to you. Its been a crazy week with work. Similar to how the BigSurface kexts needed to have the IOprobescore number increased to ensure they load later I might recommend the same with the bluetooth kexts. I am not sure if it needs to be done to all, some, or just one of the kexts so you will have to play around with it BUT your delaying log-in makes me thing it MIGHT help. Then again it might do nothing at all but its just a guess. In the BigSurface kexts I think only one of them needed the IOProbescore increased and I think they increased it to 9,999 but I am writing from memory so you will have to double check. You should find and be able to edit it in the plist inside each kext and sub kext. Hope that helps a little. Unrelated I found some information that might help get a slightly deeper sleep on the Surface Pro 4 but it appears like S3 sleep may not actually be possible as its a hardware limitation. Instead there may be a way to imitate something like the active standby feature the Surface uses in Windows. On another note, are you experiencing random crashes or freezes on Monterey? I think I need to do a deeper dive in the ACPI to make sure I am not missing needed patches as I don't remember having these issues back when I used a fully patched DSDT. Unfortunately the Surface DSDT is really a mess and not sure if its really even possible to have a stable system without a full DSDT patch |
Hey there. No worries, my week is being very busy too. Well, I just read up on what you wrote, but... It's back to not working again. Regarding the Surface, well, that's interesting, in fact. Also, on an unrelated note, I found some things regarding the Linux driver for the integrated Wifi / BT. |
Well not sure if it helps but there was an Avastar kext that was supposed to get bluetooth working apparently back in the day. Still no wifi but could be a start at least. I have not been able to get it to work but let me dig around in my files and see if I can find it. I think it was designed for the Surface Pro 1 & 2 though so maybe with some modifications it could work with the Pro 3-6 |
Here we go. This is the Avastar kext. Can't remember even where I found it but maybe it might help. |
Thank you. I'll see what I can do with this. |
EDIT 1: By the way, I opened an issue (more like a suggestion) on the creator of BigSurface's GitHub. You can follow up on it here: |
Hi @billabongbruno just thought I would let you know I just posted a massive update in the releases section as release version 4.0. This should fix almost all issues on the Surface Pro 4. Any luck with your other stuff? |
Hey there. Yeah, I had already starred and followed your project. In the meantime, I saw that version 4.1 was released as well, so obviously I'm gonna give that one a try. No, so far no luck with the Avastar thingy nor the sleep issue. Regarding the other laptop, sadly no advance. |
Ah good to know. Sorry you haven't had any progress on the bluetooth for your other machine. I am not entirely sure what the deal is and have not been able to fix it on my other machine either. I am still experiencing an issue where the computer will freeze at the time the computer attempts to sleep. Basically the screen stays on but everything is frozen and it then has to be turned off forcefully. can you tell me if your computer freezes at all around the time it is set to go to sleep? Can you also tell me if your computer freezes when you access the screensaver menu? Also what version of macOS are you using? I can't quite tell if I messed something up but if so both version 4.0 & 4.1 will be impacted. I will prob roll back to an old version and see if the issues exist still. |
Hey there. Yeah, I have no idea what to with Bluetooth on my other laptop. I am not experiencing any freeze whatsoever... I can send you my EFI (with the SMBIOS info edited out), if you want. It's based on your 4.1 release. I am currently on version 12.6 of MacOS. |
Yeah I am not sure yet what is going on with the Bluetooth yet but if I figure it out on mine I will let you know. As for the weird freezing issue, I think it has to do with the type cover "port" but not exactly sure why. Can you tell me if your computer freezes at all when you remove the type cover? Also, what version of the Type Cover do you have? keys close together means original version and space between them means newer version. Alcantara type is I think even newer. Go ahead and send me just your config.plist if your computer isn't freezing when you detach your keyboard. If it does freeze then don't worry about sending anything. |
Hey again. I appreciate you letting me know if you happen to solve it. Regarding my Surface Pro 4, I have the original version of the keyboard and it does not freeze at all. I am attaching more than my config.plist. I'm attaching my full EFI folder. Give it a try with your SMBIOS info, to see if the issue remains. If it does, now you know that it is your keyboard. Keep in mind that I do not use Secure Boot at all, so my EFI is very minimal, which is what I always aim for. |
Thanks for sending all of that. It looks like I may have messed up my USB ACPI code or something cause after rolling back everything is stable again. I re-implemented some new ACPI changes to clean up the code for Windows booting so there are not ghost devices showing errors in the Device Manager and now everything seems to be running perfect. I may play around with the Avastar kext but at this point I think this computer is about as good as its gonna get without someone with way more knowledge than I figuring out the WiFi & Bluetooth stuff. |
Hey there. No problem, I jut wanted you to have as much as a basis for comparison as possible. Oh, I see. Yeah, hopefully I get some replies regarding the Wifi and Bluetooth. Also the cameras. By the way, is 4.1 the "final" release or are you rolling out a new one, considering the changes you made? Best regards, |
Hey @billabongbruno based on how much is finally working I will likely slow the number of releases to monthly or every couple months for OC upgrades and minor fixes. I anticipate doing one more release soon though to incorporate the final changes for Windows/Linux dual boot fixes. Side note, I have been using an external bluetooth dongle but disconnected it and restarted macOS. Upon reboot bluetooth was working or at least appeared to be working. I suspect the avastar kext might have attached though couldn't verify. I was able to connect to a bluetooth headset however it disconnected instantly. It would keep attempting to connect and would keep disconnecting. I did edit the avastar kext to match my device ID which might have helped it to sorta work. After another reboot it stopped working and hasn't worked like that since. It seems there might be hope for internal bluetooth after all though I suspect it will be awhile before any real success comes of this. |
Hey there. Yeah, it makes sense not to be putting out releases just for the sake of it. Regarding your bluetooth findings, those are indeed very interesting. Also, the creator of BigSurface Kext will not be helping out with the cameras, as he does not have the device on hands. Also, could you please let me know which Bluetooth dongle you are using under MacOS, so I can purchase one too? Can you point me in the right direction, please? Best regards, |
No problem. Here is the bluetooth nano usb I am using and it works great https://a.co/d/4ul1AOR I also figured out the crashing issues I was experiencing. It turns out I was stupid and looking everywhere but the right spot. Ironically I suspected the issue but never actually double checked. As for the porting, I would suggest reaching out to this person who was able to port the Goodix Touch screen driver from linux to macOS and it works fairly well. https://github.com/lazd/VoodooI2CGoodix |
This issue is getting pretty long. Do you have Discord? I might suggest you messaging me there for any further items so we can keep the issues from getting this long or off topic. |
Hey there again. So, first of all, thank you for the advice on the Bluetooth dongle. Oh, I see. I suppose breaking the EFI's would be easier for people, indeed. As for the porting, I will reach out to that user and see what can be done, then. And yes, this has become a very long "issue" and very off-topic, lol. Bruno Santana#6367 (Yes, it does have a space between "Bruno" and "Santana" and the capital letters are those) Feel free to close this "issue". See you on Discord soon. Best regards, |
Bluetooth for Broadcom devices has now been resolved. Whoo hoo lol. I will try and push a new release later today and if not for sure this week. |
lol Good to know. Hopefully that fix is applicable to the other laptops as well. |
Hey, there.
First of all, I just want to thank you for all of your hard work.
This post is not an issue, just a contribution.
I got the SD Card working by using my "USBMap.kext" instead of your "USBPorts.kext" and by using my edited version of "GenericCardReaderFriend.kext".
I have tried your EFI with these fixes from my previous EFI and this mix/match seems to work perfectly, as I have not seen anything broken.
I can attach the files here, if you want.
Just a quick side note:
Connecting and reconnecting the keyboard works great on my previous EFI.
If you want me to share that as well, I can do that too, so you can have a look.
Everything was working with my build, apart from the touchpad, which, although allowing gestures, was not recognized as a trackpad per se when I used the 6.2 version of BigSurface.
With 3.0 BigSurface version, it worked great.
Also the battery and all that.
Let me know if you want me to share anything.
The text was updated successfully, but these errors were encountered: