acidanthera / bugtracker

Acidanthera Bugtracker
385 stars 45 forks source link

[AirportBrcmFixup.kext] Bad rate/speed on 5 GHz on BCM94360NG when coldbooting #1532

Open kushwavez opened 3 years ago

kushwavez commented 3 years ago

The problem:

1137644367_Kpernyfot2021-01-22-11_25_34 png b4f69432b25898c1e098a3cf3c931f8c 1063271302_Kpernyfot2021-01-22-11_25_23 png cf169475cc230dbd86a4eba151f47c02

866win PNG cf14d6f4faefa1fe5588e20f0ceb0b4b

The interesting thing:

1061714981_Kpernyfot2021-01-22-11_30_09 png 3d45b9cadabc3a6fad045b9c1bf836361966641297_Kpernyfot2021-01-22-11_30_45 png 30c7535f89b961fe55aff18478fa7c25

Tried things:

Environment: 1. RT-AC66U - Original Up-to-date FW - 80 MHz/channel 44, notebook is 3 metres away

2. RT-AC66U - FreshTomato custom FW (2020.8) - 80 MHz/channel 151, notebook 3 metres away

3. RT-AC56U - DD-WRT FW v3.0-r44772 std (11/11/20) - 80 MHz/channel 112, notebook 1 metres away

Lastly:

Spec: Lenovo X1 Carbon 6th i5-8250U 8 GB DDR3 OC 0.6.6 macOS Big Sur 11.2.2

Attaching zip with logs/efi airport_logs_restartfromwin.zip airport_logs_cold_boot.zip

lvs1974 commented 1 year ago

I overrided one more method: int64 _wlc_ratespec_nss(int)

Pleas check whether this method is called. AirportBrcmFixup-2.1.7-DEBUG.zip

CobanRamo commented 1 year ago

i will test and report

CobanRamo commented 1 year ago

something has changed in the log but the result for me is still NSS 1 with a cold start.

I'm about to do a windows boot with kext 2. I've been using driver version 7.35.295.2 for a few hours. Log mit Kext 1 ColdBoot.txt Log mit Kext 2 ColdBoot.txt

Bildschirm­foto 2023-03-12 um 12 50 03

CobanRamo commented 1 year ago

I noticed something if it helps. It is the "STBC" function that is missing if you no longer have NSS2. NSS 1

NSS 2

CobanRamo commented 1 year ago

here is the result after a windows boot, kext 2

Bildschirm­foto 2023-03-12 um 13 05 39

Log mit Kext 2 Boot after Windows.txt

lvs1974 commented 1 year ago

So, all these NSS methods are called only if we boot after Windows (with specific version of driver). And there is only one exception so far - @m0d16l14n1. In his case getNSS is called regardless of previous windows boot.

CobanRamo commented 1 year ago

can it be that this brcmfx-country code has an influence on it? So if we have the same cards, I don't quite understand why it works for him and not for me.

I'll try it out without device properties.

lvs1974 commented 1 year ago

@CobanRamo: I don't think country code can affect on NSS. But who knows...

CobanRamo commented 1 year ago

No, it doesn't matter, apparently there is something in the MacOS driver that is activated with Windows Driver version 7.35.295.2 and remains until a cold start has been carried out. After that it is no longer there, I think Apple wants to tell us that it is not the same with the same chip as with the original device ;-)

lvs1974 commented 1 year ago

I think the only difference - built-in NVRAm variables in broadcom cards. They can be initialised differently. And Windows can set something in Broadcom's NVRAM.

CobanRamo commented 1 year ago

https://patchwork.kernel.org/project/linux-wireless/patch/20180311214751.12769-1-hdegoede@redhat.com/

interesting approach, whether something like this is feasible?

CobanRamo commented 1 year ago

an alternative insight. I once deactivated all kextes, took out all device properties. A cold boot to MacOS result as expected, NSS 1, then turned off.

Cold boot to Ubuntu LTS via OpenCore, with the Linux BroadCom Driver the NSS 2 is there too. Counter-check to the router also shows that it is full speed. Check from Fritzbox

Now a warm boot to MacOS and voila, NSS 2 is back. warmboot from Ubuntu

Maybe that's a starting point, I think we could see more in the Linux driver what's different there. So it's not just Windows Driver, with Linux Driver we can create that too.

kushwavez commented 1 year ago

sorry, the laptop in my original post is sold with that card too.

Now I have the same X1 Carbon 6th just with i7 and 16 GB RAM. I am using BCM94360CS2. Interestingly, it does the same and is having NSS 1 instead of 2 and I have about 20 MB/s speed. But it Is the same on Windows too..

Moreover I have a PC too with an original BCM94360CD card with 4 antennas and that also has NSS 1 with limited speed. Not sure if it is something has to do with macOS drivers, but with my another laptop, X1 Extreme with Intel card I have NSS 2 and a very good speed (~60MB/s). My another laptop with WiFi6 is reaching the cap (so 125 MB/s), so with that I could eliminate any network issues. Maybe these cards are just not that good.

m0d16l14n1 commented 1 year ago

https://patchwork.kernel.org/project/linux-wireless/patch/20180311214751.12769-1-hdegoede@redhat.com/

interesting approach, whether something like this is feasible?

I don't have Linux installed right now, but AFAIK brcmfmac is not used for our BCM94360NG card. I don't remember the full name of driver, but it's for sure has "wl" in it's name.

Maybe that's a starting point, I think we could see more in the Linux driver what's different there. So it's not just Windows Driver, with Linux Driver we can create that too.

If you have time and knowledge, can you check if there any settings or configuration we can manually change via driver side on Linux? I will try to play with driver settings on Windows, maybe it's possible to find one-by-one that "magic" setting/value which is making NSS=2 happen on macOS after rebooting from Windows. Btw, do you have any difference in logs between reboot from Windows to macOS and Linux to macOS? Did you check them?

P.S. Sorry, i didn't see your replies above somehow! I will surely test setting on Windows version of driver, will check if there is something like that would appear in macOS and logs. Sorry ^_^

Interestingly, it does the same and is having NSS 1 instead of 2 and I have about 20 MB/s speed. But it Is the same on Windows too.. Moreover I have a PC too with an original BCM94360CD card with 4 antennas and that also has NSS 1 with limited speed. Not sure if it is something has to do with macOS drivers, but with my another laptop, X1 Extreme with Intel card I have NSS 2 and a very good speed (~60MB/s).

If you have time you can try to test that kext version above. Not sure, but it's might be possible to install driver on Windows to achieve NSS=2 on macOS after hot reboot.

+++++++++++++++++++++++++++++++++++++++++++

logs with wlc_reatespec.zip

Logs with using new build, cold booted macOS (overriding NSS=1 to 2) ^^^^

test_newNSS2_hotreboot.zip

Logs after hot reboot from Windows to macOS ("native" NSS=2) ^^^^

lvs1974 commented 1 year ago

I am not ready to dig deeper into linux sources now. What I can easily do - call AirPort_BrcmNIC::setTX_NSS with NSS=2 from method start. May be this will work... AirportBrcmFixup-2.1.7-DEBUG.zip

m0d16l14n1 commented 1 year ago

I am not ready to dig deeper into linux sources now. What I can easily do - call AirPort_BrcmNIC::setTX_NSS with NSS=2 from method start. May be this will work... AirportBrcmFixup-2.1.7-DEBUG.zip

Need some time to test the actual difference between speed results and compare.

test_setTX_NSS2.zip

CobanRamo commented 1 year ago

Nothing has changed for me either, unfortunately. Log from Cold Start_ Kext 3.txt wlan

anonymous-writer commented 1 year ago

The driver for UBUNTU may not help. I would like to post it anyway. With this driver the BCM94360NG works under UBUNTU with NSS2. After restart to Ventura also there with NSS2.

https://launchpad.net/ubuntu/+source/bcmwl Ubuntu_Driver.zip

dikamsiyoung commented 1 year ago

I overrided one more method: int64 _wlc_ratespec_nss(int)

Pleas check whether this method is called. AirportBrcmFixup-2.1.7-DEBUG.zip

Hi, I use the BCM94360NG, Ventura 13.3.1, OpenCore 0.9.0

And I get NSS=2 on every reboot with this kext. However, it only activates 2.4GHz. Once I toggle wifi, it resets to NSS=1 and 5GHz.

I am not ready to dig deeper into linux sources now. What I can easily do - call AirPort_BrcmNIC::setTX_NSS with NSS=2 from method start. May be this will work... AirportBrcmFixup-2.1.7-DEBUG.zip

This kext switches to 2.4GHz with NSS=2 over 5GHz NSS=1 even after I toggle wifi.

image image
anderson26041 commented 1 year ago

At first, wanted to sorry about my English. I also have brought this card from the Fenvi's Official Seller from Aliexpress, I'm trying to use it in Brazil, everything works awesome with this card, however, can confirm it only works with NSS=1 in macOS when it is running over 5Ghz, we also have a lot of Brazilian YouTubers recommending to use other cards instead but I already have bought this one. In my setup (Acer Aspire E5-573) running Ventura 13.3.1, without any kext (as it is supposed to be, because this card is native) it stuck getting NSS=1 and only running at max speed of 434mbps, although, the speed is even lower and the max I could get changing routers channel, width and everything was getting speeds of ~200mps download and speed (although macOS showing 434mbps). My internet provider gives me 500mbps and through cable the speed in tests is a little higher (about ~520mbps or even more). Really disappointed about the speeds, Airdrop, BT and WI-FI works, but the speed is perfect only when running Windows, where I can get the max speed my provider has. Really hopping to the team to get a fix for this card, I just bought it because of Dortania's guide and, although it really is a native card, there is bugs when running macOS. I could even tell that the NSS=1 it is not the only bug, because in my setup the card is even at lower speeds when it is with low usage, kind of a power issue, because after running two speed tests the results are always better that running a single one. Couldn't getting NSS=2 after warm boots from windows.

I'm available to send debugs and texts kexts if any developer is trying to fix this card, although I do need some instructions about which information is needed and how to provide it.

That's all folks, really sorry about my English, I've been learning it by myself and this post was written without any text corrector.

m0d16l14n1 commented 1 year ago

Couldn't getting NSS=2 after warm boots from windows.

Use the driver for Windows which i sent above, that will fix the speed result from warm boot after Windows. There is no way to fix it for now. You can also use warm reboot from Ubuntu with proprietary Broadcom driver installed.

alarifgit commented 1 year ago

Couldn't getting NSS=2 after warm boots from windows.

Use the driver for Windows which i sent above, that will fix the speed result from warm boot after Windows. There is no way to fix it for now. You can also use warm reboot from Ubuntu with proprietary Broadcom driver installed.

Can confirm that this is what got my NSS=2 working in MacOS, I was previously using the latest driver from the Fenvi website. However, I do have to be quick when rebooting into MacOS from Windows or Linux, since as soon as I log into either the laptop freezes.

sonvirgo commented 1 year ago

this is very old known bluetooth problem for as long as 10 years. you all seems only know how to shout out loud and shout out loud.

CobanRamo commented 1 year ago

@sonvirgo what you say applies to the bluetooth, this is about WiFi, especially for WiFi 5 Ghz. (Bluetooth is 2.4Ghz.) ;) Ergo, you will also have noticed that it is about the MacOS internal Wifi driver that cannot initialize the NG card correctly.

sonvirgo commented 1 year ago

@sonvirgo what you say applies to the bluetooth, this is about WiFi, especially for WiFi 5 Ghz. (Bluetooth is 2.4Ghz.) ;) Ergo, you will also have noticed that it is about the MacOS internal Wifi driver that cannot initialize the NG card correctly.

wifi need firmware though you see in linux, brcm wifi card need 3rd party package there is possibility that the issue is same as bluetooth firmware symptom also same as someone said warm boot from windows or linux fix this if I was you, I would close the issue flooded by lazy guys

CobanRamo commented 1 year ago

@sonvirgo You're apparently so smart that you don't know the difference between firmware and drivers. Please let the lazy people tinker with it, because they can solve problems if smart people like you don't interfere.

sonvirgo commented 1 year ago

@sonvirgo You're apparently so smart that you don't know the difference between firmware and drivers. Please let the lazy people tinker with it, because they can solve problems if smart people like you don't interfere.

You don't understand what you are writing, that you don't know driver include firmware. if the problem is correctly firmware related. The then still you say I have been interfereing you :D ? or you just pretend to forget what you said? let's make a bet. dare you :D

ameenjuz commented 1 year ago

did anyone find the solution for BCM94360NG WIFI Card Nss-2 5G speed?