"Modaliases" field missing from debian control file

Bug #1490212 reported by Adam Smith
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
b43-fwcutter (Ubuntu)
Expired
High
Unassigned

Bug Description

The b43 module is not listed as an option by the "additional drivers" section of the software-properties-gtk utility. This takes its information from the ubuntu-drivers-common package and a bug has been reported against that package (https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1186779 ).

However, if I'm reading things correctly, the firmware-b43-installer package could solve this by providing a modaliases field in the debian control file. For example, the bcmwl-kernel-source package has the line:

Modaliases: wl(pci:v000014E4d*sv*sd*bc02sc80i*)

This would be scanned by the ubuntu-drivers-common package and consequently appear in software-properties-gtk.

Tags: patch
Revision history for this message
Adam Smith (adamsmith) wrote :

So I've looked into this some more and the theory is sound. There are, however, a few stumbling blocks.

The first is software-properties-gtk is a bit rubbish because it doesn't provide much feedback about the package installation process. So if the firmware download fails then the firmware-b43-installer package is left in an unconfigured state, but the user is unaware of this. When you re-run the software-properties-gtk utility, the package is incorrectly marked as being used. There is even no error message when the download of the firmware-b43-installer package fails. So the user if left thinking "why isn't this working?". A message saying "please check your internet connection" is badly needed.

The modaliases line used by the wl driver captures the whole sweep of broadcom cards. So people with unsupported cards are told to install it. Gosh, no wonder people have so many problems with broadcom! When they install wl this automatically blacklists and removes the b43, ssb, bcma, etc modules. This adds to the next problem: what modaliases should firmware-b43-installer use?

Running the command:

modinfo b43 | perl -nae 'print "alias $1 b43\n" if /^alias:\s+(.*)$/'

gives

alias bcma:m04BFid0812rev1Dcl* b43
alias bcma:m04BFid0812rev18cl* b43
alias bcma:m04BFid0812rev17cl* b43
alias bcma:m04BFid0812rev11cl* b43
alias ssb:v4243id0812rev10* b43
alias ssb:v4243id0812rev0F* b43
alias ssb:v4243id0812rev0D* b43
alias ssb:v4243id0812rev0C* b43
alias ssb:v4243id0812rev0B* b43
alias ssb:v4243id0812rev0A* b43
alias ssb:v4243id0812rev09* b43
alias ssb:v4243id0812rev07* b43
alias ssb:v4243id0812rev06* b43
alias ssb:v4243id0812rev05* b43

These aliases work for ubuntu-driver/software-properties-gtk until you blacklist b43/ssb/bcma or you rmmod them (like wl does). Then they are not found and the package is not matched. What we really need are aliases starting with pci, but how do we get these and correctly seperate them into the firmware-b43-installer and firmware-b43legacy-installer packages, accounting for revision numbers etc? I have to ask, but whose idea was it to create these seperate packages?! They've caused so much mayhem!

Also, in the modaliases file (e.g. debian/firmware-b43-installer.modaliases) you can't use the name of an existing module (e.g. alias blahblahblah b43). If you do this the software-properties-gtk will not budge from the 'continue running a custom installed module' option. For testing I ended up using a file like so:

alias pci:v000014E4d*sv*sd*bc02sc80i* firmware-b43-installer

The final problem is with the b43 installer scripts. They don't rmmod/modprobe the b43/b43legacy modules therefore requiring a system reboot. Again, the user is not informed to do this. This feature should be added to the scripts.

Revision history for this message
Adam Smith (adamsmith) wrote :

The attached is a simple patch. The modaliases files could be generated automatically by the debian rules file. It would work better if there weren't seperate b43/b43legacy packages and we could use the same alias as wl does.

Revision history for this message
Adam Smith (adamsmith) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Basic modaliases patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Adam Smith (adamsmith) wrote :

The attached tells software-properties-gtk and the user that a reboot is needed after any changes to firmware.

Revision history for this message
Adam Smith (adamsmith) wrote :
Revision history for this message
Adam Smith (adamsmith) wrote :

While we're at it, lets delete the directory properly.

Revision history for this message
Adam Smith (adamsmith) wrote :

A few more observations about my basic modaliases patch..... the aliases beginning ssb/bcma are inferior. In software-properties-gtk the vendor and model are listed as unknown. Aliases beginning with pci can be generated from the ssb/bcma module aliases, but like I said above, I don't know how to split them into the b43/b43legacy packages.

I would highly recommend the the b43legacy package being turned into a dummy package, and letting the firmware-b43-installer package install the legacy firmware when appropriate. The two packages cause much confusion. For example, this highest voted answer on AskUbuntu gets it wrong http://askubuntu.com/questions/55868/installing-broadcom-wireless-drivers/60395#60395

Revision history for this message
Adam Smith (adamsmith) wrote :

Adding software-properties to the party since much of this involves them.

affects: software-properties → software-properties (Ubuntu)
Revision history for this message
Adam Smith (adamsmith) wrote :

Mintdrivers (based on software-properties-gk) has a few interesting commits:

There is one about firmware - https://github.com/linuxmint/mintdrivers/commit/c443ecd54310d7e521d57b214bcbfb7979fe4c66

One requesting an internet connection - https://github.com/linuxmint/mintdrivers/commit/6ff0dd4d102c078c319b3910ccdbf21ea8fc55d6

Revision history for this message
Adam Smith (adamsmith) wrote :

FYI for anyone requiring background information on all this, the support of cards and a list of PCI ID's is here https://wireless.wiki.kernel.org/en/users/Drivers/b43

Revision history for this message
Adam Smith (adamsmith) wrote :

Back onto software-properties-gtk, the "this device is not working" is very unreliable. I'm not sure how it works this out, but it doesn't seem to account for the firmware being manually installed or through e.g. the linux-firmware-nonfree package which also contains b43 firmware.

Revision history for this message
Adam Smith (adamsmith) wrote :

Attached is a patch to make firmware-b43legacy-installer a dummy package. The patch also includes and improves all the other patches I've listed.

The only problem I've found is due to the debconf value b43-fwcutter/install-unconditional and if this is true it now installs both lots of firmware. I can't really get my head around why b4-fwcutter sets this value, but there is no harm in both lots of firmware being present, and indeed it is what b43-fwcutter used to do in lucid days I believe. The readme file also says "It is recommended that you extract firmware for both b43 and b43legacy in order to support both types of cards on your system." so I'm not sure why we test for the type of firmware needed.

Revision history for this message
Adam Smith (adamsmith) wrote :

The modalias file was generated from the aliases of the ssb and bcma modules. I suppose I should of taken out the pci ids listed as not being supported ( https://wireless.wiki.kernel.org/en/users/Drivers/b43 ). Oh well, for another day maybe, but I think all this effort is going to go to waste anyway and I'm just talking to myself here!

One odditity I did notice was

alias pci:v000014A4d00004318sv*sd*bc*sc*i* firmware-b43-installer

Note it is 14A4d not 14E4d like the others....dunno what all this is about!

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Adam,

Generally this looks pretty good; but let's focus on just the modaliases issues for this bug. Can you file separate bug reports for the other problems?

As for software-properties, I suspect there are probably no issues there; everything can be fixed by modifying just b43-fwcutter (by the look of things).

I'm adjusting the bug status accordingly.

Changed in software-properties (Ubuntu):
status: New → Invalid
Changed in b43-fwcutter (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Adam Smith (adamsmith) wrote :

Thanks Mathieu for your interest in this.

If you use a patch similar to that in comment #2 then yes you could argue that is good enough to fix this (but it is much better to tell the user a reboot is needed too). However, it is not optimal. If you use modalises as in comment #13 then I think that needs changes in software-properties or yet more changes to the b43 installer package.

The problem is if people are experimenting, installing, removing then reinstalling the b43 installer package, they could be in the situation that the package is in the apt cache and can be installed without an internet connection. The download of the firmware will fail without an internet connection, but the user has no way of knowing this thanks to the fix in debian bug 781544

Now you could solve this by not deleting the firmware when the b43-firmware-installer is removed, and only delete it when it is purged. That seems to make sense to me and I probably should of thought of it before.

There is no point adding the modalises, without the other fixes, otherwise it is going to cause problems.

Revision history for this message
Adam Smith (adamsmith) wrote :

FYI, the reboot patch in comment #5 needs a slight adjustment because the commands are being run from a deleted directory/folder. I fixed this in the combined patch in comment #13.

Revision history for this message
Adam Smith (adamsmith) wrote :

I can provide a patch for what I was saying in comment #16, but I think it is just a one liner in the two postrm files. I think it would be sensible for software-properties-gtk that the firmware is only deleted when the package is purged. This, modaliases in comment #2 and a reboot patch would be an acceptable solution to this bug.

Revision history for this message
Martin Pitt (pitti) wrote :

Subscribing kernel team. Is this driver really something which we should offer to users via graphical means (and thus make it very easy)? It seems we've had three drivers (b43 with fwcutter, bcmwl, and now the relatively new bcma one). Which of these do we actually still support? We can't expect that users are qualified to pick between these three, that's our job.

Changed in b43-fwcutter (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Martin Pitt (pitti) wrote :

Unsubscribing sponsors for now. Let's please not change this until we have some clarity about the broadcom drivers.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for b43-fwcutter (Ubuntu) because there has been no activity for 60 days.]

Changed in b43-fwcutter (Ubuntu):
status: Incomplete → Expired
Mathew Hodson (mhodson)
no longer affects: software-properties (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.