I'm running Ubuntu 22.04.3 LTS and can't get gdm or lightdm to work correctly on boot. When it comes up the screens are blank, but the process is running (see below).
nvidia-smi returns correct message and Nvidia drivers have been re-installed, and I can also login with tty, then run startx, and everything works fine (nvidia-settings sees the card, displays, etc.). So I think graphics drivers are all ok.
I've tried switching from lightdm and back again, re-configuring both of them, re-installing ubuntu-gnome-desktop, gnome-shell, gnome, etc. and I've added to /etc/gdm3/custom.conf:
...
WaylandEnable=false
DefaultSession=gnome-xorg.desktop
...
and turned on debugging (see gdm messages below).
One thing that seems suspicious is multiple processes in 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
...
Again, it all works if I login via tty and run startx. But note that tty's via function keys are flaky (upon boot they are sometimes not there), but if I ssh in and systemctl stop gdm3 then I can get one.
Look forward to suggestions. thks.
FYI - this problem started when original 20.04 install was updated by Ubuntu auto-update. I struggled to try fixes, but didn't need a monitor at the time so left it alone, but now I need the monitor(s) working.
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