Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Could not open DRM (NV) device



  • Hi everyone,

    I'm trying to run a Qt example and I face the following issue :

    root@bandito:/home/Qt# ./animation -platform eglfs
    QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/var/volatile/tmp/runtime-root'
    Could not open DRM (NV) device
    Aborted
    

    Can anyone help me figure out what's wrong?

    Here are my environment variables :

    QT_QPA_FB_DRM=1
    QT_QPA_EGLFS_KMS_ATOMIC=1
    QT_QPA_EGLFS_INTEGRATION=eglfs_kms_egldevice
    QT_QPA_EGLFS_FB=/dev/dri/card0
    QT_QPA_EGLFS_ALWAYS_SET_MODE=1
    

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Are you running your code on an embedded device ?
    Does it have any other graphics system running like an a X server or wayland ?



  • Hi @SGaist ,
    Yes, I'm running my app on an embedded device.
    I'm not using XServer nor Wayland.

    I'have noticed that I missed an option during the confirguration of Qt.
    Among egldeviceintegration libraries, there is only :

    • eglfs_kms_egldevice
    • eglfs_emu

    It seems that I should have enabled gbm. But I need to dig deep to understand how the linux graphical stack works to put everything together.



  • Okay, I was able to solve the issue by adding gbm ( Generic Buffer Management ) among the configurations options passed to the configure script of Qt.
    This allowed me to obtain among the egl device integrations shared libraries :

    After that, setting up QT_QPA_EGLFS_KMS_CONFIG environment variables to my .json configuration file,
    I was able to run my application properly.

    I probably need to spend more time understanding the linux graphical stack to put everything together in my mind, but for now the application is running and I can continue the development.

    Hope it helps someone.
    Bye Bye !


  • Lifetime Qt Champion

    Nice ! Thanks for sharing the findings :-)


Log in to reply