I have recently installed Ubuntu 16.04 for dual-booting on a desktop that already had Windows 10 installed, and I'm having network issues in Ubuntu. The connection works perfectly fine in Windows. I have a wired connection.
In Ubuntu, it appears like I can only actually have the connection work for a few seconds, up to maybe a minute. Most of the time, when I attempt to go to a new webpage for example, it fails. In can rather consistently fix this every time by manually breaking the connection (Ubuntu appears to think it is still connected, just Firefox can't actually find any pages), and re-connecting. Then it'll work for a few seconds, which I can use to quickly browse to the page I wanted to go to.
I did find many other similar questions and answers, but most answers seem to be about specifically editing certain files or entering commands in the terminal based on output the specific user had. So... I don't think it's a good idea for me to just blindly follow any such instructions from answers given to other people based on their output which may be different in my case, and rather just ask for my situation specifically here.
I did follow the following steps in Windows which I found somewhere, but this didn't fix the issue for me:
Right click my computer and choose "Properties"
--> "Hardware" tab --> Device Manager
--> Network Adapters
--> "double click" Realtek ...
--> Advanced tab
--> Wake-On-Lan After Shutdown
--> Enable
I also saw it mentioned somewhere that it might help to completely shut down Windows and manually turn on the PC again, instead of rebooting from Windows and then booting into Ubuntu, but this also makes no difference for me.
Some commands and the output I receive from Ubuntu:
in:
$ lspci | grep -i eth
output:
06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
in:
$ ifconfig -a
output:
enp6s0 Link encap:Ethernet HWaddr d0:17:c2:d3:d8:19
inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::5eb0:b570:8edf:ddf7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:18521 errors:0 dropped:0 overruns:0 frame:0
TX packets:16981 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:11094182 (11.0 MB) TX bytes:1719007 (1.7 MB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:7164 errors:0 dropped:0 overruns:0 frame:0
TX packets:7164 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:528834 (528.8 KB) TX bytes:528834 (528.8 KB)
in:
$ sudo lshw -C network
output:
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:06:00.0
logical name: enp6s0
version: 15
serial: d0:17:c2:d3:d8:19
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.2.1 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
resources: irq:123 ioport:d000(size=256) memory:f7104000-f7104fff memory:f7100000-f7103fff
Please also let me know if any of the stuff I pasted above is actually sensitive and if I should delete it :P
EDIT
in:
sudo lshw -C CPU
out:
*-cpu
description: CPU
product: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
vendor: Intel Corp.
physical id: 43
bus info: cpu@0
version: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
serial: To Be Filled By O.E.M.
slot: LGA1151
size: 900MHz
capacity: 3600MHz
width: 64 bits
clock: 100MHz
capabilities: x86-64 fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp cpufreq
configuration: cores=4 enabledcores=4 threads=4
in:
sudo lshw -C network | grep -i driver
out:
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.2.1 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
in:
free -h
out:
total used free shared buff/cache available
Mem: 15G 1,5G 12G 46M 1,1G 13G Swap: 15G 0B 15G
in:
swapon -s
out:
Filename Type Size Used Priority
/dev/sdb7 partition 15998972 0 -1
EDIT 2:
in:
dkms status
out:
r8168, 8.041.00: added
in:
sudo apt-get install dkms r8168-dkms
out:
Reading package lists... Done
Building dependency tree
Reading state information... Done
r8168-dkms is already the newest version (8.041.00-1).
dkms is already the newest version (2.2.0.3-2ubuntu11.3).
0 upgraded, 0 newly installed, 0 to remove and 100 not upgraded.
EDIT 3:
in:
dkms status
out:
r8168, 8.042.00, 4.10.0-28-generic, x86_64: installed
EDIT 4:
in:
ls -al /usr/src
out:
total 28
drwxr-xr-x 7 root root 4096 Sep 10 20:00 .
drwxr-xr-x 11 root root 4096 Aug 1 13:24 ..
drwxr-xr-x 27 root root 4096 Aug 1 13:23 linux-headers-4.10.0-28
drwxr-xr-x 7 root root 4096 Aug 1 13:23 linux-headers-4.10.0-28-generic
drwxr-xr-x 27 root root 4096 Sep 10 20:00 linux-headers-4.10.0-33
drwxr-xr-x 7 root root 4096 Sep 10 20:00 linux-headers-4.10.0-33-generic
drwxr-xr-x 2 root root 4096 Sep 10 16:16 r8168-8.042.00