0

I am new to ubuntu. My Ethernet is not working properly but wifi is working properly. For my ethernet to work, I always have to put this command after every restart(sudo ethtool -s eth0 speed 100 duplex full autoneg off). Any suggestions?

The output of (lspci -knn | grep Eth -A2) is:

09:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 10)
    Subsystem: Hewlett-Packard Company Device [103c:228d]
    Kernel driver in use: r8169
6
  • This looks like a problem on the other end of the cable.
    – Pilot6
    Feb 24 '16 at 12:56
  • I think there should be no problem there. It works properly in my windows. Can we work out something for this? @Pilot6
    – Siddhant
    Feb 24 '16 at 13:01
  • The easiest way is to add this command to /etc/rc.local without sudo. And what is the network adapter? Please edit your question and add output of lspci -knn | grep Eth -A2.
    – Pilot6
    Feb 24 '16 at 13:02
  • Ok I have added the output.@Pilot6
    – Siddhant
    Feb 24 '16 at 13:08
  • But still it looks weird that you have to limit speed to 100 and turn off autonegotiation.
    – Pilot6
    Feb 24 '16 at 13:11
0

This looks like another revision of RTL8111/8168/8411 controller. It may be not supported very well by the kernel r8169 module.

If you did not upgrade the kernel to 4.2 yet, do it now. That will get a newer version of this module. It can be done by running

sudo apt-get install linux-generic-lts-wily

Reboot after that.

If the new kernel does not fix it, you can install another driver, that is more specific for this adapter. Run

sudo apt-get install r8168-dkms

and reboot again.

The r8168-dkms may not build for kernel 4.2, because maintainers did not update it for Ubuntu 14.04.4. In this case download and install this package:

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

7
  • I tried both of them, but a window popped up showing some software error. Even wifi has stopped working ubuntu now. What to do? @Pilot6
    – Siddhant
    Feb 24 '16 at 13:32
  • If you do not know what was the error, I do not know how to fix it.
    – Pilot6
    Feb 24 '16 at 13:35
  • In terminal, it displayed this:Building initial module for 4.2.0-30-generic Error! Bad return status for module build on kernel: 4.2.0-30-generic (x86_64) Consult /var/lib/dkms/r8168/8.037.00/build/make.log for more information.
    – Siddhant
    Feb 24 '16 at 13:38
  • Oh, I will update the answer.
    – Pilot6
    Feb 24 '16 at 13:39
  • Or you can boot with the previous kernel, if you have troubles with 4.2.
    – Pilot6
    Feb 24 '16 at 13:41
0

driver version 37 is too old, use 41 instead:

sudo apt-get install --reinstall linux-headers-$(uname -r) linux-headers-generic build-essential dkms
wget http://de.archive.ubuntu.com/ubuntu/pool/universe/r/r8168/r8168-dkms_8.041.00-1_all.deb
sudo dpkg -i r8168-dkms_8.041.00-1_all.deb
echo "blacklist r8169" | sudo tee -a /etc/modprobe.d/blacklist.conf 

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.