Debian 10 (buster) - gdm3 仅在“systemctl restart gdm3”之后启动

Debian 10 (buster) - gdm3 仅在“systemctl restart gdm3”之后启动

我目前已经安装了 Debian Stretch 的新安装。我跟着关于如何更新到 Debian 测试 (buster) 的说明一切都很顺利。我重新启动了系统,一切正常。

接下来,我在此系统上为我的系统编译了 4.19.5 内核:

$ git clone -b kernel_4.19.y git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
$ cd linux
$ cp /boot/config-`uname -r` .config
$ yes "" | make oldconfig
$ make -j64 bzImage modules
$ sudo make modules_install install
$ sudo update-grub
$ sudo reboot

编译内核非常顺利,内核启动,一切正常。例外gdm3:启动内核后不会启动。

所以我再次启动 Debian 4.18.y 内核,但仍然只是黑屏。再次启动 4.19.5,我从这台机器上的另一台机器上进行 ssh 并发出systemctl restart gdm3. 2-4 秒后,登录屏幕会在我的显示屏上弹出,一切都按预期进行。

再次,重新启动系统。没有登录屏幕,只有黑色。再次,在机器上进行 ssh 操作,重新启动gdm3,一切都会按预期弹出。

我已经在日志中挖掘了gdm3它何时无法启动的情况。

Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (II) config/udev: removing GPU device /sys/devices/pci0000:40/0000:40:03.1/0000:43:00.0/drm/card0 /dev/dri/card0
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: xf86: remove device 0 /sys/devices/pci0000:40/0000:40:03.1/0000:43:00.0/drm/card0
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: failed to find screen to remove
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: dbus-daemon[1264]: [session uid=103 pid=1264] Activating service name='org.freedesktop.systemd1' requested by ':1.0' (uid=103 pid=1176 comm="/usr/lib/gdm3/gdm-x-session gnome-session --autost")
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: dbus-daemon[1264]: [session uid=103 pid=1264] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
Nov 28 12:11:46 bamdevsrv gdm3[1102]: GdmManager: trying to register new display
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: Unable to register display with display manager
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (**) Option "fd" "25"
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (II) event1  - Power Button: device removed
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (**) Option "fd" "28"
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (II) event0  - Power Button: device removed
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (**) Option "fd" "29"
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (II) event16 - Cherry USB keyboard: device removed
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (**) Option "fd" "30"
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (II) event18 - Cherry USB keyboard System Control: device removed
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (**) Option "fd" "31"
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (II) event19 - Cherry USB keyboard Consumer Control: device removed
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (**) Option "fd" "32"
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (II) event20 - PixArt Cherry USB Optical Mouse: device removed
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (II) UnloadModule: "libinput"
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (II) systemd-logind: releasing fd for 13:84
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (II) UnloadModule: "libinput"
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (II) systemd-logind: releasing fd for 13:83
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (II) UnloadModule: "libinput"
Nov 28 12:11:46 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (II) systemd-logind: releasing fd for 13:82
Nov 28 12:11:47 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (II) UnloadModule: "libinput"
Nov 28 12:11:47 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (II) systemd-logind: releasing fd for 13:80
Nov 28 12:11:47 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (II) UnloadModule: "libinput"
Nov 28 12:11:47 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (II) systemd-logind: releasing fd for 13:64
Nov 28 12:11:47 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (II) UnloadModule: "libinput"
Nov 28 12:11:47 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (II) systemd-logind: releasing fd for 13:65
Nov 28 12:11:47 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (II) RADEON(0): RADEONCloseScreen
Nov 28 12:11:47 bamdevsrv /usr/lib/gdm3/gdm-x-session[1176]: (II) Server terminated successfully (0). Closing log file.
Nov 28 12:11:47 bamdevsrv gdm3[1102]: GdmSession: Emitting 'session-exited' signal with exit code '70'
Nov 28 12:11:47 bamdevsrv gdm3[1102]: GdmSession: stopping conversation gdm-launch-environment
Nov 28 12:11:47 bamdevsrv gdm3[1102]: GdmSessionWorkerJob: Stopping job pid:1170
Nov 28 12:11:47 bamdevsrv gdm3[1102]: GdmCommon: sending signal 15 to process 1170
Nov 28 12:11:47 bamdevsrv gdm3[1102]: GdmDisplay: Greeter exited: 70
Nov 28 12:11:47 bamdevsrv gdm3[1102]: GdmLocalDisplayFactory: display status changed: 4
Nov 28 12:11:47 bamdevsrv gdm3[1102]: GdmDisplay: finish display
Nov 28 12:11:47 bamdevsrv gdm3[1102]: GdmDisplayStore: Unreffing display: 0x55da450b4350
Nov 28 12:11:47 bamdevsrv gdm3[1102]: GdmDisplay: Disposing display
Nov 28 12:11:47 bamdevsrv gdm3[1102]: GdmCommon: sending signal 15 to process -1176
Nov 28 12:11:47 bamdevsrv gdm3[1102]: Child process -1176 was already dead.
Nov 28 12:11:47 bamdevsrv gdm3[1102]: GdmSession: Closing session
Nov 28 12:11:47 bamdevsrv gdm3[1102]: GdmSession: Stopping all conversations
Nov 28 12:11:47 bamdevsrv gdm3[1102]: GdmSessionWorkerJob: Stopping job pid:1170
Nov 28 12:11:47 bamdevsrv gdm3[1102]: GdmCommon: sending signal 15 to process 1170
Nov 28 12:11:47 bamdevsrv gdm3[1102]: GdmSessionWorkerJob: Waiting on process 1170
Nov 28 12:11:47 bamdevsrv gdm3[1102]: GdmCommon: process (pid:1170) done (status:0)
Nov 28 12:11:47 bamdevsrv gdm3[1102]: GdmSessionWorkerJob: SessionWorkerJob died
Nov 28 12:11:47 bamdevsrv gdm3[1102]: GdmSession: Disposing session
Nov 28 12:11:47 bamdevsrv gdm3[1102]: GdmSession: Closing session
Nov 28 12:11:47 bamdevsrv gdm3[1102]: GdmSession: Stopping all conversations
Nov 28 12:11:47 bamdevsrv gdm3[1102]: GdmDisplay: Finalizing display: /org/gnome/DisplayManager/Displays/94395949597520

最后就卡在了Finalizing display。重新启动后,日志看起来几乎相同,但随后会继续Finalizing display显示许多其他输出。

Nov 28 13:59:16 bamdevsrv gdm3[1129]: GdmSession: Disposing session
Nov 28 13:59:16 bamdevsrv gdm3[1129]: GdmSession: Closing session
Nov 28 13:59:16 bamdevsrv gdm3[1129]: GdmSession: Stopping all conversations
Nov 28 13:59:16 bamdevsrv gdm3[1129]: GdmDisplay: Finalizing display: /org/gnome/DisplayManager/Displays/93976516326224
Nov 28 14:02:49 bamdevsrv gdm3[1129]: GDM finished, cleaning up...
Nov 28 14:02:49 bamdevsrv gdm3[1129]: GdmDisplayStore: Clearing display store
Nov 28 14:02:49 bamdevsrv gdm3[2448]: Enabling debugging
Nov 28 14:02:49 bamdevsrv gdm3[2448]: Changing user:group to Debian-gdm:Debian-gdm
Nov 28 14:02:49 bamdevsrv gdm3[2448]: Successfully connected to D-Bus
Nov 28 14:02:49 bamdevsrv gdm3[2448]: GdmManager: GDM starting to manage displays
Nov 28 14:02:49 bamdevsrv gdm3[2448]: GLib: posix_spawn avoided (fd close requested)
Nov 28 14:02:49 bamdevsrv gdm3[2448]: Could not ping plymouth: Failed to execute child process “/bin/plymouth” (No such file or directory)
Nov 28 14:02:49 bamdevsrv gdm3[2448]: GdmLocalDisplayFactory: enumerating seats from logind
Nov 28 14:02:49 bamdevsrv gdm3[2448]: GdmLocalDisplayFactory: wayland login display for seat seat0 requested
Nov 28 14:02:49 bamdevsrv gdm3[2448]: GdmLocalDisplayFactory: Adding display on seat seat0
Nov 28 14:02:49 bamdevsrv gdm3[2448]: GdmDisplay: id: (null)
Nov 28 14:02:49 bamdevsrv gdm3[2448]: GdmDisplay: seat id: (null)
Nov 28 14:02:49 bamdevsrv gdm3[2448]: GdmDisplay: session class: greeter
Nov 28 14:02:49 bamdevsrv gdm3[2448]: GdmDisplay: initial: no
Nov 28 14:02:49 bamdevsrv gdm3[2448]: GdmDisplay: allow timed login: yes
Nov 28 14:02:49 bamdevsrv gdm3[2448]: GdmDisplay: local: yes
Nov 28 14:02:49 bamdevsrv gdm3[2448]: GdmDisplay: session type: wayland
Nov 28 14:02:49 bamdevsrv gdm3[2448]: GdmDisplay: seat id: seat0
Nov 28 14:02:49 bamdevsrv gdm3[2448]: GdmDisplay: initial: yes
Nov 28 14:02:49 bamdevsrv gdm3[2448]: GdmDisplayStore: Adding display /org/gnome/DisplayManager/Displays/94188358636112 to store
Nov 28 14:02:49 bamdevsrv gdm3[2448]: GdmDisplay: Managing display: /org/gnome/DisplayManager/Displays/94188358636112
Nov 28 14:02:49 bamdevsrv gdm3[2448]: GdmDisplay: Preparing display: /org/gnome/DisplayManager/Displays/94188358636112

gdm3 如何在启动时损坏,但在重新启动后却没有损坏?

编辑: 目前我正在运行一个解决方法。但这只不过是一个丑陋的黑客作为新的 systemd 服务:

[Unit]
After=gdm3.service

[Service]
ExecStartPre=/bin/sleep 15
ExecStart=/bin/systemctl restart gdm3

[Install]
WantedBy=multi-user.target

答案1

wiki.debian.orgDebianTesting 有 gdm 的具体说明

apt-get --reinstall install gdm3
apt-get --reinstall install gnome
apt-get --reinstall install gnome-shell

dpkg-reconfigure gdm3

答案2

在启动时没有启动 gnome 的情况下遇到了类似的问题。

由于 weyland 的原因,dmesg(对我来说)在 gnome-shell 中显示了一个段错误。

使用“WaylandEnable=false”更新 /etc/gdm3/ 中的 daemon.conf 消除了段错误,并导致 gnome 启动(启动时)而不再出现问题。

https://askubuntu.com/questions/1059091/gnome-shell-error-showing-in-dmesg

相关内容