patjak / facetimehd

Reverse engineered Linux driver for the FacetimeHD (Broadcom 1570) PCIe webcam
GNU General Public License v2.0
1.36k stars 161 forks source link

Enabling facetimehd breaks wl #135

Open rberaldo opened 7 years ago

rberaldo commented 7 years ago

Hi! Amazing work you guys are doing here. I can confirm the webcam works on my MacBook Air 2017.

However, it breaks the Broadcom wl driver in Manjaro (and, presumably, Arch Linux). This laptop comes with the Broadcom BCM4360 wireless card, which requires the wl driver to work. Upon installing bcwc_pcie and loading the facetimehd during boot, the wl driver breaks and wifi is not available. rmmoding facetimehd doesn't fix the issue. However, if I backlist facetimehd and then modprobe it after the boot process is done, both drivers will live happily together.

Here are two excerpts from my journalctl which I think will prove informative:

Sep 04 01:53:12 volare kernel: facetimehd 0000:02:00.0: Direct firmware load for facetimehd/1871_01XX.dat failed with error -2                                                     
Sep 04 01:53:12 volare kernel: shpchp: Standard Hot Plug PCI Controller Driver version: 0.4                                                                                        
Sep 04 01:53:12 volare systemd-modules-load[193]: Inserted module 'facetimehd'

and

Sep 04 01:53:13 volare kernel: wl 0000:03:00.0: enabling device (0000 -> 0002)                                                                                                     
Sep 04 01:53:13 volare kernel: wl driver 6.30.223.271 (r587334) failed with code 1                                                                                                 
Sep 04 01:53:13 volare kernel: ERROR @wl_cfg80211_detach :                                                                                                                         
Sep 04 01:53:13 volare kernel: NULL ndev->ieee80211ptr, unable to deref wl  

For people who value context, the whole thing is here: https://paste.ee/p/wVhyE

It took me a while to realize it was facetimehd breaking my wifi, so I'd be happy to provide any help and info so we can, together, corner this bug and then squash it for once and for all.

WhyNotHugo commented 7 years ago

I ran wl and facetimehd for quite some time on a 2013 MBA, on Archlinux, so it doesn't seem to affect all scenarios.

Not sure if it's the distro, slightly older kernel (haven't had that laptop in like 6 months), or your specific wireless card.

rberaldo commented 7 years ago

I could be the kernel. I'm on 4.9.47, which is the current LTS. I'll investigate and report back if anything changes.

rberaldo commented 7 years ago

Kernel 4.13.0 does not always have this problem: of the four times I booted up the computer, only once did wl fail to load. modprob wl doesn't do any good; I have to reboot the machine.

xgnata commented 7 years ago

I got the same behavior a few times. "However, if I backlist facetimehd and then modprobe it after the boot process is done, both drivers will live happily together." Yes maybe there is something not fully correct in the driver implementation which disturbs the wifi card. It will be hard to know without the help of a real expert. As a workaround, one can tell the system to load facetimehd after completion of the wl loading process? Of course one can do that with a systemd timer which loads facetimehd let’s say 10s after the boot. I think it is even possible to check is wl is already loaded in the system timer system. Ugly but that should work...but is there a simple way to do that in /etc/modules/… ??

bhcopeland commented 6 years ago

Not able to use this driver anymore due to this bug. :(

arun-gurung commented 6 years ago

I have Linux 4.15 on Macbook Air and both facetimehd and wl are working together with no problems. Perhaps you should update your kernel and reinstall facetimehd and wl.

glutamatt commented 6 years ago

Context


😒 I had to remove facetimehd firmware and the bcwc_pcie driver to get my wifi card back to work

xgnata commented 6 years ago

What if you make sure facetimehd is loaded after wl? There must be something wrong in the facetimehd initialization whcih disturb the wireless card. We need someone who knows something about pcie drivers...

Le 8 avr. 2018 01:51, "glutamatt" notifications@github.com a écrit :

Context


😒 I had to remove facetimehd firmware and the bcwc_pcie driver to get my wifi card back to work

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/patjak/bcwc_pcie/issues/135#issuecomment-379507447, or mute the thread https://github.com/notifications/unsubscribe-auth/ADAlhYXHLv1IG-bS-3sOwwwL-cZEYMb8ks5tmVELgaJpZM4PLd8k .

glutamatt commented 6 years ago

What if you make sure facetimehd is loaded after wl?

I don't have any wl module : my wifi card is drived by the brcmfmac module (the issue title is not the exact context of my problem, but the root cause could probably be the same)

facetimehd and wifi used to work properly together until recently, I can't tell why it broke but it doesn't seem to be a kernel update : the only thing i'm sure is that _I had to remove facetimehd firmware and the bcwcpcie driver to get my wifi card back to work

xgnata commented 6 years ago

Even if you make sure that your wifi driver is fully loaded before facetimehd? Don't load it during the boot process and load it manually using modprobe. At least on my mac it used to work.

Le dim. 8 avr. 2018 à 22:29, glutamatt notifications@github.com a écrit :

What if you make sure facetimehd is loaded after wl?

I don't have any wl module : my wifi card is drived by the brcmfmac module (the issue title is not the exact context of my problem, but the root cause could probably be the same)

facetimehd and wifi used to work properly together until recently, I can't tell why it broke but it doesn't seem to be a kernel update : the only thing i'm sure is that I had to remove facetimehd firmware and the bcwc_pcie driver to get my wifi card back to work

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/patjak/bcwc_pcie/issues/135#issuecomment-379580078, or mute the thread https://github.com/notifications/unsubscribe-auth/ADAlhU0Bv0NtofHddB0TRh5EF75c_9X3ks5tmnNDgaJpZM4PLd8k .

jm355 commented 6 years ago

Had the same issue with Linux 4.16.1-1-MANJARO and brcmfmac on my 2015 macbook pro. How would you go about making sure the wifi driver is fully loaded before facetimehd?

xgnata commented 6 years ago

Don't put anything facetimehd related in /etc/modules or /etc/modules-load.d or whatever the name is in your distrib. Reboot. The facetimehd module should not be loaded automatically and your wifi should work. Once you have your wifi up and running, you can try : modprobe facetimehd

It is not an automated method but, if it work, there are ways to automatise.

Le mar. 10 avr. 2018 à 23:08, Jerry notifications@github.com a écrit :

Had the same issue with Linux 4.16.1-1-MANJARO and brcmfmac on my 2015 macbook pro. How would you go about making sure the wifi driver is fully loaded before facetimehd?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/patjak/bcwc_pcie/issues/135#issuecomment-380247333, or mute the thread https://github.com/notifications/unsubscribe-auth/ADAlhXpttONBoJ8hfVU5JPW9PtZDKCk_ks5tnR9jgaJpZM4PLd8k .

glutamatt commented 6 years ago

so it broke down on its own, and suddenly, it "repaired up" on its own ✨

arch package version
bcwc-pcie-git version r254.a22f248-2
facetimehd-firmware 1.43.0-1
linux kernel 4.14.34-1

👌