Skip to content
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

BCM94352Z Wifi+Bluetooth? #6

Open
cyberfunk opened this issue Mar 20, 2021 · 23 comments
Open

BCM94352Z Wifi+Bluetooth? #6

cyberfunk opened this issue Mar 20, 2021 · 23 comments
Labels
Enhancement New feature or request

Comments

@cyberfunk
Copy link

cyberfunk commented Mar 20, 2021

Hello! Thinking about dropping your EFI into my 820 G4. Will the BCM94352Z work with no modifications to your setup? Also what lead you to the BT Wifi card you use and how/where do you install it? It looks too big for the existing slot from the images I’ve seen. I may opt for your card if there are benefits over the BCM94352Z😁

@cyberfunk cyberfunk added the Enhancement New feature or request label Mar 20, 2021
@XXCoreRangerX
Copy link
Owner

XXCoreRangerX commented Mar 20, 2021

Hey! The BCM94352Z card isn't an original Apple Airport card, therefore requires some additional modifications. The BCM94360CS2 is a real Apple card taken out of a MacBook. It won't require any kexts or patches and is supported out of the box.

I bought it to take advantage of Continuity features on macOS, mostly for screen sharing to Apple TV.

The Wi-Fi card can be installed here.
Full-laptop

I used this adapter from AliExpress for the card, because Apple has a special connector for their Wi-Fi card. Only had to break off a part of the PCB for it to fit in.
BCM-adapter

The card fits in the 840 G4 with no problem.
BCM-card

It isn't too large for the laptop bottom case to be closed.
BCM-card-2

Only issues I've had with this card so far, is that it breaks the Wi-Fi LED on this laptop (normally broken on macOS with any card, but when using this card it's also broken on Windows - cosmetic only issue). On Linux requires additional drivers.

Also, the 820 G4 is a slightly different laptop. It might require some changes in the config and ACPI to boot up. Though the specs look very similar. Would be cool if you provide me details about your laptop - CPU, touch or non-touch, HP Sure View available or not (F2 key blank or not). Follow the README file for more info.

@cyberfunk
Copy link
Author

Thank you for that comprehensive answer and accompanying images!!! Off the top of my head my unit is the 820 G4 non touch full HD 620 i7 7600 U 32GB RAM using the trusty Rehabman guide with clover v5122 Mojave and firmware 78 1.29. Everything is perfect EXCEPT the trackpad crashes my system with Rehabmans SSDT-IGPU.aml Patch in the ACPI folder. There’s a bug there with VoodooPS2Controller.Kext I think but I have not the expertise to fix it which is what lead me to consider your setup. If I remove Rehabmans SSDT-IGPU patch the system is stable BUT I lose brightness control. Everything else works though. So I get a 99.9% working system but if your setup is 100% I may make the switch😁

@XXCoreRangerX
Copy link
Owner

XXCoreRangerX commented Mar 21, 2021

You can use SSDT-PNLF for the brightness control, like in my EFI. It's much more stable and won't break your touchpad.

Your laptop is very similar to mine, but you will have to disable VoodooI2C and VoodooI2CHID (because no touchscreen). We have the same CPU, so the original CPUFriendDataProvider kext should work for you (unless you want different speed steps).

Judging by the specs on HP website, it looks like the battery in 820 G4 might be different than in 840 G4. You might have to use SSDT-BATT made specifically for your laptop.

I think you can also safely update to the latest BIOS (I'm running 1.37 - no issues, haven't tested 1.38 yet). SSDT-SET-STAS fixes booting BIOS versions newer than 1.29.

I encourage you to switch to OpenCore and try out the EFI, it would be great if it worked on your laptop. You can also upgrade to Big Sur, works perfectly on my device.

@cyberfunk
Copy link
Author

Thanks! Will your EFI work with Mojave? I'm assuming not since there are sooo many changes between Mojave and Big Sur but I just wanted to see. I will try your PNFL file now! Btw how do I install that PNLF? I assume I just drop it into my Clover/ACPI/Patched folder but when I was troubleshooting with the Rehabman SSDT-IGPU.aml it locked up and would not boot do to some mysterious permissions or other coding that need to be set with that file. Please let me know if I need a script or a permissions fix to properly install your PNLF aml file with Clover. I'm going to drop it in now but if it locks up I will check back here for instructions.

@XXCoreRangerX
Copy link
Owner

The EFI will work on Mojave, but you should disable CtlnaAHCIPort kext (useless for that OS version). There's some config.plist tweaks that you will have to either disable or enable for Mojave, but first try to boot Mojave with the EFI, and if you have any problems just google them to find the tweaks to enable/disable.

I've never used Clover and have no idea how does it manage SSDTs. SSDT-PNLF is like any other ACPI patch. You drop it to OC/ACPI/ in OpenCore or Clover/ACPI/Patched/ in Clover. I think you should also disable SSDT-IGPU completely when using SSDT-PNLF. If it doesn't work, try using SSDT-PNLF from RehabMan and maybe read some guides online.

I highly recommend switching to OpenCore, as it is much lighter, avoids any useless patches, supports Secure Boot and FileVault much better than Clover.

@cyberfunk
Copy link
Author

Thanks so much! I will take a deeper look at integrating your EFI and thank you for all of your hard work in setting it up!

@cyberfunk
Copy link
Author

cyberfunk commented Mar 21, 2021

Alright so I’m of officially in this! I deleted all Rehabman kexts from Library/Extentions/ dropped your OC folder into my EFI changed all settings to match your recommendations in BiOS and rebooted. I noticed you don’t provide options to clear NVRAM in your OC boot menu which is probably my first hurdle to clear. Anyway here is the message I get.

DD9B731D-3039-40B3-B6DF-788DB6DADDD6

@XXCoreRangerX
Copy link
Owner

XXCoreRangerX commented Mar 22, 2021

Set SecureBootModel to Disabled. We will have to boot into macOS to diagnose this issue.

To clean nvram set AllowNvramReset to True. If HideAuxiliary is enabled, you need to press space at OpenCore boot menu to see NVRAM Reset. It's normally enabled in this EFI because it makes the boot loader more clean, and if you want to boot to recovery, OC Shell or Reset NVRam - you click the space key.

EDIT: This is a general issue after switching from Clover to Opencore. Easiest way to solve this is to reinstall macOS. You can follow this guide to fix this.

If you don't want to reinstall, you'll have to set SecureBootModel to Disabled.
Now try booting into macOS.
If it boots, open the terminal and type in the following commands:

# First, find your Preboot volume using diskutil
diskutil list
# From the below list, we can see our Preboot volume is disk5s2 (will be different on your hardware)
/dev/disk5 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +255.7 GB   disk5
                                 Physical Store disk4s2
   1:                APFS Volume ⁨Big Sur HD - Data⁩       122.5 GB   disk5s1
   2:                APFS Volume ⁨Preboot⁩                 309.4 MB   disk5s2 <------------
   3:                APFS Volume ⁨Recovery⁩                887.8 MB   disk5s3
   4:                APFS Volume ⁨VM⁩                      1.1 MB     disk5s4
   5:                APFS Volume ⁨Big Sur HD⁩              16.2 GB    disk5s5
   6:              APFS Snapshot ⁨com.apple.os.update-...⁩ 16.2 GB    disk5s5s

# Now mount the Preboot volume
diskutil mount disk5s2

# CD into your Preboot volume
# Note the actual volume is under /System/Volumes/Preboot
cd /System/Volumes/Preboot

# Grab your UUID
ls
 CD844C38-1A25-48D5-9388-5D62AA46CFB8

# Next lets copy over the secure boot files
# Replace CD844C38-1A25-48D5-9388-5D62AA46CFB8 with your UUID value
cd ~
sudo cp -a /usr/standalone/i386/. /System/Volumes/Preboot/CD844C38-1A25-48D5-9388-5D62AA46CFB8/System/Library/CoreServices

After that's done, set SecureBootModel to j680.
Now try booting into macOS.

If that doesn't help, your best bet it to reinstall macOS.

@cyberfunk
Copy link
Author

Thanks so much! I followed your BIOS settings very carefully and secure boot had already been disabled. Will take a deeper dive with your extended instructions in the morning. Also discovered the space bar trick to reveal additional options but cleaning NVRAM had no effect unfortunately. Will try the extended tutorial and report back. Thanks again!

@cyberfunk
Copy link
Author

I followed your SecureBoot instructions and I'm booted in with OpenCore!! Unfortunately the upper right and left mouse click buttons above the built in trackpad do not work. The problem is my lower left click button is broken so I have no ability to left click without plugging in a mouse. Is there a command or config.plist option to enable upper left and right click buttons for the ELiteBook? I'm assuming the trackpad and buttons are the same for the 820 840 and 850 G4.

@XXCoreRangerX
Copy link
Owner

Congrats on booting with OpenCore!

These two buttons aren't actually a part of the trackpad and cannot be used on SMBus AFAIK. Upper left and right click buttons can be used only via PS2, along with the trackpoint. I'm still working on fixing trackpoint (and those two buttons).

Only way to force the trackpoint and these 2 buttons to work is by injecting VoodooPS2Mouse kext. However, this kext breaks the touchpad multigesture. I'm currently working on this (with not much success yet). Basically VoodooPS2Controller needs to be modified to have MUX support. This will fix both the trackpoint and the upper buttons. You can read this issue and the comments for more information.

If you need to use these two buttons - disable VoodooSMBus kexts completly, and use VoodooPS2Mouse. You will lose touchpad gestures but all buttons will work.

@cyberfunk
Copy link
Author

cyberfunk commented Mar 24, 2021

Thanks! Newbie question. In Clover SMBIOS I use MacBook Pro 11,1 but in OpenCore it says MacBookPro 14,1. Is there a reason for this change or should both work?

@XXCoreRangerX
Copy link
Owner

MacBookPro 14,1 is a much better SMBIOS for this hardware configuration. You should use that one.

@cyberfunk
Copy link
Author

cyberfunk commented Mar 27, 2021

Hi I wanted to check back in and let you know my progress is going while using your EFI.

External Display:
External display behavior is very inconsistent. If I plug in an external display via Display port to HDMI adapter while laptop is powered on and lid is open I can get the external working but it is pink/magenta hue. If I close the laptop lid the external display goes black and does not stay on as expected. If I open back up the laptop lid the laptop display is black and I can't get it back unless I hard reboot.

Battery:
As you mentioned I'm having battery issues. You mentioned I might have to use SSDT-BATT made specifically for this laptop. Can you suggest where would I find or generate such a file?

@XXCoreRangerX
Copy link
Owner

XXCoreRangerX commented Mar 27, 2021

Make sure to apply sleep patches that are in the README. Not configured sleep might cause the black screen after closing and opening up the lid.

I don’t know why does your hack go to sleep on lid close if there’s an external monitor connected. I’ll definitely have to find a fix for that, but right now I have no idea.

Using adapters for connectors generally causes issues on Hackintoshes.

First try to use one-key-hidpi script (you may want to enable Inject EDID).

If that doesn’t help, try changing the connector type from DisplayPort to HDMI in the config.plist.

Follow these steps to fix framebuffer patching:

  1. Connect the external display.
  2. Open IORegExplorer and search iGPU.
  3. There will be 3 framebuffers. Look for the one that has a “Display” or “AppleDisplay” entry (framebuffer 0 is the built-in screen, so that one doesn’t matter).
  4. Go into the config.plist and look for a patch for this framebuffer. It is located in DeviceProperties section.
  5. Change the connector value in framebuffer-conX-data. It is currently set to 00040000, and since you’re using HDMI set it to 00080000.

There’s a list of all the connector types in this guide.

There’s other workarounds for this, like some scripts that can fix this issue.

If you want to fix the battery, you will have to follow this guide. I can’t really help you with that, because I have no idea how to patch a battery. It is too complicated for me.

@cyberfunk
Copy link
Author

Thank you so much for the quick tips!

@cyberfunk
Copy link
Author

Btw I tried to follow your instructions regarding enabling the top two mouse buttons but it didn't work. You said to disable VoodooSMBus kexts completely. I noticed you used an "s" on the end of kext so does that mean there is more than one kext to disable? I only saw one VoodooSMBus kext in the folder. I disabled the one VoodooSMBus kext by changing YES to NO in the config.plist for that kext. Next you said to inject VoodooPS2Mouse.kext which is already included in VoodooPS2Controller.kext. So I opened VoodooPS2Controller and copied VoodooPS2Mouse.kext out of the plugins folder within the kext file and pasted it by itself into the EFI/OC/kexts folder. Next I added that kext to the config plist rebooted and the trackpad and buttons do not work at all after that. Did I do something wrong?

@XXCoreRangerX
Copy link
Owner

XXCoreRangerX commented Mar 27, 2021

You need to disable VoodooSMBus, VoodooRMI, RMISMBus.

Don’t move VoodooPS2 plugins out of their folder, they are supposed to be injected from that folder.

You inject VoodooPS2Mouse just like any other VoodooPS2 plugin. Locate VoodooPS2Trackpad kext entry in the config, change VoodooPS2Trackpad to VoodooPS2Mouse and enable it.

Example:

			<dict>
				<key>Arch</key>
				<string>Any</string>
				<key>BundlePath</key>
				<string>VoodooPS2Controller.kext/Contents/PlugIns/VoodooPS2Mouse.kext</string>
				<key>Comment</key>
				<string></string>
				<key>Enabled</key>
				<false/>
				<key>ExecutablePath</key>
				<string>Contents/MacOS/VoodooPS2Mouse</string>
				<key>MaxKernel</key>
				<string></string>
				<key>MinKernel</key>
				<string></string>
				<key>PlistPath</key>
				<string>Contents/Info.plist</string>
			</dict>

@cyberfunk
Copy link
Author

First off I have to apologize as many of the tips you are giving me are available on the ReadMe on the main page for this package. That said I can't get an external display working properly after applying the sleep patches. If the lid is closed then the external display basically turns off and loses the input. Another curious thing is if I boot with laptop closed the external display works up to the Apple loading screen. When it's time to load the login screen and wallpaper the external display quits and goes black. I tried to apply Rehabmans display patches for Clover, which actually worked with another guys OpenCore EFI package for 840 G4, but unfortunately they had no effect with your EFI. I'm not sure what to try next. Do you use an external display with your setup and everything is working perfectly with lid closed etc.?

The second minor issue is that with the VoodooPS2Mouse activated, the trackpad is disabled until you get passed the login screen. It's a weird behavior I've never encountered before. Once you login you can move the cursor. Also the touchpad behaves like a windows trackpad with tap-to-click, tap/hold drag etc. You can't turn any of these behaviors off because there is no touchpad settings in system preferences with VoodooPS2Mouse enabled. Not a deal breaker but takes a little getting used to.

@XXCoreRangerX
Copy link
Owner

XXCoreRangerX commented Mar 28, 2021

I don’t use an external display in my setup. Actually I use this laptop without anything connected to it. I can plug it in my PC’s monitor and test that tomorrow. I have only tested it once but haven’t tried closing the laptop. Also make sure you have connected an external mouse and keyboard - macOS actually checks if these are connected if you want to work in the “closed-display with an external monitor” mode. By the way, is the purple tint from the display gone now?

The issues you’re having with VoodooPS2 are expected behavior of VoodooPS2Mouse. It’s the only way to fix trackpoint and upper touchpad buttons right now. I will keep working on this and will let you know once I fix it.

P.S. This week will be very busy for me, so I’m not gonna respond too quickly. I am still gonna try help as much as I can.

@XXCoreRangerX
Copy link
Owner

XXCoreRangerX commented Apr 1, 2021

Okay, so I tried connecting the laptop to an external display. Here's what happened.

First I connected the charger, then I connected a USB mouse and a keyboard. After closing the lid, the external display went black. On Apple's website it says that you need to do a key press on the keyboard or mouse to wake up the external display. After doing that, I was able to use only the external display, with the laptop lid closed (and that's how I'm currently writing this response).

I also tested other scenarios to make sure everything works as it should.

For example, you don't need to have both the mouse and keyboard plugged it, but at least one of them has to be to wake up the display.

I also unplugged the charger and tried to use the laptop with lid closed. It was working for like a minute, but then it suddenly went to sleep. That's the expected behavior in macOS tho. The display is on when macOS checks if there's AC connected. If not, it puts the laptop in sleep mode, which takes some time and that's why the display is still on for so long.

If you still can't get the laptop to display on external monitor while it's lid is being closed, make sure you have at least one input device connected and the laptop has an AC adapter plugged in. Also, I'm not sure if it's gonna work with your HDMI adapter. I only tested it on DisplayPort.

EDIT: Strange things happen when I boot with the lid closed. The laptop shows OC boot menu and I am able to choose macOS. After the Apple logo there’s no output. Not only that, but when I open the lid there no output too! I need to reboot to use the laptop again, so there’s definitely something broken.

@cyberfunk
Copy link
Author

cyberfunk commented Apr 1, 2021

Thanks for looking into this. That last edit you added is what I was talking about. Once the Apple screen is done loading and it's time to show the login screen it's lights out. I decided to return back to Clover as the Rehabman setup is incredibly solid and full featured minus the heightened security allowed by OpenCore. External monitors with sleep wake and all the rest work perfectly. I did have to run a special patch to get rid of the pink external display but that was simple and a one time thing. The only adjustment/addition to the Rehab guide is that you need to check the box in energy saver that says "Prevent the computer from sleeping automatically when display is off " if you use a wired keyboard and mouse. Since Rehabman calls for "wake with USB" in the BIOS settings to be unchecked if the computer sleeps a wired keyboard and mouse will not wake it up. If you use BlueTooth peripherals you're good to go with no extra adjustments to BIOS outside of Rehabs recommendations. I even incorporated the intel Wireless patches with an Intel 8260NGW card as the Intel card has BlueTooth 4.2 where the BCM04352Z is limited to BlueTooth 4.0 which does not have quite the range. I also added an antenna to boost the signal even further! I can listen to music outside my house with this new antenna😄 Check out my unit. It's like a Frankenstein MacBook air on steroids!
IMG_0178

@XXCoreRangerX
Copy link
Owner

Wow! That looks awesome. It's like a cyborg! Love the antenna mod - super futuristic. My EFI does need some improvements to be more stable. However, I'm pretty sure you can fix booting with the lid close using igfxonln=1 boot flag (it has solved it for me). Would be cool if you gave OpenCore one more shot and reported back.

I'm gonna be working on fixing LTE on this laptop now. Recently picked up an HP lt4120 WWAN card. I'm currently trying to fix it on macOS using a custom injector kext. It always shows up as "Ethernet". An interesting thing is that the WiFi status LED is always white if the WWAN card is connected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants