Multimedia api example 8 failed

I am trying mmapi example 8 without video on orin agx.

The first time i am running i get black screen.

The second time it is working and i get nvidia logo screen.

The third time is not working.

What do i need to do that the example will work any time that i run?

Hi,
Please follow the steps in
Jetson Linux API Reference: 08_video_dec_drm (Direct Rendering Manager) | NVIDIA Docs

You need to disable X11 and load nvidia-drm before running the sample.