Important: Please read the Qt Code of Conduct -

What is the correct format of an EGLFS configuration file?

  • Hi,

    I am trying using a EGLFS configuration file along the lines of:

    My configuration file looks like this:

      "device": "/dev/dri/card0",
      "outputs": [
          { "name": "HDMI-A-1", "mode": "1920x1080" },
          { "name": "DP-1", "mode": "1920x1080", "clones": "HDMI-A-1" },
          { "name": "DP-2", "mode": "1920x1080", "clones": "HDMI-A-1" },

    I store this configuration in the file /etc/eglfs.conf.

    When I try to load it using the variable QT_QPA_EGLFS_KMS_CONFIG I get the error:

    qt.qpa.eglfs.kms: Invalid config file "/etc/eglfs.conf"  -- no top-level JSON object

    Apparently, my configuration is incomplete.

    What is missing?


  • Lifetime Qt Champion


    Your JSON is invalid (meaning the file format). Remove the coma after the last outputs entry.

  • @SGaist
    Yes, and isn't this an absolutely infuriating aspect of JSON...?!

  • Lifetime Qt Champion

    I wouldn't go as far as that. The format being strict avoids the need to write parser that must support that kind of cases which may or may not indicate that an entry might be missing.

  • @SGaist Thanks! Didn't see that one. I was too distracted by the error message "no top-level JSON object", thinking there was something fundamentally wrong with the structure of my JSON.

Log in to reply