Fedora

NetworkManager 不檢測電纜何時連接或斷開

  • October 4, 2020

在我的 Fedora 21 64bit Gnome 3.14.3 安裝中,我注意到 NeworkManager 總是連接到有線連接,即使沒有連接電纜:

在此處輸入圖像描述

但是,驅動程序(或其他東西)確實知道它是否已連接 - 我可以通過以下方式看到watch "dmesg | tail -10"

[ 7349.552202] atl1c 0000:07:00.0: atl1c: enp7s0 NIC Link is Down
[ 7373.496359] IPv6: ADDRCONF(NETDEV_UP): enp7s0: link is not ready
[ 7376.271449] atl1c 0000:07:00.0: atl1c: enp7s0 NIC Link is Up<100 Mbps Full Duplex>
[ 7376.271482] IPv6: ADDRCONF(NETDEV_CHANGE): enp7s0: link becomes ready
[ 7553.088393] atl1c 0000:07:00.0: atl1c: enp7s0 NIC Link is Down
[ 7597.096174] atl1c 0000:07:00.0: atl1c: enp7s0 NIC Link is Up<100 Mbps Full Duplex>
[ 7620.983378] atl1c 0000:07:00.0: atl1c: enp7s0 NIC Link is Down
[ 7622.556874] atl1c 0000:07:00.0: atl1c: enp7s0 NIC Link is Up<100 Mbps Full Duplex>

當電纜拔出時,這會導致問題,但它仍然認為它已連接到網際網路,並嘗試同步或連接並失敗。

  • lspci -v
07:00.0 Ethernet controller: Qualcomm Atheros AR8152 v2.0 Fast Ethernet (rev c1)
   Subsystem: Lenovo Device 3979
   Flags: bus master, fast devsel, latency 0, IRQ 29
   Memory at e0500000 (64-bit, non-prefetchable) [size=256K]
   I/O ports at 2000 [size=128]
   Capabilities: <access denied>
   Kernel driver in use: atl1c
   Kernel modules: atl1c
  • ifconfig:
enp7s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
       inet 192.168.1.22  netmask 255.255.255.0  broadcast 192.168.1.255
       inet6 fe80::de0e:a1ff:fed1:d12b  prefixlen 64  scopeid 0x20<link>
       ether dc:0e:a1:d1:d1:2b  txqueuelen 1000  (Ethernet)
       RX packets 111875  bytes 67103677 (63.9 MiB)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 87152  bytes 7793021 (7.4 MiB)
       TX errors 0  dropped 0 overruns 0  carrier 13  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
       inet 127.0.0.1  netmask 255.0.0.0
       inet6 ::1  prefixlen 128  scopeid 0x10<host>
       loop  txqueuelen 0  (Local Loopback)
       RX packets 3669  bytes 880913 (860.2 KiB)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 3669  bytes 880913 (860.2 KiB)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  • sudo yum list installed NetworkManager*
Installed Packages
NetworkManager.x86_64                                                        1:0.9.10.1-1.4.20150115git.fc21                                @updates                    
NetworkManager-adsl.x86_64                                                   1:0.9.10.1-1.4.20150115git.fc21                                @updates                    
NetworkManager-bluetooth.x86_64                                              1:0.9.10.1-1.4.20150115git.fc21                                @updates                    
NetworkManager-config-connectivity-fedora.x86_64                             1:0.9.10.1-1.4.20150115git.fc21                                @updates                    
NetworkManager-config-server.x86_64                                          1:0.9.10.1-1.4.20150115git.fc21                                @updates                    
NetworkManager-devel.x86_64                                                  1:0.9.10.1-1.4.20150115git.fc21                                @updates                    
NetworkManager-glib.x86_64                                                   1:0.9.10.1-1.4.20150115git.fc21                                @updates                    
NetworkManager-glib-devel.x86_64                                             1:0.9.10.1-1.4.20150115git.fc21                                @updates                    
NetworkManager-iodine.x86_64                                                 0.0.4-4.fc21                                                   @fedora                     
NetworkManager-iodine-gnome.x86_64                                           0.0.4-4.fc21                                                   @fedora                     
NetworkManager-l2tp.x86_64                                                   0.9.8.7-3.fc21                                                 @fedora                     
NetworkManager-openconnect.x86_64                                            0.9.8.6-2.fc21                                                 @updates                    
NetworkManager-openswan.x86_64                                               0.9.8.4-4.fc21                                                 @fedora                     
NetworkManager-openswan-gnome.x86_64                                         0.9.8.4-4.fc21                                                 @fedora                     
NetworkManager-openvpn.x86_64                                                1:0.9.9.0-3.git20140128.fc21                                   @koji-override-0/$releasever
NetworkManager-openvpn-gnome.x86_64                                          1:0.9.9.0-3.git20140128.fc21                                   @koji-override-0/$releasever
NetworkManager-pptp.x86_64                                                   1:0.9.8.2-6.fc21                                               @koji-override-0/$releasever
NetworkManager-pptp-gnome.x86_64                                             1:0.9.8.2-6.fc21                                               @koji-override-0/$releasever
NetworkManager-ssh.x86_64                                                    0.9.3-0.3.20140601git9d834f2.fc21                              @fedora                     
NetworkManager-ssh-gnome.x86_64                                              0.9.3-0.3.20140601git9d834f2.fc21                              @fedora                     
NetworkManager-tui.x86_64                                                    1:0.9.10.1-1.4.20150115git.fc21                                @updates                    
NetworkManager-vpnc.x86_64                                                   1:0.9.9.0-6.git20140428.fc21                                   @koji-override-0/$releasever
NetworkManager-vpnc-gnome.x86_64                                             1:0.9.9.0-6.git20140428.fc21                                   @koji-override-0/$releasever
NetworkManager-wifi.x86_64                                                   1:0.9.10.1-1.4.20150115git.fc21                                @updates                    
NetworkManager-wwan.x86_64                                                   1:0.9.10.1-1.4.20150115git.fc21                                @updates                    
  • modinfo atl1c
filename:       /lib/modules/3.17.8-300.fc21.x86_64/kernel/drivers/net/ethernet/atheros/atl1c/atl1c.ko.xz
version:        1.0.1.1-NAPI
license:        GPL
description:    Qualcom Atheros 100/1000M Ethernet Network Driver
author:         Qualcomm Atheros Inc., <nic-devel@qualcomm.com>
author:         Jie Yang
srcversion:     4333D8ADEE755DD5ABDF0B8
alias:          pci:v00001969d00001083sv*sd*bc*sc*i*
alias:          pci:v00001969d00001073sv*sd*bc*sc*i*
alias:          pci:v00001969d00002062sv*sd*bc*sc*i*
alias:          pci:v00001969d00002060sv*sd*bc*sc*i*
alias:          pci:v00001969d00001062sv*sd*bc*sc*i*
alias:          pci:v00001969d00001063sv*sd*bc*sc*i*
depends:        
intree:         Y
vermagic:       3.17.8-300.fc21.x86_64 SMP mod_unload 
signer:         Fedora kernel signing key
sig_key:        F4:8F:FC:A3:C9:62:D6:47:0F:1A:63:E0:32:D1:F5:F1:93:2A:03:6A
sig_hashalgo:   sha256


如果這是一個錯誤,是 NetworkManager 還是其他什麼?在 Fedora 19 下使用相同的驅動程序(在其備份中的最新核心中似乎是相同的版本),我對此沒有任何問題。

我最終開始整理一份錯誤報告,並被告知刪除NetworkManager-config-server軟體包可以解決它 - 所以我這樣做了:

sudo yum autoremove NetworkManager-config-server

然後我重新啟動,它工作:)

在 Fedora32 上我做了

sudo dnf remove NetworkManager-config-connectivity-fedora

重新啟動,問題消失了

引用自:https://unix.stackexchange.com/questions/181152