Problem: Missing driver for wifi adapter, question about DIY installation.
OS: Fedora 36 KDE x64 (up to date) on a dual-boot machine, Intel i5-2400 3.1GHz CPU, 16 GiB RAM.
This is one of three such dual-boot machines - the other OS being Win10. This one is rooms away from the NetGear wifi router and depends on a wireless connection for operation. Recently on of the other wifi adapters (Tenba) bit the dust and I replaced it with a “netis” branded adapter borrowed from this machine. When I replaced the netis with a TP-Link I found Win10 would connect to the network while FK36 would not.
TP-Link’s installation CD had a folder for a Linux driver, but the only thing in it was a note to see their web site. There was no driver for my model, a TL_WN725N, version 1, but using their documentation I got some info: lsusb listed the presence of the adapter: “Realtek RTL8188EUS 802.11n wireless adapter.” ifconfig did not list the interface as “up” and I could not force it “up”.
I had to abandon that approach.
Searching further I found on askubuntu an account of a similar situation and I followed the solution given there: 1) update git, 2) use git to clone GitHub - lwfinger/rtl8188eu: Repository for stand-alone RTL8188EU driver., 3) cd rtl8188eu, 4) make. Here make began to complain; essentially that a file was not found.
Examining the makefile I found that a path for installation was inaccurate: “MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/staging/r8188eu/”. This path exists for my (then current) kernel version but the target file 8188eu.ko (install -p -m 644 8188eu.ko $(MODDESTDIR)) was named
The “.xz” was causing the makefile to fail, and my question is: Can I rename the file, dropping .xz, or modify the makefile, adding .xz? I don’t want to screw anything up here, so I’m asking for advice.
Reading 2.1 > Introduction to kernel modules,
… kernel modules are extra kernel code which is built into compressed
<KERNEL_MODULE_NAME>.ko.xz object files.
It says it is a compressed file, maybe reading this doc helps find you out how to move it to the right place without being compressed.
Re-examining the problem I realized that make was generating an error at line 152 of the Makefile, to the effect that a certain file, “build”, was missing. I could see the entry in the directory, but it was red. I understood this to be an archive, but apparently it signified “deprecated”. In any case any reference to it gave the error “does not exist.”
I did more research and found a post on stackoverflow.com that dealt with just this issue: centos - /lib/modules/<version>/build/ not existent - Stack Overflow . The respondent suggested downloading “the Linux headers”. I did so with “dnf install kernel-devel kernel-headers” and dnf complied. When I went back to the build file it was now blue-green; its status had changed.
So I navigated to the rtl8188eu directory I had previously “cloned” with git and invoked make again. This time make completed successfully. To be certain I ran “make install” after that; I’m not sure that was necessary but it doesn’t seem to have hurt anything. Following the askubuntu listing (networking - Install TP-link TL-WN725N USB wifi driver on Ubuntu 20.04 - Ask Ubuntu) I invoked modprobe to remove r8188eu and lsmod to see what was left.
Then I unplugged the netis adapter and plugged in the TP-Link, which blinked and re-established a connection with the router. QED!
Glad you got that sorted. Yes, when building modules that interface with the kernel it is usually best to have both kernel-headers and kernel-devel installed so all the necessary build files are available. Great job, and hope others can find this and follow it.
A couple of notes:
This solution survives a reset; i.e. you power down and up and the adapter “knows what to do”. However, after entering “sleep” mode and waking up I noticed that the adapter LED was on all the time, not just synchronous with transmissions. A power cycle restored proper operation, however.
Most significant is the note included with the askubuntu.com posting:
“At each newer kernel version update, after the requested restart, please do:
sudo make install
Please retain these instructions and the rtl8188eu directory for that time.”
It would be nice if the driver were included in the distro…
As long as it contains closed source, drivers not get included automatically.
As mentioned above, closed source drivers cannot be included with fedora due to the policy that excludes anything that has licensing, patent, or copyright restrictions.
Any software that requires direct interaction with the kernel, such as hardware drivers, needs to be compiled for the kernel in use. The note from the askubuntu.com posting is something you need to keep handy and remember for future use since fedora frequently sends out kernel updates.
Some drivers are distributed in a way that allows automatic recompile, such as the nvidia GPU driver, but yours is not one of those.
…or get a supported chipset…
It would be nice if linux users would stick with unencumbered devices. The problem is vendors that put more effort into low prices and advertising than robost linux support. It can be hard for
users to find reliable advice. The linux-hardware.org site used to collect user reports, but
longer accepts database updates. USB WiFi Chipsets is a good source of information on USB WiFi for linux.
If users avoid encumbered devices the problematic vendors will have to change their ways, and linux developers can spend less time solving problems with encumbered devices.
This is an excellent idea, but is severely limited by laptop manufacturers that are installing the problematic chipsets. It can easily be worked around by choosing a supported usb interface, but that does not affect the mfgr since they are mostly focused on supporting the big gorilla.
Years ago I wrote to Word Perfect Corp. pleading with them not to discontinue support of WP for the Amiga. (Yes, I am that old.)
I was surprised to receive a reply; informing me that 90% of all sales were for the IBM/MS-DOS OS, 9% for Apple Mac OS and the remaining 1% all other OS combined. Everywhere I have worked has been a Microsoft shop.
Microsoft has been responsible for some significant innovations and smart enough to adopt others: I note that Windows now offers a “Linux subsystem”, now in its second release, presumably as an attempt to head off the inroads made by the Linux community.
But Microsoft maintains its lead mostly by inertia. Linux - in my instance a Fedora 36 KDE desktop OS - is its equal, in my opinion. That it does so by the voluntary efforts of a community is a stunning achievement.