Categories
Linux Softwares

Realtek RTL8111/8168/8411 PCIe GBE NIC – dissapear unusable after Kernel 6.9 update from 6.8 PopOS! work around…

I’ve been using Linux PopOS for a year now on my old Samsung RF411 notebook running Intel® Core™ i7-2630QM CPU @ 2.00GHz × 8 @16GB RAM it’s been running well from Windows 7 to 10 unfortunately, Windows 10 will be EOL soon, the hardware is still running well, it just couldn’t run on Windows 11. It will be a waste throwing it away so I switched to Linux as my daily driver. It’s not really a problem for me as I am well versed on both.

I’m running PopOS 22.04 with Linux Kernel 6.8 on this machine all accessories properly supported by PopOS drivers, the only minor annoyance is the popping sound from its soundcard when running on Kernel 6.8 due to the pipewire switch from pulse audio.

Upgrading from Linux Kernel 6.8 to 6.9 brings another issue as the Ethernet driver for this card usually breaks from kernel upgrade to kernel upgrade usually needing a recompile and re install of the driver.

However this time recompiling it pose another challenge due to GCC incompatibility from Ubuntu Mainline Kernel update.

Gcc error X86_64 Linux Gnu  & GCC12

Installing the r8168-dkms doesn’t work as expected due to errors. When I fire up the terminal, it shows that the kernel modules loaded is from r8168, type:

$ sudo lspci -v

$ sudo lspci -v
lspci -v

Searching for the fix on this issue around all other websites and Linux forum they say that the r8169 driver is supported on Linux Kernel 6.9, this was not loading properly as I’m previously using r8168 drivers from the previous Kernel 6.8 so it still try to load the r8168 drivers by default when I changed my Kernel to 6.9 via Kernel Mainline upgrade.

So i try to reload the r8169 drivers from the current kernel using:

$sudo modprobe r8169

$ sudo lspci -v

This triggers the reload of the driver from Kernel 6.9 which enables my Ethernet card.

sudo modprobe r8169

Now I know that the driver is working the next step is to reload it automatically when rebooting, but delete any previously installed kernel modules from recompiling and dkms install.

$ sudo apt remove r8168-dkms

$ sudo apt remove r8168-dkms

After the removal of any r8168-dkms modules, load the drivers directly from reboot so open up the /etc/modprobe.d directory and I found 2 entries for r8168 modules I just rename it as .bak files respectively and create another entry for r8169.conf

$ sudo touch r8169.conf

$ sudo touch r8169.conf
creating modprobe autoload on /etc/modprobe.d

After all is done, test if the configuration is loading automatically from start up just reboot yout computer and check again with:

$ sudo lspci -v

$ sudo lspci -v 
Success r8169 driver loaded

From this last screen shot as we check if the driver for the NIC card is properly loaded it is obviously a success and I’m back with the full speed link of 1GB from this card.