Is it possible to transfer Wifi adapter drivers from one OS to another?

sl flag

Noob here, under which directory are my wifi adapter drivers located? I want to copy and transfer the entire folder to a USB.

I bought a Libre Le Potato and I installed their version of Raspberry Pi OS. However, the USB Wifi adapter(TP-Link TL-WN725N) I bought for it doesn't work.

Libre's version of Raspbian uses Kernel version 6.0.12-00858-gb98721ea4575 and when I went to TP Link's website, the customer service agent told they don't have a driver that could work for my OS.

I read from another user, that Libre's version of Ubuntu does support my USB Wifi adapter, and when I installed it, it did work. So somehow I should be able to copy Ubuntu's drivers and transfer it right? I'm not sure if both OS are 32 bit or 64 bit or if each one is different, but if they're both the same it shouldn't conflict because they're both based off Debian?

How would I go about transferring the drivers, assuming its compatible? I think it would be easier to just copy the entire folder, but where is that folder?

guiverc avatar
cn flag
Please refer, Ubuntu and *official* flavors of Ubuntu ( are on-topic on this site. The on-topic link provides alternate SE sites for non-Ubuntu OSes.
guiverc avatar
cn flag
FYI: Drivers are actually *kernel modules*, thus the kernel stack matters. Ubuntu LTS releases have kernel stack options which provide the easiest fix (ie. *use the stack that best suits your hardware*) but if you can get something working on any GNU/Linux - you can easily make it work on others but you don't move across *drivers* as you seem to imply; but make the required changes to the OS you want to operate.. Your approach goes against OS theory as I understood it (ie. GNU/Linux is just an OS - deal with it that way)
us flag
Drivers are included in the kernel, and cannot be copied between operating systems in this manner. You can possibly install Ubuntu's kernel and kernel modules in RPiOS (not a simple task), but RPiOS is off topic in this site
cn flag

So somehow I should be able to copy Ubuntu's drivers and transfer it right?

It is not an easy task for a beginner. Nor an easy task for most experienced professionals!

Transplanting "drivers" (kernel modules) is roughly like transplanting a random bicycle wheel. LOTS could go wrong --wrong diameter, wrong width, brake incompatibility, etc-- that makes the final result unusable or downright broken.

An experienced mechanic can do it, though, and make it look easy.

Similarly, transplanting Linux kernel code might work...or might not. It has a much higher likelihood of working if you have experience compiling kernels, working with version control system, patching source code, and debugging USB hardware in general.

Essentially, what you must do is locate the appropriate kernel module ("driver") source code, then add that code to your own kernel modules source code, then recompile your kernel. Then test and debug and re-compile a few times until it begins to work.

Alternately, you could simply exchange the WiFi dongle for an older model this is compatible. If yours were a newly-released, bleeding-edge hardware, you could also just hang onto it until future kernels do provide compatibility.

Keeper717 avatar
sl flag
It won't let me upvote your comment because I'm a new user and this is my first post, but thank you very much for the explanation! Unfortunately, I don't think my Wifi adapter will ever get an update, since the manufacturer stopped support around the Linux kernel version 4.4.3. I also haven't seen any updates for the Le Potato version of Raspbian since 2022. I think my only option now is to try and "debloat" Ubuntu since its less snappy than Raspbian. Is "sudo apt purge <name of package>" good enough to remove unnecessary things? I really only need libreoffice, chromium, and thonny.
user535733 avatar
cn flag
That's a different question. Really best if you open a new Question for it.
I sit in a Tesla and translated this thread with Ai:


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.