(Headless) Wayland/Weston sessions die on T4 GPU

I’m trying to remote into a headless Amzon EC2 g4dn instance with a Tesla T4U GPU running Ubuntu 22.04. Xorg works just fine and the GPU is used. Wayland/Weston sessions fail to start. I’m using GDM and it shows Weston, Ubuntu on Wayland, GNOME on Wayland etc. as session options.

Weston sessions fail with “no drm device found”.
Extract from journalctl -b for a Weston session attempt:

Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]: Date: 2024-02-27 PST
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]: [07:50:41.071] weston 9.0.0
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]:                https://wayland.freedesktop.org
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]:                Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]:                Build: 9.0.0
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]: [07:50:41.071] Command line: weston
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]: [07:50:41.071] OS: Linux, 6.5.0-1014-aws, #14~22.04.1-Ubuntu SMP Thu Feb 15 15:27:06 UTC 2024, x86_64
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]: [07:50:41.071] Starting with no config file.
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]: [07:50:41.071] Output repaint window is 7 ms maximum.
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]: [07:50:41.072] Loading module '/usr/lib/x86_64-linux-gnu/libweston-9/drm-backend.so'
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]: [07:50:41.077] initializing drm backend
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]: [07:50:41.078] logind: session control granted
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]: [07:50:41.079] no drm device found
Feb 27 07:50:41 ord-pd-ldt04 /usr/libexec/gdm-wayland-session[343462]: [07:50:41.079] fatal: failed to create compositor backend

Wayland sessions fails with “Failed with result ‘protocol’”
Extract from journalctl -b for a Wayland session attempt:

Feb 27 07:41:25 ord-pd-ldt04 gnome-shell[336472]: Running GNOME Shell (using mutter 
42.9) as a Wayland display server
Feb 27 07:41:25 ord-pd-ldt04 gnome-shell[336472]: Device '/dev/dri/card0' prefers shadow buffer
Feb 27 07:41:25 ord-pd-ldt04 gnome-shell[336472]: Added device '/dev/dri/card0' (nvidia-drm) using non-atomic mode setting.
Feb 27 07:41:25 ord-pd-ldt04 gnome-shell[336472]: Enabling experimental feature 'kms-modifiers'
Feb 27 07:41:26 ord-pd-ldt04 gnome-shell[336472]: Failed to setup: No GPUs with outputs found
Feb 27 07:41:26 ord-pd-ldt04 systemd[3804]: org.gnome.Shell@wayland.service: Failed with result 'protocol'.
Feb 27 07:41:26 ord-pd-ldt04 systemd[3804]: Failed to start GNOME Shell on Wayland.

lsmod|grep nvidia says:

nvidia_uvm           4919296  4
nvidia_drm            122880  9
nvidia_modeset       1355776  7 nvidia_drm
video                  73728  1 nvidia_modeset
nvidia              54116352  311 nvidia_uvm,nvidia_modeset
drm_kms_helper        270336  1 nvidia_drm
drm                   765952  13 drm_kms_helper,nvidia,nvidia_drm

/etc/modprobe.d/nvidia.conf has

options nvidia-drm modeset=1

OS: Ubuntu 22.04
Kernel: 6.5.0-1014
NVIDIA Driver: 550.54.14

Got it working.My problems may have been because it’s a headless box.

  • Downgraded the NVIDIA driver to 535.129.03.
  • Changed Exec= line in /usr/share/wayland-sessions/gnome-wayland.desktop to Exec=gnome-shell --wayland --virtual-monitor 2056x1329

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.