`failed to initialize EGL` when running kmscube

We are trying to run SDL2/Kivy on the Xavier NX using DRM/KMS (without X11/Wayland) and are having a hard time running it. To narrow down the issue, I believe kmscube is a good test to verify if EGL is working for “traditional” software. So when we try to run kmscube we get

root@jetson-xavier-nx-devkit:~# kmscube 
failed to initialize
failed to initialize EGL

I should also highlight that l4t-graphics-demos is working fine in our environment, so I guess it’s safe to say that EGL is working for Nvidia stuff at least.

So how do we get this thing working ?

1 Like

Hi,
Please check if you can build/run the sample:

/usr/src/jetson_multimedia_api/samples/08_video_dec_drm

The implementation is based on libdrm. Source code is at

/usr/src/jetson_multimedia_api/samples/common/classes/NvDrmRenderer.cpp

So I finally was able to compile that sample from source and when I try to run it, it prints
“Using VT number 2” but nothing happens after that. I cannot switch to any VT, nor can I type anything. However the system doesn’t hang because I can ssh into it quite fine.

So I guess something is broken real bad on my system ?

@DaneLLL maybe some of the nvidia blob crap isn’t the right version, isn’t exposing the right ABI for something else that is using the blob?

is there a version history for all the nvidia blobs required to run nvidia hardware? I mean (C-)ABI versions mostly …

Using VT number 2

what does mean? well, actually I don’t care. how do we make it work is the interesting part;)

I can’t help with the “making it work” part, but for those interested (this is just trivia, ignore it if not interested)…

When the kernel boots it runs init, and one of the programs set up by systemd ( which is just a program run by init) creates key bindings for determining which terminal to display (you can switch among terminals). Initially these are all text mode only using a framebuffer. That is multi-user.target in systemd. When you go to graphical.target one of those virtual terminals (VTs) is replaced by the X server. So VT just means the text terminal which pops up for that key binding.

VT 2 is just the “ALT-F2” binding if you are in another text terminal, or key binding “CTRL-ALT-F2” if you are in a GUI session.

For those who are brave you can actually replace the setup for terminals with other programs to show up under those key bindings. E.g., instead of bash perhaps one would run htop without a parent terminal, or a framebuffer system monitor, so on.

Hi,
Please refer to the documents:
Jetson Linux API Reference: 08_video_dec_drm (Direct Rendering Manager) | NVIDIA Docs

There are steps of running the sample in default release. Suggest you check if you can run it successfully on default release first and use it as a reference for comparing the environment. NvDrmRenderer.cpp is implemented based on DRM APIs. If you can other DRM samples working, 08_video_dec_drm should work fine.