如何启用驱动程序?

如何启用驱动程序?

我安装了 r8168 驱动程序包,但仍然不起作用当我输入时,lsmod | grep r8168它什么也没有返回。
在 Fedora 上它可以工作:

lsmod | grep r81*
r8169                  94208  0

更新:

$ lspci -nnk |grep 0200 -A3
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller [10ec:8136] (rev 07)
    Subsystem: Lenovo RTL810xE PCI Express Fast Ethernet controller [17aa:3856]
    Kernel driver in use: r8169
    Kernel modules: r8169

$ dmesg | grep -e r816 -e enp
[    1.263279] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    1.263292] r8169 0000:02:00.0: can't disable ASPM; OS doesn't have ASPM control
[    1.266763] r8169 0000:02:00.0 eth0: RTL8106e at 0x00000000ba7d10f2, 54:e1:ad:df:b3:c2, XID 04900000 IRQ 33
[    1.310903] r8169 0000:02:00.0 enp2s0: renamed from eth0
[   25.810894] IPv6: ADDRCONF(NETDEV_UP): enp2s0: link is not ready
[   26.029254] r8169 0000:02:00.0 enp2s0: link down
[   26.029280] r8169 0000:02:00.0 enp2s0: link down
[   26.029514] IPv6: ADDRCONF(NETDEV_UP): enp2s0: link is not ready
[   27.748727] r8169 0000:02:00.0 enp2s0: link up
[   27.748742] IPv6: ADDRCONF(NETDEV_CHANGE): enp2s0: link becomes ready

$ lsmod
Module                  Size  Used by
rfcomm                 77824  16
pppoe                  20480  2
pppox                  16384  1 pppoe
cmac                   16384  1
bnep                   20480  2
nls_iso8859_1          16384  1
edac_mce_amd           28672  0
arc4                   16384  2
snd_hda_codec_hdmi     49152  1
snd_hda_codec_generic    73728  1
uvcvideo               86016  0
kvm_amd                86016  0
snd_usb_audio         196608  2
kvm                   593920  1 kvm_amd
btusb                  45056  0
snd_usbmidi_lib        32768  1 snd_usb_audio
btrtl                  16384  1 btusb
irqbypass              16384  1 kvm
btbcm                  16384  1 btusb
btintel                16384  1 btusb
snd_hda_intel          40960  4
snd_hda_codec         126976  3 snd_hda_intel,snd_hda_codec_hdmi,snd_hda_codec_generic
bluetooth             548864  43 btrtl,btintel,bnep,btbcm,rfcomm,btusb
snd_hda_core           81920  4 snd_hda_intel,snd_hda_codec,snd_hda_codec_hdmi,snd_hda_codec_generic
ecdh_generic           24576  2 bluetooth
crct10dif_pclmul       16384  0
snd_hwdep              20480  2 snd_hda_codec,snd_usb_audio
crc32_pclmul           16384  0
ghash_clmulni_intel    16384  0
pcbc                   16384  0
snd_pcm                98304  5 snd_hda_intel,snd_hda_codec,snd_usb_audio,snd_hda_core,snd_hda_codec_hdmi
snd_seq_midi           16384  0
snd_seq_midi_event     16384  1 snd_seq_midi
snd_rawmidi            32768  2 snd_seq_midi,snd_usbmidi_lib
aesni_intel           188416  2
aes_x86_64             20480  1 aesni_intel
crypto_simd            16384  1 aesni_intel
snd_seq                65536  2 snd_seq_midi_event,snd_seq_midi
joydev                 24576  0
glue_helper            16384  1 aesni_intel
cryptd                 24576  3 crypto_simd,ghash_clmulni_intel,aesni_intel
ath10k_pci             45056  0
input_leds             16384  0
ath10k_core           360448  1 ath10k_pci
ath                    28672  1 ath10k_core
serio_raw              16384  0
mac80211              778240  1 ath10k_core
wmi_bmof               16384  0
snd_seq_device         16384  3 snd_seq,snd_rawmidi,snd_seq_midi
cfg80211              622592  3 mac80211,ath,ath10k_core
fam15h_power           16384  0
snd_timer              32768  2 snd_seq,snd_pcm
snd                    81920  24 snd_hda_intel,snd_hwdep,snd_seq,snd_hda_codec,snd_usb_audio,snd_timer,snd_rawmidi,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_usbmidi_lib,snd_seq_device,snd_pcm
ideapad_laptop         32768  0
sparse_keymap          16384  1 ideapad_laptop
shpchp                 36864  0
tpm_crb                16384  0
soundcore              16384  1 snd
mac_hid                16384  0
sch_fq_codel           20480  3
parport_pc             36864  0
ppdev                  20480  0
lp                     20480  0
parport                49152  3 lp,parport_pc,ppdev
ip_tables              28672  0
x_tables               40960  1 ip_tables
autofs4                40960  2
hid_generic            16384  0
usbhid                 49152  0
uas                    24576  0
usb_storage            69632  1 uas
amdkfd                180224  1
amd_iommu_v2           20480  1 amdkfd
amdgpu               2703360  4
hid_rmi                20480  0
rmi_core               77824  1 hid_rmi
videobuf2_vmalloc      16384  2 uvcvideo,rmi_core
videobuf2_memops       16384  1 videobuf2_vmalloc
videobuf2_v4l2         24576  2 uvcvideo,rmi_core
videobuf2_core         40960  3 uvcvideo,videobuf2_v4l2,rmi_core
videodev              184320  4 uvcvideo,videobuf2_core,videobuf2_v4l2,rmi_core
chash                  16384  1 amdgpu
i2c_algo_bit           16384  1 amdgpu
media                  40960  2 uvcvideo,videodev
ttm                   106496  1 amdgpu
drm_kms_helper        167936  1 amdgpu
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
fb_sys_fops            16384  1 drm_kms_helper
ahci                   36864  5
i2c_piix4              24576  0
libahci                32768  1 ahci
r8169                  86016  0
mii                    16384  1 r8169
drm                   401408  6 amdgpu,ttm,drm_kms_helper
wmi                    24576  2 wmi_bmof,ideapad_laptop
video                  40960  1 ideapad_laptop
i2c_hid                20480  0
hid                   118784  4 i2c_hid,hid_generic,usbhid,hid_rmi


$ ifconfig enp2s0
enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 54:e1:ad:df:b3:c2  txqueuelen 1000  (Ethernet)
        RX packets 38  bytes 2408 (2.4 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 36  bytes 1518 (1.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

更新:我以为我需要 r8168 驱动程序,但结果发现我已加载了 r8169。无论如何,pppoeconf 没有加载(在我尝试对驱动程序进行一些操作之前),并且仍然找不到以太网卡。

答案1

驱动程序 r8168 仅涵盖三个特定设备。检查:

modinfo r8168

分别是 1186:4300、10ec:8161 和 10ec:8168。实际上,你的设备是这样的:

瑞昱半导体有限公司 RTL8101/2/6E PCI Express 快速/千兆以太网控制器 [10ec:8136]

您的 10ec:8136 设备不在本r8168-dkms_8.045.08-2_all.deb套餐的涵盖范围内,因此无法解决您的问题。

硬件设备的内核模块根据设备 ID(例如 10ec:8139)加载,以便不会为错误的设备加载错误的驱动程序。r8168 是错误的驱动程序。

相关内容