Problem
I can’t launch weston on AWS EC2 G5g instance/Ubuntu20.04(5.13.0-1031-aws)//NVIDIA T4G/515.43.04.
The weston logs are the following. The root cause seems that weston can’t find DRM/KMS device.
$ cat /tmp/weston.log
Date: 2022-07-11 UTC
[04:15:43.680] weston 8.0.0
https://wayland.freedesktop.org
Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
Build: 8.0.0
[04:15:43.680] Command line: /usr/bin/weston --backend=drm-backend.so --drm-device=card0 --modules=systemd-notify.so --log=/tmp/weston.log
[04:15:43.680] OS: Linux, 5.13.0-1031-aws, #35~20.04.1-Ubuntu SMP Mon Jun 13 22:33:23 UTC 2022, aarch64
[04:15:43.680] Starting with no config file.
[04:15:43.681] Output repaint window is 7 ms maximum.
[04:15:43.682] Loading module '/usr/lib/aarch64-linux-gnu/libweston-8/drm-backend.so'
[04:15:43.691] initializing drm backend
[04:15:43.693] logind: session control granted
[04:15:43.693] ERROR: DRM device 'card0' is not a KMS device.
[04:15:43.693] no drm device found
[04:15:43.693] fatal: failed to create compositor backend
Question
I’ve confirmed the following information. Is there anything else I should confirm?
Or How to solve the problem?
nvidia-smi
$ nvidia-smi
Mon Jul 11 05:09:03 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.43.04 Driver Version: 515.43.04 CUDA Version: 11.7 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA T4G On | 00000000:00:1F.0 Off | 0 |
| N/A 45C P8 16W / 70W | 72MiB / 15360MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 878 G /usr/lib/xorg/Xorg 59MiB |
| 0 N/A N/A 918 G /usr/bin/gnome-shell 9MiB |
+-----------------------------------------------------------------------------+
lsmod
I confirmed nvidia module has loaded as follows, right?
$ lsmod | grep -i nvidia
nvidia_drm 69632 3
nvidia_modeset 1196032 3 nvidia_drm
nvidia 40022016 164 nvidia_modeset
drm_kms_helper 286720 1 nvidia_drm
drm 610304 7 drm_kms_helper,nvidia,nvidia_drm
nvidiadrm modeset
The document says that executing modprobe nvidia-drm modeset=1
is needed to enable DRM KMS.
So I did and confirmed that configuration is set as follows, right?
$ modprobe -c | grep nvidia_drm
options nvidia_drm modeset=1
options nvidia_drm modeset=1
alias pci:v000010DEd*sv*sd*bc03sc00i00* nvidia_drm
alias pci:v000010DEd*sv*sd*bc03sc02i00* nvidia_drm
alias pci:v000010DEd*sv*sd*bc06sc80i00* nvidia_drm