ubuntu 22.04 gdm3 启动时出现黑屏

ubuntu 22.04 gdm3 启动时出现黑屏

我正在运行 Ubuntu 22.04.3 LTS,无法让 gdm 或 lightdm 在启动时正常工作。启动时屏幕空白,但进程正在运行(见下文)。

nvidia-smi 返回了正确的消息,并且 Nvidia 驱动程序已重新安装,我也可以使用 tty 登录,然后运行 ​​startx,一切正常(nvidia-settings 可以看到卡、显示器等)。所以我认为图形驱动程序都没有问题。

我尝试从 lightdm 切换回来,重新配置它们两个,重新安装 ubuntu-gnome-desktop、gnome-shell、gnome 等,并且我已添加到 /etc/gdm3/custom.conf:

...
WaylandEnable=false
DefaultSession=gnome-xorg.desktop
...

并打开调试(参见下面的 gdm 消息)。

有一件事看起来很可疑,那就是 pstree 中的多个进程:

        ├─gdm-session-wor─┬─gdm-x-session───{gdm-x-session}
        │                 └─2*[{gdm-session-wor}]
        ├─gdm3─┬─gdm-session-wor───2*[{gdm-session-wor}]
        │      └─2*[{gdm3}]
...
        ├─login───bash───startx───xinit─┬─Xorg───{Xorg}
        │                               └─gnome-session-b─┬─blueman-applet───3*[{blueman-applet}]
        │                                                 ├─evolution-alarm───5*[{evolution-alarm}]
        │                                                 ├─gnome-shell───36*[{gnome-shell}]3
...

同样,如果我通过 tty 登录并运行 startx,一切正常。但请注意,通过功能键的 tty 不稳定(启动时它们有时不存在),但如果我 ssh 登录并 systemctl stop gdm3,那么我就可以得到一个。

期待建议。谢谢。

仅供参考 - 此问题始于原始 20.04 安装通过 Ubuntu 自动更新进行更新时。我努力尝试修复,但当时不需要显示器,所以就不管了,但现在我需要显示器正常工作。

Oct 25 21:35:19 hydra systemd[1]: Starting GNOME Display Manager...
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: Enabling debugging
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: Changing user:group to gdm:gdm
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: Successfully connected to D-Bus
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmManager: GDM starting to manage displays
Oct 25 21:35:19 hydra systemd[1]: Started GNOME Display Manager.
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: enumerating seats from logind
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: Checking if udev has settled enough to support graphics.
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: Found primary PCI graphics adapter, proceeding.
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: udev has settled enough for graphics.
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: System supports graphics
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: Getting session type (prefers xorg, falling back: no)
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: New displays on seat0 will use x11
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: x11 login display for seat seat0 requested
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: Adding display on seat seat0
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: id: (null)
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: seat id: (null)
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: session class: greeter
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: initial: no
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: allow timed login: yes
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: local: yes
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: supported session types: (null)
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: session type: x11
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: supported session types: x11
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: seat id: seat0
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: initial: yes
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplayStore: Adding display /org/gnome/DisplayManager/Displays/94158398091936 to store
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: Managing display: /org/gnome/DisplayManager/Displays/94158398091936
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: Preparing display: /org/gnome/DisplayManager/Displays/94158398091936
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: Checking kernel command buffer BOOT_IMAGE=/boot/vmlinuz-6.2.0-33-generic root=UUID=4850993c-5ada-4e2e-bf2e-34663b8938e1 ro quiet splash vt.handoff=7
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: Failed to read kernel commandline: Could not match gnome.initial-setup= in kernel cmdline
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: doing initial setup? no
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: prepare display
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: Got automatic login details for display: 0
Oct 25 21:35:19 hydra gdm3[1623]: GdmDBusUtils: Registered DBus error domain 'gdm-session-worker-error-quark'
Oct 25 21:35:19 hydra gdm3[1623]: GLib: setenv()/putenv() are not thread-safe and should not be used after threads are created
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: Creating D-Bus server for worker for session
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: D-Bus server for workers listening on unix:abstract=/tmp/dbus-iRBI31os
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: Creating D-Bus server for greeters and such for session (null) (0x55a2f5e19040)
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: D-Bus server for greeters listening on unix:abstract=/tmp/dbus-jPYrx53C
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: Setting display device: (null)
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: Created user session for user 125 on display /org/gnome/DisplayManager/Displays/94158398091936 (seat seat0)
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: Running greeter
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: Creating greeter for (null) (null)
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmLaunchEnvironment: Starting...
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmLaunchEnvironment: Setting up run time dir /run/gdm3/greeter
Oct 25 21:35:19 hydra gdm3[1623]: GLib: setenv()/putenv() are not thread-safe and should not be used after threads are created
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: Creating D-Bus server for worker for session
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: D-Bus server for workers listening on unix:abstract=/tmp/dbus-Iaeq47hR
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: Creating D-Bus server for greeters and such for session (null) (0x55a2f5e19170)
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: D-Bus server for greeters listening on unix:abstract=/tmp/dbus-Yi130uRd
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: Setting display device: (null)
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: starting conversation gdm-launch-environment for session (0x55a2f5e19170)
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSessionWorkerJob: Starting worker...
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSessionWorkerJob: Running session_worker_job process: gdm-session-worker [pam/gdm-launch-environment] /usr/libexec/gdm-session-worker
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSessionWorkerJob: : SessionWorkerJob on pid 1706
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: setting session to type 'x11'
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: display status changed: 1
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: received VT change event
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: VT is 1 at startup
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: Enabling debugging
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: connecting to address: unix:abstract=/tmp/dbus-Iaeq47hR
Oct 25 21:35:19 hydra gdm3[1623]: GdmDBusServer: new connection 0x55a2f5def6c0
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: Handling new connection from worker
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: Authenticating new connection
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: worker connection is 0x55a2f5def6c0
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: Emitting conversation-started signal
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: Beginning initialization
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: Conversation started
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: attempting to change state to SETUP_COMPLETE
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: initializing PAM; service=gdm-launch-environment username=gdm seat=seat0
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'XDG_SEAT=seat0'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'XDG_SESSION_CLASS=greeter'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: state SETUP_COMPLETE
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: attempting to change state to AUTHENTICATED
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: authenticating user gdm
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: state AUTHENTICATED
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: attempting to change state to AUTHORIZED
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: determining if authenticated user (password required:0) is authorized to session
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: state AUTHORIZED
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: attempting to change state to ACCREDITED
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'LOGNAME=gdm'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'USER=gdm'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'USERNAME=gdm'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'HOME=/var/lib/gdm3'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'PWD=/var/lib/gdm3'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'SHELL=/bin/false'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'PATH=/usr/local/bin:/usr/bin:/bin:/usr/games'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: state ACCREDITED
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: type x11, program? yes, seat seat0
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: session display mode set to new-vt
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'XDG_SESSION_TYPE=x11'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: attempting to change state to ACCOUNT_DETAILS_SAVED
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: saving account details for user gdm
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: attempting to change state to SESSION_OPENED
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'XDG_VTNR=1'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: pam_unix(gdm-launch-environment:session): session opened for user gdm(uid=125) by (uid=0)
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: state SESSION_OPENED
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: Emitting 'session-opened' signal
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: Greeter session opened
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: session id: c1
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: Stopping all conversations except for gdm-launch-environment
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: type x11, program? yes, seat seat0
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: getting session command for file 'ubuntu.desktop'
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: 'ubuntu.desktop' registers self
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: type x11, program? yes, seat seat0
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'DCONF_PROFILE=gdm'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'GDM_SUPPORTED_SESSION_TYPES=x11'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'GIO_USE_VFS=local'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'USER=gdm'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'SHELL=/bin/false'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'GVFS_REMOTE_VOLUME_MONITOR_IGNORE=1'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'USERNAME=gdm'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'LOGNAME=gdm'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'PWD=/var/lib/gdm3'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'XDG_DATA_DIRS=/usr/share/gdm/greeter:/usr/share:/usr/local/share/:/usr/share/'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'LANG=en_US.UTF-8'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'GDM_SEAT_ID=seat0'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'RUNNING_UNDER_GDM=true'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'HOME=/var/lib/gdm3'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'GDM_VERSION=42.0'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'XDG_CURRENT_DESKTOP=GNOME-Greeter:GNOME'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'GNOME_SHELL_SESSION_MODE=gdm'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: Set PAM environment variable: 'GVFS_DISABLE_FUSE=1'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: start program: /usr/libexec/gdm-x-session "dbus-run-session -- gnome-session --autostart /usr/share/gdm/greeter/autostart ->
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: attempting to change state to SESSION_STARTED
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: opening session for program '/usr/libexec/gdm-x-session'
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: jumping to VT 1
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: first setting graphics mode to prevent flicker
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: VT mode did need to be fixed
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: session opened creating reply...
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSessionWorker: state SESSION_STARTED
Oct 25 21:35:19 hydra gdm-launch-environment][1706]: Gdm: GdmSession worker: watching pid 1758
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmSession: Emitting 'session-started' signal with pid '1758'
Oct 25 21:35:19 hydra gdm3[1623]: Gdm: GdmDisplay: Greeter started
Oct 25 21:37:27 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: received VT change event
Oct 25 21:37:27 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: VT changed from 1 to 6
Oct 25 21:37:27 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: VT of login window is 1
Oct 25 21:37:27 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: VT switched from login window
Oct 25 21:37:27 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: login window not in managed state, so ignoring
Oct 25 21:37:27 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: active VT is not initial VT, so ignoring
Oct 25 21:37:34 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: received VT change event
Oct 25 21:37:34 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: VT changed from 6 to 5
Oct 25 21:37:34 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: VT of login window is 1
Oct 25 21:37:34 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: VT not switched from login window
Oct 25 21:37:34 hydra gdm3[1623]: Gdm: GdmLocalDisplayFactory: active VT is not initial VT, so ignoring

相关内容