这个问题在 Ubuntu 16.04、18.04 上随机发生,现在在 Ubuntu 18.10 上也发生了同样的情况。我的路由器 100% 正常,Windows 上没有断开连接。这个问题是随机发生的。值得一提的是,我重新启动系统后,互联网恢复正常,当我单击“重新启动”时,它永远不会重新启动,只是冻结在显示 Ubuntu 18.10 的紫色屏幕上,进度条永远无休止地继续,什么也没发生。我已经向我的互联网提供商确认我的路由器 100% 正常。
输出lshw -C network
:
*-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:03:00.0
logical name: eth0
version: 06
serial: 74:d4:35:b7:c0:58
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168e-3_0.0.4 03/27/12 ip=192.168.0.52 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
resources: irq:18 ioport:d000(size=256) memory:f7100000-f7100fff memory:f2100000-f2103fff
更新
我刚刚再次断开了互联网连接,当我单击“重新启动”时,系统不会重新启动,它只是卡在黑屏上并且什么也没有发生,所以同样的问题继续发生。
这是我断线时系统日志的输出。断线时间是 00:07,最后的日志似乎是在 00:05:31 记录的。
May 9 23:48:22 Home CRON[7191]: (CRON) info (No MTA installed, discarding output)
May 9 23:55:01 Home CRON[7621]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
May 10 00:00:10 Home systemd[1]: Starting Rotate log files...
May 10 00:00:10 Home systemd[1]: Started Rotate log files.
May 10 00:01:10 Home avahi-daemon[1209]: Withdrawing address record for 192.168.0.52 on eth0.
May 10 00:01:10 Home avahi-daemon[1209]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.0.52.
May 10 00:01:10 Home avahi-daemon[1209]: Interface eth0.IPv4 no longer relevant for mDNS.
May 10 00:01:10 Home gsd-sharing[3239]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit rygel.service not loaded.
May 10 00:01:10 Home gsd-sharing[3239]: Failed to StopUnit service: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit gnome-remote-desktop.service not loaded.
May 10 00:01:30 Home whoopsie[2622]: [00:01:30] Cannot reach: https://daisy.ubuntu.com
May 10 00:01:30 Home whoopsie[2622]: [00:01:30] offline
May 10 00:01:31 Home NetworkManager[1208]: <info> [1557439291.1038] manager: NetworkManager state is now CONNECTED_SITE
May 10 00:01:31 Home dbus-daemon[1206]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.16' (uid=0 pid=1208 comm="/usr/sbin/NetworkManager --no-daemon " label="unconfined")
May 10 00:01:31 Home systemd[1]: Starting Network Manager Script Dispatcher Service...
May 10 00:01:31 Home dbus-daemon[1206]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
May 10 00:01:31 Home nm-dispatcher: req:1 'connectivity-change': new request (1 scripts)
May 10 00:01:31 Home systemd[1]: Started Network Manager Script Dispatcher Service.
May 10 00:01:31 Home nm-dispatcher: req:1 'connectivity-change': start running ordered scripts...
May 10 00:01:32 Home org.gnome.Shell.desktop[2993]: [4431:4453:0510/000132.767330:ERROR:connection_factory_impl.cc(413)] Failed to connect to MCS endpoint with error -137
May 10 00:02:21 Home org.gnome.Shell.desktop[2993]: [4431:4453:0510/000221.135841:ERROR:connection_factory_impl.cc(413)] Failed to connect to MCS endpoint with error -137
May 10 00:03:31 Home org.gnome.Shell.desktop[2993]: [4431:4453:0510/000331.635348:ERROR:connection_factory_impl.cc(413)] Failed to connect to MCS endpoint with error -137
May 10 00:05:01 Home CRON[7935]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
May 10 00:05:31 Home org.gnome.Shell.desktop[2993]: [4431:4453:0510/000531.731239:ERROR:connection_factory_impl.cc(413)] Failed to connect to MCS endpoint with error -137
答案1
1. 首先了解基础知识,让我们检查您的文件系统...
- 启动至 Ubuntu Live DVD/USB
- 打开
terminal
窗户 - 类型
sudo fdisk -l
- 识别“Linux 文件系统”的 /dev/XXXX 设备名称
- 输入
sudo fsck -f /dev/XXXX
# 用你之前找到的数字替换 XXXX - 如果有错误,请重复 fsck 命令
- 类型
reboot
2. 接下来,让我们尝试不同的以太网驱动程序,因为已知 r8169 驱动程序在 18.xx 中存在此问题...
在terminal
...
sudo apt-get update
# 更新软件数据库
sudo apt-get install dkms r8168-dkms
# 安装替换驱动程序
reboot
# 重启计算机
验证操作。
3. 最后,在重启冻结时,按 ESC 键查看它挂起的位置。
答案2
@jedi 从您 5 月 10 日的日志中,特别是这一行:avahi-daemon[1209]: Withdrawing address record for 192.168.0.52 on eth0,对我来说,您的问题可能与以下情况有关:avahi-daemon 和“.local”域名问题。
您可以尝试 Stack Exchange 线程中描述的以下两种解决方案之一:
(1)修改/etc/avahi/avahi-daemon.conf
From: domain-name=.local
To: domain-name=alocal
注意:iOS 设备可能无法“看到”您的 PC。
(2) 更改路由器中的域名,例如从 local 更改为 lan。如果您提供路由器的品牌和型号,我们可以帮助您更改路由器中的域名。