这是我第一次在联想 Z51 上使用 Ubuntu 14.04 和 Windows 10。我的以太网连接在 Ubuntu 中无法识别,但在 Windows 中可以连接。无线工作正常。
chirag@chirag:~$ lspci -knn | grep Eth -A2; ifconfig
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
Subsystem: Lenovo Device [17aa:3826]
Kernel driver in use: r8169
eth0 Link encap:Ethernet HWaddr f0:76:1c:b9:ef:d6
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
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:212 errors:0 dropped:0 overruns:0 frame:0
TX packets:212 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:19539 (19.5 KB) TX bytes:19539 (19.5 KB)
wlan1 Link encap:Ethernet HWaddr ac:e0:10:2e:b1:b7
inet addr:10.42.0.18 Bcast:10.42.0.255 Mask:255.255.255.0
inet6 addr: fe80::aee0:10ff:fe2e:b1b7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1179 errors:0 dropped:0 overruns:0 frame:0
TX packets:1206 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:838341 (838.3 KB) TX bytes:183256 (183.2 KB)
chirag@chirag:~$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
我尝试添加auto eth0
并iface eth0 inet dhcp
使用/etc/network/interfaces
sudo su
gedit /etc/netwwork/interfaces
但在此之后,需要很长时间才能重新启动,并且启动屏幕上会出现一条消息:
等待网络配置
进而:
在没有完整网络配置的情况下启动
因此,我删除auto eth0
了iface eth0 inet dhcp
/etc/network/interfaces
重新启动后,关闭无线并连接以太网电缆:
chirag@chirag:~$ dmesg | grep -e eth -e r8169
[ 0.965727] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 0.965739] r8169 0000:02:00.0: can't disable ASPM; OS doesn't have ASPM control
[ 0.975229] r8169 0000:02:00.0 eth0: RTL8168h/8111h at 0xffffc90000cbe000, f0:76:1c:b9:ef:d6, XID 14100880 IRQ 48
[ 0.975232] r8169 0000:02:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[ 4.311764] vga_switcheroo: detected switching method \_SB_.PCI0.GFX0.ATPX handle
[ 6.616934] r8169 0000:02:00.0 eth0: link down
[ 6.616935] r8169 0000:02:00.0 eth0: link down
[ 6.617017] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
chirag@chirag:~$ ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Speed: 10Mb/s
Duplex: Half
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Cannot get wake-on-lan settings: Operation not permitted
Current message level: 0x00000033 (51)
drv probe ifdown ifup
Link detected: no
链接至我的网络诊断结果:
答案1
司机r8169 有问题,我们可以尝试几种方法。让我们先从最简单的开始,看看我们能否修复它。如果不行,我将编辑此答案以继续处理更复杂的问题。
请打开终端并执行:
sudo ethtool -s eth0 speed 100 duplex full autoneg off
现在检查:
dmesg | grep eth0
链接恢复了吗?请注意,它之前是:
r8169 0000:02:00.0 eth0:链接断开
我注意到您正在使用 Windows 进行双启动。这是驱动程序的问题r8169在某些情况下。请参阅:https://en.opensuse.org/SDB:Realtek_8169_driver_problem尤其:
- 您在 Windows 设备管理器中启用“关机后网络唤醒”。这可防止 Windows 驱动程序禁用该卡。在较新的 Windows 驱动程序版本中,此选项不再可用,取而代之的是“关机网络唤醒”选项。无法确认将该新选项从“启用”更改为“禁用”是否可以解决问题。
请在 Windows 中查找并撤消 LAN 唤醒的设置。重新启动进入 Ubuntu 并再次检查:
dmesg | grep -e r8169 -e eth0
有改善吗?
如果你已经编译了r8168司机,我建议您将r8169列入黑名单:
sudo -i
echo "blacklist r8169" >> /etc/modprobe.d/blacklist.conf
exit
重启。确认r8168已加载:
lsmod
有改善吗?