Broadcom wireless driver issue.

507 views
Skip to first unread message

qubesb...@4senditnow.com

unread,
Jan 27, 2019, 6:47:51 PM1/27/19
to qubes-users
o I’m trying to get wireless networking properly configured.
First I decided to do this by installing Fedora 29 as a main OS, since I supposed that if I get it working there, it should work in a Qubes Fedora 29-based VM, right? Well not so fast.
I got my BCM4331 working in the pure Fedora 29 OS by first enabling the RPM Free & Nonfree repos and then
# dnf install akmods "kernel-devel-uname-r == $(uname -r)" # dnf install broadcom-wl # dnf akmods then # reboot and boom, I have WiFi.
Now in the Qubes OS Fedora 29 Template VM, since this is the place we’re supposed to install drivers, I entered the first command and I got a No match argument error. So I decided to just modify this to install the package for the non-qubes kernel, i.e. # dnf install akmods kernel-devel-4.19.8-300.fc29.x86_64 . Installed successfully. Same with # dnf broadcom-wl
But if I run # akmods or # akmods force I get an error that says it has failed to build the wl-kmod for the 4.14.18-1.pvops.qubes.x86_64 kernel. I decide to change the command again to run for the other kernel and everything goes well :
# akmods --kernels 4.19.8-300.fc29.x86_64 Checking kmods exist for 4.19.8-300.fc29.x86_64 [ OK ]
But if I run the NetVM where the adapter is attached, it is listed in the $ lspci command but not in $ ip a or $ iwconfig. So if I get that right, the driver has been successfully configured for the 4.19.8-300.fc29.x86_64 kernel however it’s kind of pointless since the VM uses the 4.14.18-1.pvops.qubes.x86_64 kernel.
What am I supposed to do here? Try and find a way to have 4.19.8-300.fc29.x86_64 as TemplateVM's main kernel or install the drivers in 4.14.18-1.pvops.qubes.x86_64 one?

Someone on the /r/sub suggested I enable the latest ,unstable, kernels packages through dom0 along with some extra modules. I did that but I’m not sure what do I do next. Do I just run # dnf install whatever package I want installed? Everything seems to be properly installed (broadcom-wl, akmod-wl, kmod-wl) but # akmods still fails:
Building and installing wl-kmod [ FAILED] Building rpms failed; see /var/cache/akmods/wl/6.30.223.271-20-for-4.19.12-3.pvops.qubes.x86_64.failed.log for details


Here is the log https://pastebin.com/P17PmzDP

qubesb...@4senditnow.com

unread,
Jan 27, 2019, 9:46:53 PM1/27/19
to qubes-users
Extra info : I have already tried running a Fedora 29 TemplateVM then setting the default kernel as none in order to make it run the fc29.x86_64 kernel. I did the same with my sys-net VM and set its TemplateVM as the modified one. Unfortunately it did not work. While I got the kernels running on both machines and had already built the modules in the TemplateVM, first no device shows up when clicking the Network tray icon and if I run an $ lspci to the sys-net terminal the system just freezes conpletely. I have set the adapter to permissive mode and with the no-strict-reset option marked as true.

qma ster

unread,
Jan 29, 2019, 9:58:18 AM1/29/19
to qubes-users
Broadcom hardware/software is a proprietary piece of crap that doesn't work well at the opensource operating systems. It could be easier to just replace your Broadcom MiniPCIe card with something from Atheros ath9k family which has opensource drivers / opensource firmware and work perfectly almost everywhere. Just make sure that either your BIOS doesn't have a wifi whitelist or you know how to remove it / where to obtain a hacked BIOS with it removed (e.g. bios-mods site). E.g. check AR9462 miniPCIe card: 2.4GHz+5.0GHz 300 Mbps 802.11n Wifi, costs just 8 dollars at aliexpress with free shipping from china --> and problem solved
Message has been deleted
Message has been deleted

moore...@gmail.com

unread,
Feb 22, 2019, 12:11:15 PM2/22/19
to qubes-users
I have the same wireless chipset BCM4331 and just got it working. I'm using Qubes 4, Fedora 29, and kernel 4.19.15-1. Below are the steps to get it working. Make sure the pci card is detached.

On my system the BCM4331 card is dom0:04_00.0

Create a new vm, so we have the same settings. Use AppVM, fedora-29 as the template and check provides networking. Set your virtualization mode to HVM.

Start the vm and open a terminal.


[vm]
$ sudo dnf update
$ sudo dnf install gcc-plugin-devel bison flex patch
$ cp -r /lib/modules/($uname -r)/build /tmp/build
$ make -C /tmp/build gcc-plugins
$ git clone https://github.com/fabiomartino/broadcom-wl.git
$ cd broadcom-wl/
$ wget https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz
$ tar zxvf hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz
$ patch -p1 < linux-415.patch
$ make -C /tmp/build M=$PWD
$ sudo cp -a /lib/modules /rw/modules
$ sudo mkdir /rw/modules/$(uname -r)/kernel/drivers/net/wireless/broadcom/wl
$ sudo cp wl.ko /rw/modules/$(uname -r)/kernel/drivers/net/wireless/broadcom/wl/
$ sudo mount --bind /rw/modules /lib/modules
$ systemctl --no-block restart systemd-udevd
$ sudo depmod -a
$ sudo modprobe wl

Next you need to edit your /rw/config/rc.local file and add the following 4 lines:
mount --bind /rw/modules /lib/modules
systemctl --no-block restart systemd-udevd
rmmod b43 ssb bcma
modprobe wl

$ sudo chmod +x /rw/config/rc.local
$ poweroff


Add the pci card to the vm with permissive=true
[dom0]
$ qvm-pci attach --persistent --option permissive=true <vm-name> dom0:04_00.0
$ qvm-start <vm-name>

Now check to see if you scan for networks. With this card you cannot spoof the MAC address.

Ivan Ivanov

unread,
Feb 23, 2019, 1:58:34 AM2/23/19
to moore...@gmail.com, qubes-users
22 Feb 2019 at 20:11, <moore...@gmail.com> wrote:
>
> I have the same wireless chipset BCM4331 and just got it working.
>

Thank you for sharing your solution. Hope you understand that Broadcom
chips require the closed source binaries at firmware/drivers which
could contain the backdoors - and that is why they are not working
out-of-the-box (because this closed source stuff is a potential
security risk it is rarely preinstalled at distros). Personally I
think you should try your best to switch to a better card, e.g.
something from Atheros ath9k family - they are working with both open
source drivers and firmware , and there are good cards like AR9462
which support 2.4GHz/5GHz and 300Mbps

Best regards,
qmastery

q881329xj118roisam

unread,
Feb 27, 2019, 3:36:13 PM2/27/19
to qubes-users

You are a life saver!

I got close to quitting Qubes since I was not able to get the wifi working properly but everything is working great right now. Thanks so much!!

Though I'm a bit disappointed by my troubleshooting skills. Applying a patch for the driver never crossed my mind.

Ivan Ivanov

unread,
Mar 10, 2019, 10:13:57 AM3/10/19
to q881329xj118roisam, qubes-users
> I got close to quitting Qubes since I was not able to get the wifi working properly but everything is working great right now.

Glad for you ;-) Although the proper solution is to get rid of
Broadcom in favor of something better (like Atheros ath9k), also for
the security reasons...
Reply all
Reply to author
Forward
0 new messages