The r8188eu kernel module does not depend on the rtlwifi/rtl8188eufw.bin firmware file in the 20.04 HWE kernel

Asked by Grzegorz Szymaszek

I would like to use a Wi-Fi card supported by the r8188eu kernel module in the initramfs, in Ubuntu 20.04. I add the module using a custom initramfs-tools hook. My problem is that there is a difference in the firmware dependencies of the module between the standard 5.4 kernel and the current HWE 5.15 kernel: in 5.4, the module depends on /lib/firmware/rtlwifi/rtl8188eufw.bin, while in 5.15 it no longer does so (and the latter seems to be the case in Debian bookworm (kernel 5.18.5 at the time of writing) as well). You can verify it using `modinfo -F firmware r8188eu` (perhaps with the `-k` parameter if you do not want to check the currently run kernel).

The card requires the mentioned firmware file. In order to use it with both kernels, in addition to `manual_add_modules r8188eu`, I have to put something like `copy_file firmware /lib/firmware/rtlwifi/rtl8188eufw.bin` in my initramfs-tools hook.

Since there is some inconsistency between the two supported (?) kernels in the same Ubuntu version, should I report a Ubuntu bug? Could someone point out the relevant upstream (in the Linux kernel I guess) change?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu linux-meta-hwe-5.15 Edit question
Assignee:
No assignee Edit question
Solved by:
Grzegorz Szymaszek
Solved:
Last query:
Last reply:
Revision history for this message
Grzegorz Szymaszek (gszymaszek) said :
#1

From bisecting the kernel it seems there was the older rtl8188eu driver, which was deprecated when the newer r8188eu driver was introduced, and removed exactly (!) a year ago in commit 55dfa29b43d23bab37d98f087615ff46d38241df (https://<email address hidden>/). The removal was apparently applied to v5.15-rc1 and (!) v5.15 is the Ubuntu 20.04 HWE kernel.

The old driver included the code `MODULE_FIRMWARE("rtlwifi/rtl8188eufw.bin");` (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/staging/rtl8188eu/os_dep/os_intfs.c?id=06889446a78fb9655332954a2288ecbacc7f0ff8#n22), which caused the module to require the mentioned firmware file. The new driver does not contain such code and so the new module does not require the firmware file. Whether it should, is a question to be asked upstream I guess.

The first question remains open and I think I cannot answer it: since there is some inconsistency between the two supported (?) kernels in the same Ubuntu version, should I report a Ubuntu bug? If I would report the bug and if someone would like to get it fixed, a possible fix would be to simply add the mentioned MODULE_FIRMWARE call to the new driver.

Revision history for this message
Manfred Hampl (m-hampl) said :
#2

Are you really surprised that there are differences between the 5.4 and the 5.15 version of the kernel?

A difference between version 5.4 of a package and version 5.15 is not an inconsistency, but further development.

If the new version misses the reference to the correct firmware file, then this is an error that should be reported as a bug.
Based on the names of the files I would not expect that the r8188eu driver needs a rtl8188eu* firmware, but I may be wrong with that assumption.

Revision history for this message
Grzegorz Szymaszek (gszymaszek) said :
#3

Thanks for your response. I’m happy with kernel’s ongoing developments and I understand some changes may be incompatible with some past expectations.

I cannot say whether this kernel change is a regression or not, I have asked the driver maintainers, hopefully they will find some time to answer. If they decide it is a regression, it would be nice to fix it upstream and backport the fix to the HWE kernel. But even if not, I think in this specific case, “inconsistency” is a correct description from 20.04 user’s point of view.

Revision history for this message
Grzegorz Szymaszek (gszymaszek) said :
#4
Revision history for this message
Manfred Hampl (m-hampl) said :
#5

"The fix landed in Linux 5.15.66. I’ve created a bug report from this question."

There are regularly new kernel versions published for Ubuntu.

As far as I can see from the changelog, for Ubuntu focal the current HWE-5.15 kernel version 5.15.0.46.49~20.04.16 is based on the v5.15.39 upstream stable release of the kernel . The version in focal-proposed (5.15.0.48.54~20.04.18) is based on v5.15.53

I assume that one of the next releases of the Ubuntu kernels will be based on v5.15.66 or later and will contain the correction for the rtl firmware.

Just be patient.

Revision history for this message
Grzegorz Szymaszek (gszymaszek) said :
#6

Thanks for checking the versions. I’m not in hurry, I wanted to give an update (for anyone interested in this issue) on how things are going upstream.