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