A route to better WiFi performance with Realtek rtl88x2bu chips

Continuing the discussion from RTL 88 wireless driver in Pure Kernel?:

Current Librem (in my case, 15v4) equipment is limited to 802.11n by Purism because of a lack of FLOSS drivers for better chipsets. In my experience it performs okay, but it could be better.
I recently noticed that M.2 chips with the rtl88x2bu (where x is 1 or 2) chips are available. Like these:


https://www.embeddedworks.net/wlan742/

I know from prior experience there are a few at least open-source (if not FLOSS) rtl88x2bu drivers out there, like:


I’m pretty sure it contains no blobs and doesn’t pull any in, but I haven’t checked carefully.

Could I buy one of those chips, pop it in, build the driver, and use it? Has anyone else done this? Should I expect performance improvements? Is there something I’m missing (I know some people have been frustrated by Librem wifi performance, why haven’t they done this?)?
Is there a whole assortment of chips we could use that have open source but not FLOSS drivers that I’ve so far been unaware of?

1 Like

My thought at the time was: if the “download random driver source” is any good, why isn’t it in the kernel already? As at kernel 5.4 I believe that driver is not in the kernel.

However I suppose that some open source driver as a starting point is better than nothing if Purism specifically wanted to take the time to verify, test, debug, etc.

Over the years, there have been dozens of open source, free drivers which were never mainlined for one reason or another. Often it’s because, while the license is free, it’s not GPL-2-only compatible. Sometimes it is because of unclear patent issues, such that the Linux foundation doesn’t want to risk redistributing the source code. Sometimes it is due to lack of a clear maintainer, or using legacy kernel APIs. This is often the case with vendor-supplied drivers, where they only officially support LTS kernels, and never try to get them upstreamed.

Bottom line is you’d have to look at the actual driver in question, and check the LKML to see if there’s any information on why it wasn’t upstreamed. If the driver license is not GPL compatible, that’s a pretty clear reason. It means it’s fine to distribute out of tree (assuming it’s some other open source license, like some variant of CC), but won’t get into the kernel tree unless the copyright holder issues it to the Linux foundation under a GPL2 compatible license.

5 Likes

Per the above link

cilynx/rtl88x2bu is licensed under the GNU General Public License v2.0

Is that good or bad? Seems OK to me.

That would be the same license as the Linux kernel itself, so that can’t be why it hasn’t been mainlined… It’s good in that it means whatever code issues exist to keep it from getting mainlined can be fixed, and it could then get mainlined. It’s possibly bad in that it might mean there are technical issues which kept it from getting mainlined…

Actually the problem might have been the license. The code was put in 6 to 8 months ago but the license was only put in 17 days ago. Perhaps there is hope yet?

4 Likes

I didn’t know, that a AC-card exists with opensource drivers, that’s quite awesome.
Because I’m to lazy/poor, I’ll wait for someone else testing this on his Librem :slight_smile:

EDIT: My next question would be: Would bluetooth work without proprietary firmware, or is this needed like the chip used right now from Purism?

a) it is not an expensive device (referring to the link back to the original discussion)
b) no need to test it - it won’t work (out of the box)

Looks like there’s still pretty active development on trying to get it to work reliably too. Given the time windows involved in getting something into the mainline kernel, it’s really no surprise it’s not in yet (especially given the license only being included for 2 weeks). So far, I’m not finding any reference to the driver on the LKML. Might be worth opening a ticket on GitHub to inquire if he’s considered submitting it to the LKML.

2 Likes

The driver is usually not the problem. And even if a card would require a properly free licensed driver, we would take the effort and either maintain a package for PureOS or help pushing it upstream.

But the problem is usually not the driver, but the firmware. And also for the here mentioned rtl88x2bu chipset the driver source at least suggests that it will require and load a firmware for the WiFi:

What I can not read from the source is if this firmware may be optional, but I guess it is not. Anyway, thank you very very for helping! What I will do next is to try to get one of these cards and see what they actually do and don’t, if they would work and if the firmware file is mandatory.

Cheers
nicole

11 Likes

Thanks for the response @nicole.faerber ! Very excited about this possible upgrade.

Yeah well, don’t hold your breath… it is very likely requiring this firmware blob, which would mean end of story for Purism.

Cheers
nicole

1 Like

Not helping with firmware, but it looks like these are direct links to available drivers:
– RTL8812BU Linux driver as of 2020-04-21: www.cudytech.com/filedownload/196469 and www.cudytech.com/filedownload/165701 (37MB.zip.file with documents, etc.),
– RTL8821CU Linux driver as of 2020-04-21: www.cudytech.com/filedownload/196487.

Installation guide: www.cudytech.com/filedownload/196477

1 Like

I had one more thought that I thought might be worth sharing: these chips are used in stand-alone USB devices (external wifi adapters). I thought it’s possible this makes for a better intuition about whether it will need firmware loaded or not, but I’m not sure because I don’t understand the subject well.

2 Likes

It was one such device that started this discussion.

By now I checked and it turned out as expected, all of these require a proprietary closed source firmware at runtime, i.e. the kernel driver is required to download a firmware chunk into the card during card initialization. This rules them out for us (Purism). Sorry :frowning:

Cheers
nicole

7 Likes