网络管理器未选择以太网连接的问题

网络管理器未选择以太网连接的问题

先生们:

升级到 Ubuntu 18.04.1 LTS 后,我没有遇到任何问题。不幸的是,2018 年 10 月 6 日的更新导致我的 NetworkManager.conf(位置 etc/Networkmanager)中出现错误,切换 [ifupdown] 时,结果为 false 而不是 true。我能够纠正该问题,如下所示。

[主要] 插件=ifupdown,keyfile

[ifupdown] managed=true(更新后设置为 false)

[设备] wifi.scan-rand-mac-address=no

然后,2018 年 10 月 13 日的更新导致 WiFi 和以太网之间出现问题。我的 eth0 连接仅在我重新启动笔记本电脑时才有效。只要我不关闭盖子(挂起)。如果我关闭盖子(挂起),WiFi 将成为活动连接。我可以看到有线连接(eth0)属性,它们都是正确的并且应该处于活动状态,但我无法建立连接。我尝试重置网络管理器并使用一些 Ubuntu 论坛中看到的 ifdown/up 命令,但似乎没有任何效果。我可以使用有线连接的唯一方法是重新启动笔记本电脑。值得注意的是,我对一些无法在 Ubuntu 中运行的 Windows 程序进行了双启动。我在 Windows 中使用有线连接绝对没有问题。

我运行了以下命令来为您提供一些信息:

sudo uname -a、sudo lsmod 和 sudo lspci

结果如下。

mario@mario-inspiron:~$ sudo uname -a

[sudo] mario 的密码:

Linux mario-inspiron 4.15.0-36-generic #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

mario@mario-inspiron:~$ sudo lsmod

Module                  Size  Used by
rfcomm                 77824  4
cmac                   16384  1
ccm                    20480  3
bnep                   20480  2
nls_iso8859_1          16384  1
uvcvideo               86016  0
ath3k                  20480  0
hid_multitouch         20480  0
btusb                  45056  0
btrtl                  16384  1 btusb
btbcm                  16384  1 btusb
btintel                16384  1 btusb
bluetooth             548864  34 btrtl,btintel,bnep,btbcm,rfcomm,ath3k,btusb
ecdh_generic           24576  2 bluetooth
dell_smbios_wmi        16384  0
wmi_bmof               16384  0
dell_laptop            20480  0
dell_smbios_smm        16384  0
dcdbas                 16384  1 dell_smbios_smm
intel_rapl             20480  0
dell_smm_hwmon         16384  0
x86_pkg_temp_thermal    16384  0
intel_powerclamp       16384  0
coretemp               16384  0
kvm_intel             212992  0
kvm                   598016  1 kvm_intel
irqbypass              16384  1 kvm
crct10dif_pclmul       16384  0
snd_hda_codec_hdmi     49152  1
crc32_pclmul           16384  0
ghash_clmulni_intel    16384  0
pcbc                   16384  0
aesni_intel           188416  4
aes_x86_64             20480  1 aesni_intel
crypto_simd            16384  1 aesni_intel
glue_helper            16384  1 aesni_intel
cryptd                 24576  3 crypto_simd,ghash_clmulni_intel,aesni_intel
intel_cstate           20480  0
intel_rapl_perf        16384  0
snd_hda_codec_realtek   106496  1
snd_hda_codec_generic    73728  1 snd_hda_codec_realtek
dell_wmi               16384  0
sparse_keymap          16384  1 dell_wmi
dell_smbios            16384  4 dell_wmi,dell_laptop,dell_smbios_wmi,dell_smbios_smm
input_leds             16384  0
serio_raw              16384  0
snd_hda_intel          40960  8
dell_wmi_descriptor    16384  2 dell_wmi,dell_smbios_wmi
joydev                 24576  0
arc4                   16384  2
snd_hda_codec         126976  4 snd_hda_intel,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
snd_hda_core           81920  5 snd_hda_intel,snd_hda_codec,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_codec_realtek
ath9k                 151552  0
snd_hwdep              20480  1 snd_hda_codec
snd_seq_midi           16384  0
snd_seq_midi_event     16384  1 snd_seq_midi
ath9k_common           36864  1 ath9k
snd_pcm                98304  4 snd_hda_intel,snd_hda_codec,snd_hda_core,snd_hda_codec_hdmi
ath9k_hw              471040  2 ath9k,ath9k_common
snd_rawmidi            32768  1 snd_seq_midi
ath                    28672  3 ath9k_hw,ath9k,ath9k_common
mac80211              778240  1 ath9k
snd_seq                65536  2 snd_seq_midi_event,snd_seq_midi
snd_seq_device         16384  3 snd_seq,snd_rawmidi,snd_seq_midi
snd_timer              32768  2 snd_seq,snd_pcm
cfg80211              622592  4 mac80211,ath9k,ath,ath9k_common
lpc_ich                24576  0
mei_me                 40960  0
snd                    81920  27 snd_hda_intel,snd_hwdep,snd_seq,snd_hda_codec,snd_timer,snd_rawmidi,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_seq_device,snd_hda_codec_realtek,snd_pcm
dell_rbtn              16384  0
shpchp                 36864  0
mei                    90112  1 mei_me
soundcore              16384  1 snd
mac_hid                16384  0
dw_dmac                16384  0
dw_dmac_core           24576  1 dw_dmac
sch_fq_codel           20480  2
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
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
media                  40960  2 uvcvideo,videodev
i915                 1617920  20
i2c_algo_bit           16384  1 i915
drm_kms_helper        172032  1 i915
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
r8169                  86016  0
ahci                   36864  3
drm                   401408  15 i915,drm_kms_helper
libahci                32768  1 ahci
mii                    16384  1 r8169
wmi                    24576  4 dell_wmi,wmi_bmof,dell_wmi_descriptor,dell_smbios_wmi
i2c_hid                20480  0
hid                   118784  5 i2c_hid,hid_generic,usbhid,hid_rmi,hid_multitouch
video                  45056  3 dell_wmi,dell_laptop,i915

mario@mario-inspiron:~$ sudo 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: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. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller (rev 07)

马里奥@马里奥-inspiron:~$

答案1

您可能已经陷入了时间问题,特别是当您使用 SSD 运行时......

如果您在 SSD 上运行,则可能会存在启动速度比网络上线速度快的风险,然后您需要修改以下文件:/etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service

[Unit]
Description=Network Manager Wait Online
Documentation=man:nm-online(1)
Requires=NetworkManager.service
After=NetworkManager.service
Before=network-online.target

[Service] Type=oneshot ExecStart=/usr/bin/nm-online -s -q --timeout=60 RemainAfterExit=yes

[Install] WantedBy=network-online.target

并将超时时间从 改为3060重新启动。

更新#1:

将 NetworkManager.conf[ifupdown] managed=true重新设置为false。现在一切正常。

相关内容