0

I am using Ubuntu 14.04 LTS on my desktop and am using the integrated Realtek ethernet networking on my Gigabyte motherboard. Unfortunately, the device does not work after a new linux kernel is installed. I found a device driver that works, but I have to install it manually each time. I just open a terminal, navigate to the folder with the driver and do a

sudo sh autorun.sh

and it works again. Not the end of the world, but a bit inconvenient. The driver is r8168-8.040.00

Is there a way that I can set it up so that the driver is install when the kernel is installed? Thanks!

  • 1
    Please edit your question to add details of your device from the terminal: lspci -nn | grep 0200 – chili555 Dec 21 '15 at 16:15
  • My lspci -nn | grep 0200 = 03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c) – maddentim Dec 22 '15 at 22:29
1

You can install a dkms package with r8168 driver from official Ubuntu repositories.

You will need to uninstall the driver you have installed manually, then run in terminal:

sudo apt-get install r8168-dkms

The dkms package will rebuild the kernel module (driver) each time you upgrade a kernel.

The repository for Ubuntu 14.04 contains a dkms r8168 version 8.037.00-1.

It may work OK. But if you really need the latest driver, you can install it by:

wget http://mirrors.kernel.org/ubuntu/pool/universe/r/r8168/r8168-dkms_8.040.00-1_all.deb
sudo dpkg -i r8168-dkms_8.040.00-1_all.deb

That will install the same version that you are using now but with dkms support.

  • Sounds very promising. How do I uninstall the manually installed driver. And if I uninstall the driver will I be able to install r8168-dkms package without a working ethernet? Do I need to download the packages in advance? Or can I just run your last dpkg command to install the dkms package and then let it do its thing when the next kernel comes around? Thanks! – maddentim Dec 22 '15 at 22:35
  • It depends on how you installed the driver. sudo make uninstall should work from the source directory. You can install dkms package first and download the r8168-dkms first. But if you uninstall it and do not reboot, the network should keep working. – Pilot6 Dec 23 '15 at 11:49
  • sudo make uninstall returned make: *** No rule to make target 'uninstall'. Stop. So I just wget'ed the .deb file and the next time I get a new kernel I'll install the r8168-dkms then. Thanks! – maddentim Dec 23 '15 at 16:56
  • Where did you run sudo make uninstall from? How did you previously install it? – Pilot6 Dec 23 '15 at 17:01
  • I ran the uninstall from the driver's folder on my file system. Same one that I ran it's autorun.sh script that came with the driver. I just run sudo sh autorun.sh – maddentim Dec 27 '15 at 3:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.