Contribute
Register

[WIP-Guide] HP ENVY x360 13-y013cl - i7-7500U Kaby Lake

jaymonkey

Moderator
Joined
Aug 27, 2011
Messages
3,775
Motherboard
ASRock-Z97 EX6
CPU
i7-4790K OC @ 4.8GHz
Graphics
Vega 64LC + HD4600
Mac
MacBook Air, MacBook Pro
Mobile Phone
Android, iOS
Hi Guys,

An update on WiFi & BT experiments ...

As i already posted i swapped out the intel WiFi/bT card in my 2017 15" HP Spectre X360 for BCM94352Z ... WiFi in OSX and linux worked perfect but in windows 10 the laptop would lock up as soon as i attempted to connect to a network .. it seems to be a very common issue with this card and windows 10 ...

Searching the internet results in lots of suggestions (mainly trying different driver versions) but after several attempts and god knows how many different driver versions .. i've given up trying to get the BCM94352Z card working in windows ... and yes i did try another BCM94352Z card but it resulted in the same issues.

So I dug deeper into the issue, after examining the ini install files it became clear that the driver is actually a repackaged BCM95342 mini PCIe Windows 7 driver and is not specific to the M.2 BCM95342Z version of the card or Windows 10. Examining the Windows event logs showed that the driver file bcmwl63a.sys was crashing when ever a badly timed interrupt occurred, I confirmed this using an oscilloscope on the interrupt line ... needless to say this is not good.

Additionally as i reported in the same post (and by others elsewhere) the BT USB device on the BCM94352Z would not always initialise correctly during POST resulting in it not being seen in windows or osx ... it was possible to get it to work but required a random number of reboots/sleep/wakes ... once it was seen by osx it worked fine ... even after sleep/wake ... but for me the BCM94352Z has not been an ideal solution especially with the windows wifi issues.

So time to look for a different solution ...

Despite warnings about it not being suitable for Lenovo and HP laptops I bought a Dell DW1830 on ebay for $25 ... this card has a BCM43602 PCI WiFi chipset and a BCM20450 USB bluetooth controller ... both of these chipsets (a variant of) are used on genuine Apple WiFi/BT cards so it should be much compatible if i can get it t work. Since this card is a 3x3 MIMO and supports three antenna's and the Spectre only has two i also purchased a suitable MHF-4 antenna ...

Its very important that if you install a wifi card that has more antenna connections than your system has physically that you install additional antenna's even if you can not locate the new antenna's in the same location as the original ones. Running a wifi card without all antennas connected could result in you burning out the radio transmitter on the card due to not enough load being placed and the transmitters radio amplifier thus causing it to run hot.

In my case i was unable to install an additional antenna in the laptops lid as the screen is bonded and i did not want to go through the potentially dangerous procedure of un-bonding and re-bonding the screen. The 15" X360 has some air inlet grills either side of the keyboard so i mounted mine in that area. Its not a perfect location as only a small amount of the antenna is able to access free air and thus effects its ability to pull in a signal but its better than nothing and ensures that the radio on the wifi card will not burn out.

Once the card and antenna was delivered i installed them in the X360, powered up and was disappointed to see that the WiFi (pci) part of the card was not detected in any OS (Windows/OSX/Linux) ....

Then i remembered an old trick some users have to do with the BCM94352Z so i masked pins 56 & 54 (BT & WiFi disable lines) .. and tried again ... booting into windows and checking device manager showed that the card was now detected so I went ahead and installed the latest Dell DW1830 WiFi and BT drivers, both installed fine and the card came on-line with no crashes or lock ups ... I gave it a good test for an hour or so and all was good.

Note: the DW1830 is missing pin 50 unlike the BCM94352Z so its a group of three pins not four as shown in the linked guide.

Reading up on the DW1830 on this site seems to state that it should work OOB .... so i booted into OSX (10.12.6) in safe mode and removed all the fixes for the BCM94352Z (fakepciXXX, BCMpatchram, clover patches .. etc) and rebooted ..

Sure enough WiFI was detected (both 2.4Ghz & 5Ghz) and i was able to connect to my 5Ghz wireless network ... all be it at a slower speed of 450mbs compared to the 878Mbs i got with the BCM94352Z ... also no BT.

So I reinstalled BCMPatchRam2 & the repo kexts ... rebooted and BT was detected and working. Having now tested BT extensively i can say that this is the best BT support i've seen in a hackingtosh ... the BCM20450 BT controller supports LMP4.1 which is natively supported by OSX 10.12.XX .. i've seen no problems so far with handoff or airdrop.

Checking sys info showed that the WiFi card was being identified as 3rd party ... i checked the info.plist in RehabMans FakePCIID_Broadcom_WiFi.kext which indeed showed that it supports my cards id's (14E4/43BA) so i reinstalled it along with FakePCIID.kext .. once the kext cache sorted itself out the card was identified as Apple AirPort Extreme (0x14E4, 0x24)

The speed cap of 450Mbs indicated to me that that the card was probably only running in the 20/40 frequency band and not using the full 20/40/80 range of the card .. I've seen this issue before with my old Sony Vaio Hackingtosh which was resolved by changing the county code to '#a' (see the airport guide) so i applied the patch via Clover and rebooted.

As suspected it worked and my WiFi speed was back to 878Mbs, so now everything was working great in Windows and OSX and it was time to attack Linux.

Booting into Linux (I use Mint 18) the BT was detected straight away .. however it took some digging to get the WiFI working, it turned out the bcm firmware for the DW1830 in my kernel version (4.8) did not support the 14E4/43BA device. The solution was to to update the file brcmfmac43602-pcie.bin in /lib/firmware/brcm with this version and reboot, the new card was detected immediately by the brcmfmac framework and the correct kernel driver automatically loaded without any further intervention.

Summary:

All in all swapping out the BCM94352Z for the DW1830 has been a big step forward for me ... I now have working WiFi (2.4Ghz & 5Ghz 802.11 AC) and BT4.1 in all OS's and i can now put WiFi and BT to bed.

In my opinion the DW1830 ( BCM43602 / BCM20450 combo) is a far superior card to the BCM94352Z ... this might not be true for all cases and will depend largely on if you can get your desktop/laptop to see the card on the PCI bus, but if it does you will see much better WiFi performance and far more stable BT support in any OS.

If your already running a BCM94352Z that is installed correctly you should only need to disable the 'fvco' and BT handoff Clover patches, if your not getting full 5Ghz AC WiFi speeds use the #a country code patch.

Just thought i'd share what i've leant so far with this card.

Cheers
Jay

Update-1: Since posting the above i've now noticed WiFi issues after sleep, please see this thread for more info and workaround.

Update-2: After updating to High Sierra 10.13.6 i had a few issues with Hand Off & Continuity ... turns out this is a known issue as the Clover Continuity binary patch method no longer works in 10.13.6. The Solution that worked for me was as follows:-

1. Remove FakePCIID_Broadcom_WiFi.kext ( also FakePCIID.kext if not using any other of Rehabman's FakeXXXX.kexts)
2. Install AirportBrcmFixup.kext (also requires latest Lilu.kext if not already installed)
3. Remove All Clover WiFi & BT Patches from config.plist
4. Ensure you have BrcmPatchRAM2.kext and BrcmFirmwareRepo.kext kext Installed

As an added bonus using this method I no longer have the issue with poor WiFi bit-rates after Sleep/Wake so no need for the workaround detailed in Update-1. I believe that the AirportBrcmFixup kext does a much better and more complete card initialisation with the DW1830 than other methods as well as patching MacOS.

Note: All Kext's should be installed in /L/E for MacOS 10.12.X and above, see this guide for more info :-


Update-3: As reported by @sparc1234 in this post, it seems that disabling "Wake On Magic Packet" and "Wake on Pattern Match" can resolve the badly timed interrupt that I reported above and stop Windows 10 from crashing when using a DW1560 combo card.

Update-4: If you have issues with Handoff and/or Continuity then install BT4LEContinuityFixup which is another Lilu plugin, for more info on Lilu, AirportBrcmFixup and BT4LEContinuityFixup see this guide :-

 
Last edited:

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,974
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
so i applied the #a county clover patch i used a long time back (see the airport guide) and rebooted.

Amazingley it worked ... my WiFi speed was back to 878Mbs and the card was detected as Airport .. i can only assume that the cards firmware defaults to some weird county code which causes a problem for FakePCIID _Broadcom ...
FakePCIID_Broadcom_WiFi does nothing regarding the country code.
That is something going on in the native WiFi kexts provided by Apple.
 

jaymonkey

Moderator
Joined
Aug 27, 2011
Messages
3,775
Motherboard
ASRock-Z97 EX6
CPU
i7-4790K OC @ 4.8GHz
Graphics
Vega 64LC + HD4600
Mac
MacBook Air, MacBook Pro
Mobile Phone
Android, iOS
FakePCIID_Broadcom_WiFi does nothing regarding the country code.
That is something going on in the native WiFi kexts provided by Apple.
Understood .... have edited post to reflect that .. just seemed odd that it stopped the Airport rebrand from working ...
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,974
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Understood .... have edited post to reflect that .. just seemed odd that it stopped the Airport rebrand from working ...
Probably a kernel cache issue first time. Next time you rebooted (after changing other things, unrelated), FakePCIID kicked in and you then had Airport branding. It would have happened regardless of your patch fiddling.
 

jaymonkey

Moderator
Joined
Aug 27, 2011
Messages
3,775
Motherboard
ASRock-Z97 EX6
CPU
i7-4790K OC @ 4.8GHz
Graphics
Vega 64LC + HD4600
Mac
MacBook Air, MacBook Pro
Mobile Phone
Android, iOS
Probably a kernel cache issue first time. Next time you rebooted (after changing other things, unrelated), FakePCIID kicked in and you then had Airport branding. It would have happened regardless of your patch fiddling.
Yup ... I think your correct RHM, disabling the county code patch results in loosing the AC wifi speed but card is still rebranded as airport ... good spot.

Cheers
Jay
 
Joined
Feb 18, 2012
Messages
111
Motherboard
Hp Spectre X360 15
CPU
i7 7500U
Graphics
620, 4K
Since this card is a 3x3 MIMO and supports three antenna's and the Spectre only has two i also purchased a suitable MHF-4 antenna ...
I am having the same issue with my spectre laptop - wifi causing windows crash with windows 10.
Installation of third antenna wire is stopping me from upgrading to Dell 1830. Do you have any guide link on how to install the third antenna wire? I am little hesitant to operate on the screen portion of laptop as I had damaged the hinge cover on older hp models.
 

jaymonkey

Moderator
Joined
Aug 27, 2011
Messages
3,775
Motherboard
ASRock-Z97 EX6
CPU
i7-4790K OC @ 4.8GHz
Graphics
Vega 64LC + HD4600
Mac
MacBook Air, MacBook Pro
Mobile Phone
Android, iOS
I am having the same issue with my spectre laptop - wifi causing windows crash with windows 10.
Installation of third antenna wire is stopping me from upgrading to Dell 1830. Do you have any guide link on how to install the third antenna wire? I am little hesitant to operate on the screen portion of laptop as I had damaged the hinge cover on older hp models.
No chance of installing the antenna in the screen/lid of Spectre X360 as its bonded ... you'd have to be very brave to even consider that.

I installed mine under the right hand cooling fan ....

With the rear cover of the laptop removed I unscrewed the three screws that held the fan in place and lifted it out of the way, I was then able to see the perforated vents (the ones with the funky laser cut triangle patten on either side of the keyboard) ... I always thought these where the speakers but they are not they are basically extra air inlet vents for the fans.

With a fan removed you can easily position an antenna so that it has free air access the the side (outlet) fan vent and the top keyboard (inlet) vent, I then routed the thin coax cable back to the DW1830 ... pretty straight forward. I removed the heat pipes as well while doing the install and repasted the CPU and GPU with high quality thermal transfer paste.

Top seed i've seen with this setup is around 1100Mbs if i'm within a few meters of my router ... it never drops below 878Mbs when i'm in the next room.

Cheers
Jay
 
Last edited:
Joined
Mar 6, 2014
Messages
16
Motherboard
HP 13-Y013CL Laptop / Clover Legacy
CPU
Intel i7-7500U
Graphics
Intel HD Graphics 620 / 3200 x 1800
Your ACPI/patched content is out-of-sync with native ACPI/origin.
Note that SystemMemory addresses are different:
Code:
SPEEDY-NUC:patched rehabman$ diff ../origin/ ../patched/|grep SystemMemory
<                 OperationRegion (XMIO, SystemMemory, Local0, 0x9000)
<         OperationRegion (PNVS, SystemMemory, 0x84155000, 0x006C)
>         OperationRegion (PNVS, SystemMemory, 0x84C12000, 0x6C)
I created a new DSDT and applied the necessary patches. There seems to be two different scenarios in which the display goes to "sleep."
1) The display's backlight shuts off and the computer remains "awake."
2) The display and computer go to sleep.

With scenario 1, the display will not wake regardless of method (power button, key press, mouse movement or mouse click). I am forced to hard-power off the system.
With scenario 2, the system wakes without issue by power button or lid opening.

Another issue that I am attempting to sort out is an intermittent lack of audio on startup. The sound "card" provides audio through the 3.5mm port at all times, but the built-in speakers only work occasionally. For instance, the system has been up for 30 minutes at the time of this writing and the audio is still not working on the internal speakers. I have attempted to resolve this by setting the flag for "ResetHDA" in clover's config.plist. This seems to have worked for others but has not worked for me.

Also, I was reading your ProBook guide and it mentioned that ProBook users should not be using ssdtPRGEN in order to setup power management. Although this is not a ProBook, I have a feeling that I should not have used this method, but I already have. In my clover's acpt/patched directory, ssdt.aml is the SSDT that was generated by ssdtPRGEN. Should I re-evaluate my method of power management? Is upgrading to High Sierra beneficial for this purpose?

Thank you again for your time. Once this is stable, I will be writing a full guide in order to contribute to the community.

Code:
Last login: Fri Oct 20 00:20:09 on ttys000
macbooks-air:~ macbook$ kextstat|grep -y acpiplat
   13    2 0xffffff7f83278000 0x60000    0x60000    com.apple.driver.AppleACPIPlatform (5.0) 65E05472-6AE7-3308-8CC8-FA6CB0DB2AEE <12 11 7 6 5 4 3 1>
macbooks-air:~ macbook$ kextstat|grep -y appleintelcpu
macbooks-air:~ macbook$ kextstat|grep -y applelpc
macbooks-air:~ macbook$ kextstat|grep -y applehda
   99    1 0xffffff7f82f2c000 0x1d000    0x1d000    com.apple.driver.AppleHDAController (279.48) ED51F180-19C8-3DE1-AF81-0E389D98ADDE <98 97 73 12 7 6 5 4 3 1>
  118    0 0xffffff7f830ae000 0xb5000    0xb5000    com.apple.driver.AppleHDA (279.48) 806B8C17-50CA-3C6B-90B3-195F38D8FB89 <117 99 98 97 77 73 6 5 4 3 1>
macbooks-air:~ macbook$ ls -l /System/Library/Extensions/AppleHDA.kext/Contents/Resources/*.zml*
ls: /System/Library/Extensions/AppleHDA.kext/Contents/Resources/*.zml*: No such file or directory
macbooks-air:~ macbook$ pmset -g assertions
2017-10-20 00:21:27 -0400
Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    0
   PreventSystemSleep             0
   ExternalMedia                  0
   PreventUserIdleSystemSleep     0
   NetworkClientActive            0
Listed by owning process:
   pid 100(hidd): [0x0000069f0009812b] 03:08:23 UserIsActive named: "com.apple.iohideventsystem.queue.tickle.4294968003.3"
No kernel assertions.
Idle sleep preventers: IODisplayWrangler
macbooks-air:~ macbook$ system_profiler SPSerialATADataType|grep TRIM



macbooks-air:~ macbook$ sudo touch /System/Library/Extensions && sudo kextcache -u /
Password:
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Trackpad.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Mouse.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Keyboard.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Controller.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID_Broadcom_WiFi.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext BrcmPatchRAM2.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext BrcmFirmwareRepo.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext AppleBacklightInjector.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIBatteryManager.kext
KernelCache ID: 633CEABA3276187799A7C5268B568EF8
 

Attachments

Last edited:
Joined
Mar 6, 2014
Messages
16
Motherboard
HP 13-Y013CL Laptop / Clover Legacy
CPU
Intel i7-7500U
Graphics
Intel HD Graphics 620 / 3200 x 1800
No chance of installing the antenna in the screen/lid of Spectre X360 as its bonded ... you'd have to be very brave to even consider that.

I installed mine under the right hand cooling fan .... if you remove the three screws that hold the fan in place and lift it out of place you'll see the perforated vents (the ones with the funky laser cut patten either side of the keyboard) ... i always thought these where the speakers but they are not they are basically extra air vents.

With a fan removed you can easily position an antenna so that it has access the the side fan vent and the top keyboard vent then route the thin coax cable back to the DW1830 ... pretty straight forward. I removed the heat pipes as well while doing the install and repasted the CPU and GPU with high quality thermal transfer paste.

Top seed i've seen with this setup is around 1100Mbs if i'm within a few meters of my router ... it never drops below 878Mbs when i'm in the next room.

Cheers
Jay
Jay,
I had trouble with my BCM94352Z under Windows and Mac OS. It would not work at all under Windows 10 and the Bluetooth would not work under Mac OS. Once I taped the disable pins, everything worked flawlessly. Of course, I don't have the same motherboard as you as I have the 13-y013cl, but I don't think that should make a difference in this situation. I am glad you found a solution!
 

jaymonkey

Moderator
Joined
Aug 27, 2011
Messages
3,775
Motherboard
ASRock-Z97 EX6
CPU
i7-4790K OC @ 4.8GHz
Graphics
Vega 64LC + HD4600
Mac
MacBook Air, MacBook Pro
Mobile Phone
Android, iOS
Jay,
I had trouble with my BCM94352Z under Windows and Mac OS. It would not work at all under Windows 10 and the Bluetooth would not work under Mac OS. Once I taped the disable pins, everything worked flawlessly. Of course, I don't have the same motherboard as you as I have the 13-y013cl, but I don't think that should make a difference in this situation. I am glad you found a solution!
For me the BCM94352Z worked perfect without taping the pins in OSX & Linux, the Windows lockup/bsod issue is down to a old thread framework used by the driver which is based on the original mPCIe radio card spec which used interrupt lines that the ngff cards do not require.

The whole taping pins issue is down to the fact that the original spec for wireless ngff cards only had one disable line , then a few years later the spec was changed to two disable lines so that BT and Bluetooth could be disabled by hardware individually regardless of the operating system., the spec also specified that these lines should use pull-up resistors which the original spec did not.

Note that this is a hardware level disable function, the BT and WiFI can still be toggled on and off by software, it is also separate to the entire card power down and sleep/wake features which are controlled by other pins.

Unfortunately by the time the revision of the ngff spec was released manufacturers where already in production of mother boards and radio cards based on the original spec by which time toggling BT and WiFi on and off was already being done by software which has become the norm for 95% of systems out there ..

So now we are in a situation where we have both laptops and ngff radio cards based on a mix of specifications, with and without pull-up resistors, many laptops (almost all) do not support individual hardware toggling of BT & WiFi, the revised spec states that if there is no hardware toggling of BT/WiFI then the lines should be pulled low but not all manufactures follow the revised spec (at this time) so the disable lines can be left 'floating'

Since the ngff interface is controlled by the intel chipset, intel ensure that their radio cards match the spec being used by the chipset its paired with, which is why the majority of systems ship with intel radio cards .... unfortunately other manufactures of ngff radio cards (like Broadcom) have based their design on the mixed spec which is where the issue stems from.

So basically it boils down to this .... if you install a 3rd party ngff radio card and its not seen on the pci bus and its not being black listed by the BIOS then its most likely down to a logic line level issue with the disable lines on pins 54 & 56. Taping the pins isolates the lines from the chipset and thus the negates the logic line level issue (lack of or incorrect pull up resistors)

Hope this helps you and others understand the requirement for sometimes needing to tape the disable pins.

Cheers
Jay
 
Top