How to install the RTL815x USB Ethernet drivers on Linux (Debian/Ubuntu based)

ReactOS, Linux, macOS, BSD, and whatever.
User avatar
the_r3dacted
Lazy Owner
Posts: 1260
Joined: 11 Jan 2021, 07:40
Location: ur dads house
OS: Windows 8.1 x64
Has thanked: 867 times
Been thanked: 491 times
Contact:
United States of America

How to install the RTL815x USB Ethernet drivers on Linux (Debian/Ubuntu based)

Unread post by the_r3dacted »

It was impossible for me to find any guide on how to install the drivers. The readme did not tell me how, nor could I find much searching. Until after searching a ton, I finally found something to go off of in an issue report.

To install the drivers, get them from Realtek, https://www.realtek.com/Download/List?cate_id=585 the "USB NIC Linux driver for kernel up to *"
Extract the drivers, open the extracted driver directory up in a terminal, and run these commands.

Code: Select all

sudo make
sudo make modules
sudo make install
sudo depmod -a
sudo update-initramfs -u

sudo make install
sudo depmod -a
sudo update-initramfs -u

reboot
`sudo make` compiles the driver, r8152.ko, `sudo make modules` compiles the kernel module for the driver (I think, I don't know what it does tbh), and `sudo make install` installs the driver. However for me I encountered an error, and also had to run `sudo depmod -a` and `sudo update-initramfs -u` to make it work. Don't know what they do really, but they make it work. Now running `sudo make install` again no longer has an error. The readme says to run the depmod and update-initramfs commands after installing the driver, so I run the commands again to be safe, and then I reboot. Now the driver works, at least for me in my setup, I don't know if it will work for you, Linux is weird and incompatible at the best of times.

You can check if the driver is being used, the network manager, at least for me, shows the driver in use for the network adapter. It should also show 5Gbps or anything other than the 800ish or so Mbps that it shows without the correct driver. You can also check the version with `modinfo r8152` in a terminal.

For each new kernel upgrade you make, you will need to repeat this process, if you update often, you will need to repeat this often. I don't know how or if this can be automated, Linux is weird and incompatible at the best of times.

For SEO purposes, I'm going to have to mention all applicable adapters here, as I suspect someone like me searching this will search `(adapter they have) Linux driver install guide` and not specifically for the rtl8152 or r8152, the name of the driver, which corresponds to a 10/100 adapter. RTL8152B RTL8153 RTL8153B RTL8153C RTL8153D RTL8153E RTL8154 RTL8154B RTL8156 RTL8156B RTL8156BG RTL8156G RTL8157 RTL8159
k4sum1 who?

I might know what I'm doing not the hit album by brad sucks

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest