openSUSE 13.2: Day-1 troubles and troubleshooting – VLC, wireless etcetera

Spent a considerable amount of time yesterday, configuring the system to my liking. Installed Virtualbox and VirtualBox Extension Pack to run the various virtual machines I have. Installed VLC hoping to watch a couple of movies during the weekend. Had a wonderful time installing wireless Broadcom BCM43228 driver.

Wireless troubled me again. I have not automated the loading of the wl.ko driver which I compiled yesterday using Broadcom sources. What I do is:

sudo modprobe lib80211
sudo modprobe cfg80211
cd <Path where the wl.ko driver is>
sudo insmod ./wl.ko

I tried loading the wl.ko driver using modprobe but wireless did not work. Do not know why. Need to learn more about it.
Well, wireless worked once the drivers were loaded. But today wireless stopped working. I was not able to connect at all. The NetworkManager notifier provided a list of available connections. So, wireless driver was fine. I removed the wireless connection from the NetworkManager UI and added it again by filling all required values. Wireless is back in business.

With wireless troubles decimated, I tried to launch VLC. No matter what file I chose, I was greeted by errors only. The codecs were missing. So, I did the following:

sudo zypper in vlc-codecs

Now VLC has got rid of its dementia. Maybe, I will go ahead and watch a couple of movies.

openSUSE 13.2 and Broadcom BCM43228 wireless: Driver woes in the Linux world

openSUSE 13.2 arrived in the beginning of November 2014. I was a bit too busy to try it. I found some free time yesterday and utilized it to install openSUSE on my workstation.

My workstation is a Dell Optiplex 9020 with i7-4770 CPU, 32 GB RAM and Broadcom BCM43228 based Dell 1540 wireless module. I managed to avoid the Microsoft Windows tax because Dell was savvy enough to ship me a machine with Linux (Ubuntu) preinstalled.

The driver for the said wireless module was already available in Ubuntu. So, when I received the machine everything was working like clockwork. I wanted to remove Ubuntu but I also wanted to avoid hunting down the drivers in the World Wide Web. Disappointingly, openSUSE did not have the driver binary in its repositories. I tried Manjaro as it was the only other distro that boasted of precompiled binaries for Broadcom BCM43228. Manjaro did not disappoint me.

For some reason, I like openSUSE more than all the other distros. I really do not know why. So, I decided to do whatever it would take to get openSUSE working on my workstation.

I searched and found that Broadcom provides the source code for the following modules:

BCM4311-, BCM4312-, BCM4313-, BCM4321-, BCM4322-, BCM43224-, and BCM43225-, BCM43227- and BCM43228-based hardware

Make sure that your device is in the above list. To detect the device ID, do the following:

sudo lspci | grep "Broad"
 04:00.0 Network controller: Broadcom Corporation BCM43228 802.11a/b/g/n

To build any kernel module, the following packages are necessary. I had downloaded them earlier to compile the vbox driver for Virtualbox:

sudo zypper in kernel-devel gcc make

I downloaded the 64-bit version of the source. The README.txt (available for download on the Broadcom website) is an utterly important document. Read that carefully.

I started the compilation and found some errors:

<path to the extracted source>/src/wl/sys/wl_cfg80211_hybrid.c:2074:4: error: too few arguments to function ‘cfg80211_ibss_joined’ cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);

There is a solution to this problem. Look for the following file in the extracted Broadcom source code:

<path to the extracted source>src/wl/sys/wl_cfg80211_hybrid.c

Now, look for the following line:

cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);

Replace the above line with the following piece of code:

cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, &wl->conf->channel, GFP_KERNEL);
cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);

Evidently, the Kernel API has changed and the code is not compatible with it. Compile again.

It worked fine for me and I had a driver ready to be deployed in quick time.

I just hope Broadcom fixes this issue and releases the updated code.

Further Reading:

How to load the wl.ko driver