Hi.
I checked this command and I got this:
udevadm info /sys/class/drm/card0
Unknown device "/sys/class/drm/card0": No such device
So I tried to find out why this error and I discovered that the nvidia_drm module is not loaded.
After loading this module the udevadm got some information:
udevadm info /sys/class/drm/card0
P: /devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
M: card0
R: 0
U: drm
T: drm_minor
D: c 226:0
N: dri/card0
L: 0
S: dri/by-path/pci-0000:01:00.0-card
E: DEVPATH=/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
E: SUBSYSTEM=drm
E: DEVNAME=/dev/dri/card0
E: DEVTYPE=drm_minor
E: MAJOR=226
E: MINOR=0
E: USEC_INITIALIZED=4363555
E: ID_PATH=pci-0000:01:00.0
E: ID_PATH_TAG=pci-0000_01_00_0
E: ID_FOR_SEAT=drm-pci-0000_01_00_0
E: DEVLINKS=/dev/dri/by-path/pci-0000:01:00.0-card
E: TAGS=:master-of-seat:uaccess:seat:
E: CURRENT_TAGS=:master-of-seat:uaccess:seat:
But this module was not loaded at boot time and I found an old nvidia.conf at /etc/modprobe.d. Probably it was from an old nvidia package and it prevented this module from loading..
I removed this file and finally nvidia_drm was loaded in the next boot. It worked with lightdm and with sddm. With sddm it stopped working for more than one year until I removed nvidia.conf from modprobe.d.
Then, for me, the root cause is a nvidia_drm module not loaded due to a file in modprobe.d . I don't know if there is something similar with the RasperryPi 4.
Thanks for the help.
Best regards,
Adilson