我有一台戴尔 Vostro 3446,双启动,安装了 Windows 10 和 Ubuntu 16.04。以太网在 Windows 上可用,但在 Ubuntu 上不可用,而且我在戴尔官方网站上也找不到适用于 Ubuntu 的以太网驱动程序。它以前可以正常工作,但最近我不得不格式化并重新安装 Windows 和 Ubuntu。
ifconfig -a 的输出如下:-
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:8552 errors:0 dropped:0 overruns:0 frame:0
TX packets:8552 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1417162 (1.4 MB) TX bytes:1417162 (1.4 MB)
wlp6s0 Link encap:Ethernet HWaddr 4c:bb:58:51:21:ec
inet addr:10.2.6.175 Bcast:10.2.255.255 Mask:255.255.0.0
inet6 addr: fe80::3a25:6cd2:f287:2867/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:152285 errors:0 dropped:3 overruns:0 frame:0
TX packets:46852 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:68149773 (68.1 MB) TX bytes:6974198 (6.9 MB)
其他成果如下:-
saptarsi@saptarsi-Vostro-3446:~$ lspci
00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 0b)
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b)
00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 0b)
00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04)
00:16.0 Communication controller: Intel Corporation 8 Series HECI #0 (rev 04)
00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 1 (rev e4)
00:1c.2 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 3 (rev e4)
00:1c.3 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 4 (rev e4)
00:1c.4 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 5 (rev e4)
00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 8 Series SATA Controller 1 [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04)
06:00.0 Network controller: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01)
07:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
08:00.0 3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] (rev a1)
saptarsi@saptarsi-Vostro-3446:~$ sudo ethtool eth0
Settings for eth0:
Cannot get device settings: No such device
Cannot get wake-on-lan settings: No such device
Cannot get message level: No such device
Cannot get link status: No such device
No data available
saptarsi@saptarsi-Vostro-3446:~$ sudo lshw -C network
*-network
description: Wireless interface
product: QCA9565 / AR9565 Wireless Network Adapter
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:06:00.0
logical name: wlp6s0
version: 01
serial: 4c:bb:58:51:21:ec
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list rom ethernet physical wireless
configuration: broadcast=yes driver=ath9k driverversion=4.13.0-36-generic firmware=N/A ip=10.2.6.175 latency=0 link=yes multicast=yes wireless=IEEE 802.11
resources: irq:18 memory:f7900000-f797ffff memory:f7980000-f798ffff
*-network UNCLAIMED
description: Ethernet controller
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:07:00.0
version: 0c
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list
configuration: latency=0
resources: ioport:e000(size=256) memory:f7800000-f7800fff memory:f2100000-f2103fff
saptarsi@saptarsi-Vostro-3446:~$ echo -e "blacklist b43\nblacklist ssb" | sudo tee -a /etc/modprobe.d/blacklist.conf
blacklist b43
blacklist ssb
saptarsi@saptarsi-Vostro-3446:~$ sudo modprobe r8169 && dmesg | grep r816
[21476.866351] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[21476.866367] r8169 0000:07:00.0: can't disable ASPM; OS doesn't have ASPM control
[21476.879738] r8169 0000:07:00.0 eth0: RTL8168g/8111g at 0xffffa9004066d000, 74:e6:e2:2e:d6:02, XID 0c000800 IRQ 47
[21476.879742] r8169 0000:07:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
saptarsi@saptarsi-Vostro-3446:~$ grep r8169 /etc/modprobe.d/*
/etc/modprobe.d/blacklist.conf:blacklist r8169
/etc/modprobe.d/r8168-dkms.conf:# map the specific PCI IDs instead of blacklisting the whole r8169 module
/etc/modprobe.d/r8168-dkms.conf:# to blacklist the whole r8169 module
/etc/modprobe.d/r8168-dkms.conf:#blacklist r8169
答案1
您的以太网无法启动,因为驱动程序未按预期自动加载。首先,让我们看看是否能确定原因。它是否被列入黑名单?从终端检查:
grep r8169 /etc/modprobe.d/*
如果您找到结果,请发布它,我会编辑此答案以建议更正。
我们可以使用以下命令自动加载驱动程序:
sudo -i
echo r8169 >> /etc/modules
exit
一切已准备就绪。