编辑:我找到了合适的驱动程序
https://github.com/ghostrider-reborn/realtek-r8101-linux-driver
我按照此处的说明进行操作,现在两个网卡都可以工作(我一次只使用一张,因为我正在测试将它们连接到同一个网络。)
原始帖子
我在之前运行过 Kubuntu 14.04 的计算机上安装了 Kubuntu 18.04,但两块网卡中的一块无法正常工作。不幸的是,我需要为我的实验室设置配置这两块网卡。
我尝试使用相同的以太网电缆插入其中任何一个,但只有 RTL8111 可以工作。dmesg
其中没有任何有关以太网或网络的内容,journalctl -xe
只提到成功加载了 RTL8111 驱动程序。
以下是一些诊断输出,希望对您有用
lshw-C 网络
*-network UNCLAIMED
description: Ethernet controller
product: RTL810xE PCI Express Fast Ethernet controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:02:00.0
version: 02
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list
configuration: latency=0
resources: ioport:b800(size=256) memory:f7cff000-f7cfffff memory:cfff0000-cfffffff
*-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:01:00.0
logical name: enp1s0
version: 03
serial: [redacted]
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.046.00-NAPI duplex=full latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:31 ioport:a800(size=256) memory:cfeff000-cfefffff memory:cfef8000-cfefbfff memory:f7be0000-f7bfffff
*-network
description: Ethernet interface
physical id: 1
logical name: enp0s26f7u1
serial: [redacted]
capabilities: ethernet physical
configuration: broadcast=yes driver=rndis_host driverversion=22-Aug-2005 firmware=RNDIS device ip=192.168.42.163 link=yes multicast=yes
Kubuntu 可以看到网卡(第三个设备是我的手机,使用 USB 网络共享),但第一个是“未认领”
lspci -v | grep -A20 以太网
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03)
Subsystem: ASRock Incorporation Motherboard (one of many)
Physical Slot: 0-3
Flags: bus master, fast devsel, latency 0, IRQ 31
I/O ports at a800 [size=256]
Memory at cfeff000 (64-bit, prefetchable) [size=4K]
Memory at cfef8000 (64-bit, prefetchable) [size=16K]
Expansion ROM at f7be0000 [disabled] [size=128K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 01
Capabilities: [ac] MSI-X: Enable- Count=4 Masked-
Capabilities: [cc] Vital Product Data
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number [redacted]
Kernel driver in use: r8168
Kernel modules: r8168
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller (rev 02)
Subsystem: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller
Physical Slot: 0-2
Flags: bus master, fast devsel, latency 0, IRQ 11
I/O ports at b800 [size=256]
Memory at f7cff000 (64-bit, non-prefetchable) [size=4K]
Memory at cfff0000 (64-bit, prefetchable) [size=64K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 01
Capabilities: [ac] MSI-X: Enable- Count=2 Masked-
Capabilities: [cc] Vital Product Data
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number [redacted]
它已为第一张卡加载了内核模块,但还没有为第二张卡做任何事情。
修改
Module Size Used by
intel_powerclamp 20480 0
snd_hda_codec_realtek 114688 1
coretemp 20480 0
snd_hda_codec_generic 77824 1 snd_hda_codec_realtek
kvm_intel 241664 0
ledtrig_audio 16384 2 snd_hda_codec_generic,snd_hda_codec_realtek
kvm 647168 1 kvm_intel
snd_hda_intel 49152 5
irqbypass 16384 1 kvm
snd_hda_codec 135168 3 snd_hda_codec_generic,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core 86016 4 snd_hda_codec_generic,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
rndis_host 20480 0
snd_hwdep 20480 1 snd_hda_codec
ni_pcimio 73728 0
cdc_ether 20480 1 rndis_host
ni_tiocmd 16384 1 ni_pcimio
mite 20480 2 ni_tiocmd,ni_pcimio
snd_pcm 102400 4 snd_hda_intel,snd_hda_codec,snd_hda_core
usbnet 45056 2 rndis_host,cdc_ether
comedi_pci 16384 2 mite,ni_pcimio
intel_cstate 20480 0
mii 16384 1 usbnet
ni_routing 299008 2 ni_tiocmd,ni_pcimio
input_leds 16384 0
ni_tio 20480 2 ni_tiocmd,ni_pcimio
comedi_8255 16384 1 ni_pcimio
snd_seq_midi 20480 0
snd_seq_midi_event 16384 1 snd_seq_midi
comedi 73728 5 mite,comedi_pci,ni_tiocmd,ni_pcimio,comedi_8255
snd_rawmidi 36864 1 snd_seq_midi
snd_seq 69632 2 snd_seq_midi,snd_seq_midi_event
gpio_ich 16384 0
snd_seq_device 16384 3 snd_seq,snd_seq_midi,snd_rawmidi
snd_timer 36864 2 snd_seq,snd_pcm
snd 86016 19 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm,snd_rawmidi
serio_raw 20480 0
soundcore 16384 1 snd
i5500_temp 16384 0
lpc_ich 24576 0
i7core_edac 24576 0
mac_hid 16384 0
sch_fq_codel 20480 3
parport_pc 36864 0
ppdev 24576 0
lp 20480 0
parport 53248 3 parport_pc,lp,ppdev
ip_tables 32768 0
x_tables 40960 1 ip_tables
autofs4 45056 2
nouveau 1871872 20
hid_generic 16384 0
video 49152 1 nouveau
i2c_algo_bit 16384 1 nouveau
ttm 102400 1 nouveau
mxm_wmi 16384 1 nouveau
drm_kms_helper 180224 1 nouveau
syscopyarea 16384 1 drm_kms_helper
sysfillrect 16384 1 drm_kms_helper
psmouse 151552 0
sysimgblt 16384 1 drm_kms_helper
usbhid 53248 0
fb_sys_fops 16384 1 drm_kms_helper
hid 126976 2 usbhid,hid_generic
drm 483328 10 drm_kms_helper,ttm,nouveau
firewire_ohci 40960 0
pata_acpi 16384 0
ahci 40960 0
firewire_core 65536 1 firewire_ohci
r8168 528384 0
pata_via 16384 0
libahci 32768 1 ahci
crc_itu_t 16384 1 firewire_core
wmi 28672 2 mxm_wmi,nouveau
从末尾开始第五行是 RTL8111 卡的驱动程序,我不知道这对您是否真的有用。
lspci-nn
01:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 03)
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet Controller [10ec:8136] (rev 02)
答案1
lspci-nn
01:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 03)
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet Controller [10ec:8136] (rev 02)
修改信息 r8169 |复制代码# r8169 驱动程序将看到 RTL810xE
alias: pci:v000010ECd00008136sv*sd*bc*sc*i*
系统未看到 RTL810xE 以太网卡。这是因为您安装了 r8168-dkms 驱动程序,该驱动程序对 RTL8111/8168/8411 以太网卡有效,但对 RTL810xE 无效。
建议卸载 r8101 github 驱动程序和 r8168-dkms 驱动程序,并让标准 r8169 驱动程序找到这两张卡。
如果包含内核更新,这还会使软件更新更快,因为它不必额外重建 dkms 驱动程序。