无法使用 18.04 连接到我的家庭以太网网络 - 电缆已拔出

无法使用 18.04 连接到我的家庭以太网网络 - 电缆已拔出

我无法在笔记本电脑上连接到家庭以太网网络,因为 Ubuntu 18.04 显示“电缆已拔出”,尽管它肯定已插入。在同一台笔记本电脑上使用 Windows 7 时,我并没有遇到这样的问题。

我尝试了以下针对同一问题的解决方案,但均不起作用。

  • 取出电池并等待 15 分钟,然后重新启动笔记本电脑;
  • 安装 ifplugd(一个用于检查电缆状态的守护进程)并重新启动笔记本电脑。

是否配置

enp7s0f5: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
ether f4:6d:04:51:d1:6a  txqueuelen 1000  (Ethernet)
RX packets 0  bytes 0 (0.0 B)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 0  bytes 0 (0.0 B)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
device interrupt 35

消息 | grep eth

[    1.339232] jme: JMicron JMC2XX ethernet driver version 1.0.8
[    1.340310] jme 0000:07:00.5 eth0: JMC250 Gigabit Ethernet chiprev:23 pcirev:3 macaddr:f4:6d:04:51:d1:6a
[    1.352643] jme 0000:07:00.5 enp7s0f5: renamed from eth0

修改

ccm                    20480  6
uvcvideo               94208  0
videobuf2_vmalloc      20480  1 uvcvideo
videobuf2_memops       20480  1 videobuf2_vmalloc
videobuf2_v4l2         24576  1 uvcvideo
videobuf2_common       53248  2 videobuf2_v4l2,uvcvideo
videodev              217088  3 videobuf2_v4l2,uvcvideo,videobuf2_common
mc                     53248  4 videodev,videobuf2_v4l2,uvcvideo,videobuf2_common
snd_hda_codec_hdmi     61440  1
snd_hda_codec_realtek   126976  1
snd_hda_codec_generic    81920  1 snd_hda_codec_realtek
intel_powerclamp       20480  0
coretemp               20480  0
ledtrig_audio          16384  2 snd_hda_codec_generic,snd_hda_codec_realtek
kvm_intel             253952  0
snd_hda_intel          49152  6
snd_intel_dspcfg       24576  1 snd_hda_intel
kvm                   655360  1 kvm_intel
snd_hda_codec         131072  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core           90112  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
ath9k                 151552  0
i915                 1978368  35
snd_hwdep              20480  1 snd_hda_codec
ath9k_common           36864  1 ath9k
ath9k_hw              475136  2 ath9k_common,ath9k
drm_kms_helper        184320  1 i915
snd_pcm               102400  4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
intel_cstate           20480  0
snd_seq_midi           20480  0
snd_seq_midi_event     16384  1 snd_seq_midi
ath                    36864  3 ath9k_common,ath9k,ath9k_hw
snd_rawmidi            36864  1 snd_seq_midi
drm                   491520  19 drm_kms_helper,i915
mac80211              851968  1 ath9k
mei_me                 40960  0
snd_seq                69632  2 snd_seq_midi,snd_seq_midi_event
cfg80211              712704  4 ath9k_common,ath9k,ath,mac80211
i2c_algo_bit           16384  1 i915
fb_sys_fops            16384  1 drm_kms_helper
syscopyarea            16384  1 drm_kms_helper
libarc4                16384  1 mac80211
sysfillrect            16384  1 drm_kms_helper
snd_seq_device         16384  3 snd_seq,snd_seq_midi,snd_rawmidi
snd_timer              36864  2 snd_seq,snd_pcm
sysimgblt              16384  1 drm_kms_helper
joydev                 28672  0
input_leds             16384  0
snd                    86016  23 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm,snd_rawmidi
mei                   102400  1 mei_me
serio_raw              20480  0
intel_ips              28672  0
asus_laptop            32768  0
soundcore              16384  1 snd
sparse_keymap          16384  1 asus_laptop
input_polldev          20480  1 asus_laptop
lpc_ich                24576  0
mac_hid                16384  0
sch_fq_codel           20480  2
parport_pc             40960  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
ahci                   40960  2
jme                    36864  0
libahci                32768  1 ahci
psmouse               151552  0
sdhci_pci              53248  0
mii                    16384  1 jme
cqhci                  28672  1 sdhci_pci
sdhci                  65536  1 sdhci_pci
video                  49152  2 i915,asus_laptop

(编辑 1 - 2020 年 9 月 17 日)我正在运行桌面版。

sudo lshw -C 网络

  *-network                 
       description: Wireless interface
       product: AR9285 Wireless Network Adapter (PCI-Express)
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: wlp3s0
       version: 01
       serial: 74:2f:68:1b:5d:7a
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=ath9k driverversion=5.4.0-47-generic firmware=N/A ip=192.168.1.39 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:17 memory:f5400000-f540ffff
  *-network
       description: Ethernet interface
       product: JMC250 PCI Express Gigabit Ethernet Controller
       vendor: JMicron Technology Corp.
       physical id: 0.5
       bus info: pci@0000:07:00.5
       logical name: enp7s0f5
       version: 03
       serial: f4:6d:04:51:d1:6a
       size: 10Mbit/s
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm pciexpress msix msi bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=jme driverversion=1.0.8 duplex=half latency=0 link=no multicast=yes port=MII speed=10Mbit/s
       resources: irq:35 memory:f0400000-f0403fff ioport:8100(size=128) ioport:8000(size=256)

猫/等/网络/接口

auto lo
iface lo inet loopback

猫/etc/netplan/*.yaml

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

答案1

我找到了一个解决方案:)

我安装了 ethtool

sudo apt-get install ethtool

并简单地运行一个命令

sudo ethtool -s enp7s0f5 autoneg off speed 100 duplex full

其中 enp7s0f5 是我的以太网接口,先前使用 ifconfig 获得。

话虽如此,我逐渐意识到当我重新启动 PC 时,此更改将被丢弃,因此如果是这种情况,我将尝试在启动时自动运行此命令。一旦我确定有必要并且知道如何做到这一点,我就会编辑此答案。

相关内容