解决sddm Failed to read display number from pipe 0x0. 起因元旦学校放假,回家后就给电脑更新了一下.没想到重启后图形界面再起不能…
0x1. 现象开机后不能reach到graphical.target
,还接连冒出Core Dump,其他一切正常.可以通过Ctrl+Alt+Fx
切到传统的纯文字tty.
重新安装sddm/xorg不能解决.
因为可以进终端,所以还不是全无希望!
0x2. 解决尝试查看sddm的日志:
1 journalctl -u sddm --since '10 minutes ago'
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 systemd[1]: Started Simple Desktop Display Manager. sddm[513]: Initializing... sddm[513]: Starting... sddm[513]: Logind interface found sddm[513]: Adding new display... sddm[513]: Loaded empty theme configuration sddm[513]: Xauthority path: "/run/sddm/xauth_wwpcQg" sddm[513]: Using VT 2 sddm[513]: Display server starting... sddm[513]: Writing cookie to "/run/sddm/xauth_wwpcQg" sddm[513]: Running: /usr/bin/X -dpi 0 -background none -seat seat0 vt2 -auth /run/sddm/xauth_wwpcQg -noreset -displayfd 16 sddm[513]: Failed to read display number from pipe sddm[513]: Display server stopping... sddm[513]: Attempt 1 starting the Display server on vt 2 failed sddm[513]: Display server starting... sddm[513]: Writing cookie to "/run/sddm/xauth_wwpcQg" sddm[513]: Running: /usr/bin/X -dpi 0 -background none -seat seat0 vt2 -auth /run/sddm/xauth_wwpcQg -noreset -displayfd 16 sddm[513]: Failed to read display number from pipe sddm[513]: Display server stopping... sddm[513]: Attempt 2 starting the Display server on vt 2 failed sddm[513]: Display server starting... sddm[513]: Writing cookie to "/run/sddm/xauth_wwpcQg" sddm[513]: Running: /usr/bin/X -dpi 0 -background none -seat seat0 vt2 -auth /run/sddm/xauth_wwpcQg -noreset -displayfd 16 sddm[513]: Failed to read display number from pipe sddm[513]: Display server stopping... sddm[513]: Attempt 3 starting the Display server on vt 2 failed sddm[513]: Could not start Display server on vt 2 sddm[513]: Signal received: SIGTERM systemd[1]: Stopping Simple Desktop Display Manager... systemd[1]: sddm.service: Deactivated successfully. systemd[1]: Stopped Simple Desktop Display Manager. systemd[1]: Started Simple Desktop Display Manager.
注意到
1 2 Running: /usr/bin/X -dpi 0 -background none -seat seat0 vt2 -auth /run /sddm/xauth_wwpcQg -noreset -displayfd 16 Failed to read display number from pipe
发现每次失败前都尝试运行/usr/bin/X
,推测和xorg有关
遂尝试查看xorg日志:
1 sudo tail /var/log/Xorg.0.log -n 50
迎面一个报错,大概长这样:
1 2 /usr/lib/gdm-x-session[114514]: (EE) AIGLX error: dlopen of /usr/lib/dri/i965_dri.so failed (/usr/lib/dri/i965_dri.so: cannot open shared object file: No such file or directory) /usr/lib/gdm-x-session[114514]: (EE) AIGLX error: unable to load driver i965
发现丢了i965_dri.so
这么个驱动,看看是哪个包提供的
发现它是由extra/mesa-amber
提供的,尝试安装:yay -S mesa-amber
.
注意到安装过程中提示我安装了与之冲突的mesa
,卸载之,而后安装成功.
重启后问题解决.
0x3. 推测查阅资料发现i965的驱动本来是由mesa提供的,而因为一些原因该驱动被转到了它的amber
分支,可能这次更新把原来带的驱动正好刷掉了,导致我重启找不到驱动.