![Ubuntu 23.10 在执行多个任务(例如复制粘贴多个窗口/桌面)时崩溃并关闭所有应用程序](https://linux22.com/image/954420/Ubuntu%2023.10%20%E5%9C%A8%E6%89%A7%E8%A1%8C%E5%A4%9A%E4%B8%AA%E4%BB%BB%E5%8A%A1%EF%BC%88%E4%BE%8B%E5%A6%82%E5%A4%8D%E5%88%B6%E7%B2%98%E8%B4%B4%E5%A4%9A%E4%B8%AA%E7%AA%97%E5%8F%A3%2F%E6%A1%8C%E9%9D%A2%EF%BC%89%E6%97%B6%E5%B4%A9%E6%BA%83%E5%B9%B6%E5%85%B3%E9%97%AD%E6%89%80%E6%9C%89%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F.png)
我在配备 32 GB 内存的 Lenovo ThinkPad X1 Carbon Gen 9 上安装了 ubuntu 23.10。我使用戴尔扩展坞连接 2 台显示器。每当我尝试在不同的窗口之间复制文本时,就会发生大量崩溃,比如从 Edge 浏览器复制到另一个桌面上的 Slack。崩溃主要发生在我非常快速地在窗口之间切换、将光标非常快速地从一个屏幕移动到另一个屏幕以粘贴该屏幕上的应用程序时。
以下日志显示发生这种情况时的系统日志内容。
2023-11-17T15:51:27.131545+00:00 MYCOMP gnome-shell[10043]: Window manager warning: Ping serial 1854496 was reused for window W27, previous use was for window W26.
2023-11-17T15:51:27.151823+00:00 MYCOMP gnome-shell[16030]: (EE)
2023-11-17T15:51:27.151977+00:00 MYCOMP gnome-shell[16030]: (EE) Backtrace:
2023-11-17T15:51:27.152048+00:00 MYCOMP gnome-shell[16030]: (EE) 0: /usr/bin/Xwayland (0x55f87307c000+0x1660a2) [0x55f8731e20a2]
2023-11-17T15:51:27.152165+00:00 MYCOMP gnome-shell[16030]: (EE) 1: /usr/bin/Xwayland (0x55f87307c000+0x1661a4) [0x55f8731e21a4]
2023-11-17T15:51:27.152232+00:00 MYCOMP gnome-shell[16030]: (EE) 2: /lib/x86_64-linux-gnu/libc.so.6 (0x7efc13000000+0x42910) [0x7efc13042910]
2023-11-17T15:51:27.152294+00:00 MYCOMP gnome-shell[16030]: (EE)
2023-11-17T15:51:27.152348+00:00 MYCOMP gnome-shell[16030]: (EE) Segmentation fault at address 0x0
2023-11-17T15:51:27.152403+00:00 MYCOMP gnome-shell[16030]: (EE)
2023-11-17T15:51:27.152461+00:00 MYCOMP gnome-shell[16030]: Fatal server error:
2023-11-17T15:51:27.152518+00:00 MYCOMP gnome-shell[16030]: (EE) Caught signal 11 (Segmentation fault). Server aborting
2023-11-17T15:51:27.152575+00:00 MYCOMP gnome-shell[16030]: (EE)
2023-11-17T15:51:28.339924+00:00 MYCOMP vmware-player.desktop[16375]: XINFO: IO fatal error.
2023-11-17T15:51:28.340142+00:00 MYCOMP gnome-shell[10043]: Connection to xwayland lost
2023-11-17T15:51:28.340306+00:00 MYCOMP microsoft-edge.desktop[16441]: [16483:16483:1117/155128.339846:ERROR:connection.cc(46)] X connection error received.
2023-11-17T15:51:28.342162+00:00 MYCOMP gnome-shell[10043]: X Wayland crashed; attempting to recover
2023-11-17T15:51:28.344031+00:00 MYCOMP systemd[9705]: Stopped target gnome-session-x11-services-ready.target - GNOME session X11 services.
2023-11-17T15:51:28.344357+00:00 MYCOMP systemd[9705]: Stopping org.gnome.SettingsDaemon.XSettings.service - GNOME XSettings service...
2023-11-17T15:51:28.346396+00:00 MYCOMP systemd[9705]: org.gnome.SettingsDaemon.XSettings.service: Main process exited, code=exited, status=1/FAILURE
2023-11-17T15:51:28.349286+00:00 MYCOMP gnome-shell[10043]: Meta.Rectangle is deprecated, use Mtk.Rectangle instead
2023-11-17T15:51:28.350267+00:00 MYCOMP gnome-shell[10043]: Window manager warning: META_CURRENT_TIME used to choose focus window; focus window may not be correct.
2023-11-17T15:51:28.353975+00:00 MYCOMP gnome-shell[10043]: Meta.Rectangle is deprecated, use Mtk.Rectangle instead
2023-11-17T15:51:28.354297+00:00 MYCOMP gnome-shell[10043]: Using public X11 display :0, (using :1 for managed services)
2023-11-17T15:51:28.394467+00:00 MYCOMP systemd[9705]: org.gnome.SettingsDaemon.XSettings.service: Failed with result 'exit-code'.
2023-11-17T15:51:28.394691+00:00 MYCOMP systemd[9705]: Stopped org.gnome.SettingsDaemon.XSettings.service - GNOME XSettings service.
2023-11-17T15:51:28.394852+00:00 MYCOMP systemd[9705]: Stopped target gnome-session-x11-services.target - GNOME session X11 services.
Apport 错误日志有以下内容
INFO: apport (pid 26983) 2023-11-17 14:10:54,050: called for pid 21276, signal 6, core limit 18446744073709551615, dump mode 1
ERROR: apport (pid 26983) 2023-11-17 14:10:54,050: ignoring implausibly big core limit, treating as unlimited
INFO: apport (pid 26983) 2023-11-17 14:10:54,052: executable: /usr/bin/Xwayland (command line "/usr/bin/Xwayland :0 -rootless -noreset -accessx -core -auth /run/user/1000/.mutter-Xwaylandauth.URSSE2 -listenfd 4 -listenfd 5 -displayfd 6 -initfd 7 -byteswappedclients")
ERROR: apport (pid 26983) 2023-11-17 14:10:55,055: this executable already crashed 2 times, ignoring
INFO: apport (pid 26983) 2023-11-17 14:10:55,055: writing core dump to /var/lib/apport/coredump/core._usr_bin_Xwayland.1000.5f508668-a6c5-4640-a1cf-341969a515d8.21276.6779968 (limit: -1)
答案1
升级到 Ubuntu 23.10 后,我遇到了同样的 Gnome Shell 崩溃问题。
反复试验表明,对我来说,是 VMWare Workstation (Pro) 导致了崩溃。如果我只运行后台服务和内核模块,即使没有运行 VM/桌面应用程序,半小时左右后也会崩溃。
我只是偶尔使用 VMWare,因此在不需要时停止所有 VMWare 服务并卸载内核模块可以避免崩溃发生:
killall vmware-tray && sudo killall vmnet-bridge && sudo systemctl stop vmware-USBArbitrator.service && sudo systemctl stop vmware.service && sudo modprobe -r vmmon && sudo modprobe -r vmnet
即使重启后您也需要执行此操作,因为内核模块将自动加载。
然后加载内核模块并启动基本的 VMWare 服务,下面的操作对我来说允许再次使用 VM:
sudo systemctl start vmware.service && sudo modprobe vmmon && sudo modprobe vmnet
我不确定您是否使用 VMWare,但如果没有,希望这可以对其他人有所帮助。