Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. QtonPi
  4. Qt application does not run on Display with DPI
Forum Updated to NodeBB v4.3 + New Features

Qt application does not run on Display with DPI

Scheduled Pinned Locked Moved Unsolved QtonPi
8 Posts 4 Posters 1.4k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Krulle
    wrote on last edited by
    #1

    Hello folks,

    I have written an application in Qt (QML) that runs fine on the HDMI port. If I want to show the application on a display connected via DPI, the display goes off and shows nothing. But the Desktop is running (after restart :)).
    I have the assumption that it is due to the graphics driver. Am I right with this assumption?
    Do you have any information about this, or can you tell me where I can find some information?
    Or what other data do you need to help me?

    Information about the System:

    • CM3+
    • Display 800x480, connected via DPI (https://www.raspberrypi.org/documentation/hardware/raspberrypi/dpi/README.md)
    • CrossCompile Qt 5.13.1 on Ubuntu 20.04, with EGLFS driver (https://wiki.qt.io/RaspberryPi2EGLFS)
    • Raspbian 9, Kernel 4.19.108

    Thanks for your help.

    J.HilkJ 1 Reply Last reply
    0
    • K Krulle

      Hello folks,

      I have written an application in Qt (QML) that runs fine on the HDMI port. If I want to show the application on a display connected via DPI, the display goes off and shows nothing. But the Desktop is running (after restart :)).
      I have the assumption that it is due to the graphics driver. Am I right with this assumption?
      Do you have any information about this, or can you tell me where I can find some information?
      Or what other data do you need to help me?

      Information about the System:

      • CM3+
      • Display 800x480, connected via DPI (https://www.raspberrypi.org/documentation/hardware/raspberrypi/dpi/README.md)
      • CrossCompile Qt 5.13.1 on Ubuntu 20.04, with EGLFS driver (https://wiki.qt.io/RaspberryPi2EGLFS)
      • Raspbian 9, Kernel 4.19.108

      Thanks for your help.

      J.HilkJ Online
      J.HilkJ Online
      J.Hilk
      Moderators
      wrote on last edited by J.Hilk
      #2

      @Krulle I think I have the same issue currently, but no solution :(

      My QML app displays fine on the HDMI port but receives no update/repaint on the DisplayPort, I can still click on it and technically interact (I see related console output), but the windows remains white. QWidgets works fine though.

      MacOS(BigSur)
      Qt 5.12.6 & 5.15.2
      QML only QWidgets is fine (for 5.15.2 not for 5.12.6)

      I'll post here if I find a solution for my problem, maybe someone else has an idea/solution before that :D


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      0
      • K Offline
        K Offline
        Krulle
        wrote on last edited by Krulle
        #3

        @J-Hilk I have checked your statement and I can confirm it. QWidgets are running without problems.

        EDIT:
        It seems, that the problem exists only with QQmlApplicationEngine.
        QQuickView runs without problems.

        J.HilkJ 1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          Looks like you guys have material for a new bug report.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • K Krulle

            @J-Hilk I have checked your statement and I can confirm it. QWidgets are running without problems.

            EDIT:
            It seems, that the problem exists only with QQmlApplicationEngine.
            QQuickView runs without problems.

            J.HilkJ Online
            J.HilkJ Online
            J.Hilk
            Moderators
            wrote on last edited by
            #5

            @Krulle said in Qt application does not run on Display with DPI:

            EDIT:
            It seems, that the problem exists only with QQmlApplicationEngine.
            QQuickView runs without problems.

            Sadly I can't check that currently, for the rest of the week I'm in HomeOffice and my setup here is without DisplayPort 😕

            @SGaist

            Looks like you guys have material for a new bug report.

            technically, I opened a support ticket about the issue, usually that will result in a Bug-Report entry, if its a bug 😬


            Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


            Q: What's that?
            A: It's blue light.
            Q: What does it do?
            A: It turns blue.

            1 Reply Last reply
            0
            • K Offline
              K Offline
              Krulle
              wrote on last edited by Krulle
              #6

              Hey folks,

              yesterday I did some research and I have the assumption that it is due to the graphics driver (open GL).

              https://www.raspberrypi.org/forums/viewtopic.php?t=137567
              https://www.raspberrypi.org/forums/viewtopic.php?t=259119

              The solution may be found in the second link. I haven't tried this solution yet, because I postponed the problem for now and will return to it later.

              1 Reply Last reply
              0
              • J.HilkJ Online
                J.HilkJ Online
                J.Hilk
                Moderators
                wrote on last edited by
                #7

                So, I was also able to "fix" the issue.

                By forcing Qt to use the native graphic apis instead of OpenGL, my QML application is now rendered correctly on all monitors

                set the environment variable QSG_RHI=1 and you should be fine

                Special thanks to @JKSH for pointing me in the right direction!


                Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                Q: What's that?
                A: It's blue light.
                Q: What does it do?
                A: It turns blue.

                JKSHJ 1 Reply Last reply
                2
                • J.HilkJ J.Hilk

                  So, I was also able to "fix" the issue.

                  By forcing Qt to use the native graphic apis instead of OpenGL, my QML application is now rendered correctly on all monitors

                  set the environment variable QSG_RHI=1 and you should be fine

                  Special thanks to @JKSH for pointing me in the right direction!

                  JKSHJ Offline
                  JKSHJ Offline
                  JKSH
                  Moderators
                  wrote on last edited by JKSH
                  #8

                  @J-Hilk said in Qt application does not run on Display with DPI:

                  By forcing Qt to use the native graphic apis instead of OpenGL, my QML application is now rendered correctly on all monitors

                  set the environment variable QSG_RHI=1 and you should be fine

                  Special thanks to @JKSH for pointing me in the right direction!

                  You're welcome!

                  Notes from https://www.qt.io/blog/qt-quick-on-vulkan-metal-direct3d :

                  • QSG_RHI=1 only works in Qt 5.14 and above.
                  • QSG_RHI=1 switches the Qt Quick scene graph to Direct3D 11 on Windows and Metal on macOS. However OpenGL is still used by default on other targets.

                  I notice that @Krulle is using Qt 5.13 on Ubuntu and Raspbian. So to try the same fix as @J-Hilk, I think we also need to upgrade Qt, install Vulkan drivers, and set QSG_RHI_BACKEND=vulkan (Disclaimer: I haven't tried this myself)

                  Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                  1 Reply Last reply
                  2

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved