I just downloaded and installed Ubuntu on my PC desktop, but the ethernet connection wasn’t working so I couldn’t get the internet. I was very confused because I was able to install Ubuntu on my laptop, and it worked just fine. I tried all the usual things like turning it off and on again, resetting the router, and checking if the cable was plugged in, but it still didn’t work. When I pull up the ethernet connection setting configuration menu, it said the cable was unplugged even though the cable was actually plugged in.
After looking around on the internet, I found that this was actually a pretty common bug, there wasn’t any clear or easy solution on how to fix this. The problem was that Ubuntu comes pre-installed with the Realtek r8169 driver, but the driver that I needed for my particular motherboard is the Realtek r8168 driver. I guess this has to do with something not being backward/forward compatible. So I went online and I found the driver.
If you never use Ubuntu before you can’t just click the file to install it. You have to mess around in the terminal to get it to work. So here is how you install the correct ethernet driver for your computer.
How to install
Download the correct driver from the Realtek website.
Uncompress the file, and change the directory in the terminal.
$ cd r8168-8.042.00 $ sudo bash autorun.sh
If it installed correctly it should look like this.
Check old driver and unload it. rmmod r8169 Build the module and install At main.c:222: - SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175 - SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178 sign-file: certs/signing_key.pem: No such file or directory Backup r8169.ko rename r8169.ko to r8169.bak DEPMOD 4.4.0-28-generic load module r8168 Updating initramfs. Please wait. update-initramfs: Generating /boot/initrd.img-4.4.0-28-generic Completed.
The internet should automatically connect.
Be careful while updating! Once I got the internet connection, I went ahead and download the updates for the OS. This removed the driver that was working and reinstall the faulty driver that doesn’t work, and I lost internet connection again. Fortunately, I just went ahead and just reinstall the correct ethernet driver, and the internet worked again. So be careful if that happens to you.