Sunday, January 25, 2015

Getting broadcom-wl driver working on Fedora 21 with akmod-wl - for BCM4312 Wireless

I upgraded to Fedora 21 from Fedora 20 a few hours back. Had issues with getting my wireless interface, Broadcom BCM4312 working on my eMachines E725 laptop. This is a known PITA wireless interface to work with. Posting my experience in getting things to work after some hair pulling moments.

tl;dr: running sudo yum install kernel-devel akmod-wl should fix the wireless problem (assuming you have enabled rpm-fusion).

The Trouble

I installed akmod-wl and it pulled a million dependencies and installed them all one by one. Usually this should be enough to get wireless working after  a quick restart of network manager (or a reboot for the noobs).
$ sudo yum install akmod-wl
I restarted network manager using
$ sudo systemctl restart NetworkManager
Problem: no wireless connectivity. I tried rebooting (takes a great deal of swallowing pride to do a reboot on Linux). Useless. Reinstalled akmod-wl. No effect. Rebooted again. No WiFi.

The Diagnosis

Checked if the module wasn't being loaded for some reason.
$ sudo modprobe wl
Got an error:
modprobe: FATAL: Module wl not found
ZOMG! Seemed like akmod wasn't building the kernel module for broadcom-wl driver. Ran the command
$ sudo akmods
This is supposed to rebuild all akmod-built modules if they haven't been built already. No effect. Seemed that for some reason akmod wasn't able to build broadcom-wl.

Next, I tried installing kmod-wl after removing akmod-wl to see if it works. Useless because kmod-wl in RPMFusion seemed to be for a newer version of the kernel (3.18.x) than the latest in Fedora 21 (3.17.x).

Looked up a documentation page on using akmods to see what was going wrong and why wasn't akmod working. Here is a google cache link to that page.

This page recommended some dependencies for akmod: kernel kernel-devel kernel-headers - wanted to double check if all of these are installed.
$ yum list installed kernel*
Noticed that kernel-devel was not installed. Realized that akmod-wl didn't declare a dependency on kernel-devel but it did pull in kernel-headers. Seemed like a missing explicit dependency. Time to remedy this!

The Fix

All I needed was a simple
$ sudo yum install kernel-devel
And now I did a
$ sudo akmods
Checking kmods exist for 3.17.8-300.fc21.x86_64            [  OK  ]
Building and installing wl-kmod                            [  OK  ]
$ sudo modprobe wl
Loaded successfully xD
$ sudo systemctl restart NetworkManager
Wireless works xD

PS: Here is an excellent thread in Fedora Forums on working with Broadcom wireless devices. Must read if you have a Broadcom wireless equipped laptop.


  1. Perfect. Thanks for taking the time to share.

  2. After installing kernel-devel. I am getting the following output from the command -sudo akmods

    Checking kmods exist for 3.17.4-301.fc21.x86_64 [ OK ]
    Files needed for building modules against kernel
    3.17.4-301.fc21.x86_64 could not be found as the following
    directories are missing:
    /usr/lib/modules/3.17.4-301.fc21.x86_64/build/Is the correct kernel-devel package installed? [FAILED]

    After that i tried to install kernel-devel-3.17.4-301.fc21.x86_64, but it isn't working either.
    What can I do now?
    Thank You!

    1. Hi there!

      Sorry for the delay in replying.

      That happens when you haven't installed the kernel-devel for the kernel you are building the akmods for. It is a bit hard to keep track of which kernel the akmods are being installed for so my suggestion is to install (and switch to) the latest available kernel and kernel-devel (manually confirm that the versions match) and then install the akmod for it.

  3. Sir, you just made my day. Now,thanks to this post,I have a completely operational Fedora 23 distro in my ACER Aspire E15 laptop. Thank you very much.

  4. Thank you very much. Now I have full WiFi connectivity in my Acer Aspire E15 laptop

  5. Thanks!!!!!! I tried it and everything looked to be fine but my wi-fi was not working still so I kept searching after a while I saw a post that said "First things first, right click on the Network Manager" so I went to the Network Manager and it was there!!! i just set-up my network and it worked properly, thanks again :D!