Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Display issues with QT applications on Ubuntu22.04
Forum Updated to NodeBB v4.3 + New Features

Display issues with QT applications on Ubuntu22.04

Scheduled Pinned Locked Moved Unsolved General and Desktop
15 Posts 4 Posters 3.3k Views 2 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.
  • S Offline
    S Offline
    sparmar
    wrote on 14 Nov 2022, 06:59 last edited by
    #1

    While working with Ubuntu 22.04, I was facing an issue with display of QT applications, even with the QT creator application itself (Screenshots attached). The issue is like when we open an application(excluding system applications) it just displays a black screen and being presented in unusable form.

    Screenshot 2022-11-14 at 12.22.17 PM.png

    In order to display the text, buttons and other contents of the application, I need to hover mouse over them but still the application is not readable format making it difficult to work

    Screenshot 2022-11-14 at 12.22.32 PM.png

    Moreover when scrolling up/down it keeps on displaying the same content over and over again. But after logging out and changing the setting from Ubuntu to Ubuntu on Xorg

    Screenshot 2022-11-14 at 12.22.46 PM.png

    I do not face this issue

    Screenshot 2022-11-14 at 12.22.59 PM.png

    So I want to ask that how this issue with the QT applications can be resolved for Ubuntu setting as well without changing it to Ubuntu on Xorg.

    J 1 Reply Last reply 21 Nov 2022, 12:28
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 14 Nov 2022, 20:39 last edited by
      #2

      Hi and welcome to devnet,

      Are you using the Qt version provided by your distribution ?

      If not, did you check which QPA plugin gets loaded ?

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

      S 1 Reply Last reply 16 Nov 2022, 09:34
      0
      • S SGaist
        14 Nov 2022, 20:39

        Hi and welcome to devnet,

        Are you using the Qt version provided by your distribution ?

        If not, did you check which QPA plugin gets loaded ?

        S Offline
        S Offline
        sparmar
        wrote on 16 Nov 2022, 09:34 last edited by
        #3

        @SGaist Yes I am using the QT version provided by the distribution but still facing this issue. Can you please share how to check for QPA plugin.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 16 Nov 2022, 21:02 last edited by
          #4

          Use the QT_DEBUG_PLUGINS environment set to 1 and start your application. You'll have a complete log of the plugins loading.

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

          S 1 Reply Last reply 18 Nov 2022, 09:57
          1
          • S SGaist
            16 Nov 2022, 21:02

            Use the QT_DEBUG_PLUGINS environment set to 1 and start your application. You'll have a complete log of the plugins loading.

            S Offline
            S Offline
            sparmar
            wrote on 18 Nov 2022, 09:57 last edited by
            #5

            @SGaist I first ran export QT_DEBUG_PLUGINS=1 and then launched qtcreator via terminal. Following are the QPA plugins that showed up in terminal:
            Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqeglfs.so, metadata=
            {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
            "Keys": [
            "eglfs"
            ]
            },
            "archreq": 0,
            "className": "QEglFSIntegrationPlugin",
            "debug": false,
            "version": 331520
            }
            Got keys from plugin meta data ("eglfs")
            QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so"
            Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqlinuxfb.so, metadata=
            {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
            "Keys": [
            "linuxfb"
            ]
            },
            "archreq": 0,
            "className": "QLinuxFbIntegrationPlugin",
            "debug": false,
            "version": 331520
            }
            Got keys from plugin meta data ("linuxfb")
            QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so"
            Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimal.so, metadata=
            {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
            "Keys": [
            "minimal"
            ]
            },
            "archreq": 0,
            "className": "QMinimalIntegrationPlugin",
            "debug": false,
            "version": 331520
            }
            Got keys from plugin meta data ("minimal")
            QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so"
            Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqminimalegl.so, metadata=
            {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
            "Keys": [
            "minimalegl"
            ]
            },
            "archreq": 0,
            "className": "QMinimalEglIntegrationPlugin",
            "debug": false,
            "version": 331520
            }
            Got keys from plugin meta data ("minimalegl")
            QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so"
            Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqoffscreen.so, metadata=
            {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
            "Keys": [
            "offscreen"
            ]
            },
            "archreq": 0,
            "className": "QOffscreenIntegrationPlugin",
            "debug": false,
            "version": 331520
            }
            Got keys from plugin meta data ("offscreen")
            QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so"
            Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqvnc.so, metadata=
            {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
            "Keys": [
            "vnc"
            ]
            },
            "archreq": 0,
            "className": "QVncIntegrationPlugin",
            "debug": false,
            "version": 331520
            }
            Got keys from plugin meta data ("vnc")
            QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
            Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so, metadata=
            {
            "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
            "MetaData": {
            "Keys": [
            "xcb"
            ]
            },
            "archreq": 0,
            "className": "QXcbIntegrationPlugin",
            "debug": false,
            "version": 331520
            }
            Got keys from plugin meta data ("xcb")
            QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
            loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
            loaded library "Xcursor"
            QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes" ...
            QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/libqgtk3.so"
            Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/libqgtk3.so, metadata=
            {
            "IID": "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1",
            "MetaData": {
            "Keys": [
            "gtk3"
            ]
            },
            "archreq": 0,
            "className": "QGtk3ThemePlugin",
            "debug": false,
            "version": 331520
            }
            Got keys from plugin meta data ("gtk3")
            QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platformthemes" ...
            loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platformthemes/libqgtk3.so"
            QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts" ...
            QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so"
            Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so, metadata=
            {
            "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1",
            "MetaData": {
            "Keys": [
            "compose",
            "xim"
            ]
            },
            "archreq": 0,
            "className": "QComposePlatformInputContextPlugin",
            "debug": false,
            "version": 331520
            }
            Got keys from plugin meta data ("compose", "xim")
            QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so"
            Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so, metadata=
            {
            "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1",
            "MetaData": {
            "Keys": [
            "ibus"
            ]
            },
            "archreq": 0,
            "className": "QIbusPlatformInputContextPlugin",
            "debug": false,
            "version": 331520
            }
            Got keys from plugin meta data ("ibus")
            QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforminputcontexts" ...
            loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so"
            QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations" ...
            QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-egl-integration.so"
            Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-egl-integration.so, metadata=
            {
            "IID": "org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5",
            "MetaData": {
            "Keys": [
            "xcb_egl"
            ]
            },
            "archreq": 0,
            "className": "QXcbEglIntegrationPlugin",
            "debug": false,
            "version": 331520
            }
            Got keys from plugin meta data ("xcb_egl")
            QFactoryLoader::QFactoryLoader() looking at "/usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so"
            Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/xcbglintegrations/libqxcb-glx-integration.so, metadata=
            {
            "IID": "org.qt-project.Qt.QPA.Xcb.QXcbGlIntegrationFactoryInterface.5.5",
            "MetaData": {
            "Keys": [
            "xcb_glx"
            ]
            },
            "archreq": 0,
            "className": "QXcbGlxIntegrationPlugin",
            "debug": false,
            "version": 331520
            }

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 18 Nov 2022, 19:59 last edited by
              #6

              That seems to be only the finding part, did you have other related messages about the plugins actually loaded ?

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

              S 1 Reply Last reply 21 Nov 2022, 08:53
              0
              • JoeCFDJ Offline
                JoeCFDJ Offline
                JoeCFD
                wrote on 18 Nov 2022, 20:10 last edited by JoeCFD
                #7

                I believe the default is wayland, not X. Therefore, some packages for Wayland have to be installed. I have not worked with wayland, not sure which packages and plugins are needed.

                1 Reply Last reply
                0
                • S SGaist
                  18 Nov 2022, 19:59

                  That seems to be only the finding part, did you have other related messages about the plugins actually loaded ?

                  S Offline
                  S Offline
                  sparmar
                  wrote on 21 Nov 2022, 08:53 last edited by
                  #8

                  @SGaist These were only the QPA plugins that showed up.

                  1 Reply Last reply
                  0
                  • S sparmar
                    14 Nov 2022, 06:59

                    While working with Ubuntu 22.04, I was facing an issue with display of QT applications, even with the QT creator application itself (Screenshots attached). The issue is like when we open an application(excluding system applications) it just displays a black screen and being presented in unusable form.

                    Screenshot 2022-11-14 at 12.22.17 PM.png

                    In order to display the text, buttons and other contents of the application, I need to hover mouse over them but still the application is not readable format making it difficult to work

                    Screenshot 2022-11-14 at 12.22.32 PM.png

                    Moreover when scrolling up/down it keeps on displaying the same content over and over again. But after logging out and changing the setting from Ubuntu to Ubuntu on Xorg

                    Screenshot 2022-11-14 at 12.22.46 PM.png

                    I do not face this issue

                    Screenshot 2022-11-14 at 12.22.59 PM.png

                    So I want to ask that how this issue with the QT applications can be resolved for Ubuntu setting as well without changing it to Ubuntu on Xorg.

                    J Online
                    J Online
                    JKSH
                    Moderators
                    wrote on 21 Nov 2022, 12:28 last edited by
                    #9

                    @sparmar said in Display issues with QT applications on Ubuntu22.04:

                    So I want to ask that how this issue with the QT applications can be resolved for Ubuntu setting as well without changing it to Ubuntu on Xorg.

                    Are you running Ubuntu in a VM, by any chance?

                    One way is to use the Wayland platform plugin instead of the XCB platform plugin.

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

                    S 1 Reply Last reply 21 Nov 2022, 13:06
                    0
                    • J JKSH
                      21 Nov 2022, 12:28

                      @sparmar said in Display issues with QT applications on Ubuntu22.04:

                      So I want to ask that how this issue with the QT applications can be resolved for Ubuntu setting as well without changing it to Ubuntu on Xorg.

                      Are you running Ubuntu in a VM, by any chance?

                      One way is to use the Wayland platform plugin instead of the XCB platform plugin.

                      S Offline
                      S Offline
                      sparmar
                      wrote on 21 Nov 2022, 13:06 last edited by
                      #10

                      @JKSH Yes I am running Ubuntu VM (VMware fusion). Yes by default my system was wayland but I was facing this issue so I changed it to Xorg. Could you please let me know which wayland plugins/packages will be required to get it working in wayland.

                      J 1 Reply Last reply 21 Nov 2022, 13:13
                      0
                      • S sparmar
                        21 Nov 2022, 13:06

                        @JKSH Yes I am running Ubuntu VM (VMware fusion). Yes by default my system was wayland but I was facing this issue so I changed it to Xorg. Could you please let me know which wayland plugins/packages will be required to get it working in wayland.

                        J Online
                        J Online
                        JKSH
                        Moderators
                        wrote on 21 Nov 2022, 13:13 last edited by
                        #11

                        @sparmar said in Display issues with QT applications on Ubuntu22.04:

                        Yes I am running Ubuntu VM (VMware fusion).

                        It looks like the problem is caused by some interaction between Ubuntu 22.04 with VMware. I've seen the same issue in Ubuntu 22.04, but not in Ubuntu 20.04.

                        Yes by default my system was wayland but I was facing this issue so I changed it to Xorg.

                        Yes, Ubuntu uses Wayland by default now.

                        Could you please let me know which wayland plugins/packages will be required to get it working in wayland.

                        I don't know what plugins are available with the version of Qt Creator supplied by the Ubuntu repositories. However, if you install Qt and Qt Creator with the official installer, then you just need to start Qt Creator with the -platform wayland command line argument. (Alternatively, set the environment variable, QT_QPA_PLATFORM=wayland)

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

                        JoeCFDJ 1 Reply Last reply 21 Nov 2022, 15:04
                        1
                        • J JKSH
                          21 Nov 2022, 13:13

                          @sparmar said in Display issues with QT applications on Ubuntu22.04:

                          Yes I am running Ubuntu VM (VMware fusion).

                          It looks like the problem is caused by some interaction between Ubuntu 22.04 with VMware. I've seen the same issue in Ubuntu 22.04, but not in Ubuntu 20.04.

                          Yes by default my system was wayland but I was facing this issue so I changed it to Xorg.

                          Yes, Ubuntu uses Wayland by default now.

                          Could you please let me know which wayland plugins/packages will be required to get it working in wayland.

                          I don't know what plugins are available with the version of Qt Creator supplied by the Ubuntu repositories. However, if you install Qt and Qt Creator with the official installer, then you just need to start Qt Creator with the -platform wayland command line argument. (Alternatively, set the environment variable, QT_QPA_PLATFORM=wayland)

                          JoeCFDJ Offline
                          JoeCFDJ Offline
                          JoeCFD
                          wrote on 21 Nov 2022, 15:04 last edited by JoeCFD
                          #12

                          @JKSH Why does not Qt creator recognize wayland automatically and set things properly? $XDG_SESSION_TYPE tells it, right?

                          J 1 Reply Last reply 22 Nov 2022, 08:28
                          0
                          • JoeCFDJ JoeCFD
                            21 Nov 2022, 15:04

                            @JKSH Why does not Qt creator recognize wayland automatically and set things properly? $XDG_SESSION_TYPE tells it, right?

                            J Online
                            J Online
                            JKSH
                            Moderators
                            wrote on 22 Nov 2022, 08:28 last edited by
                            #13

                            @JoeCFD said in Display issues with QT applications on Ubuntu22.04:

                            Why does not Qt creator recognize wayland automatically and set things properly? $XDG_SESSION_TYPE tells it, right?

                            Good question! Here's what I found:

                            • XDG_SESSION_TYPE was originally ignored on purpose on the GNOME Shell due to some serious bugs: https://bugreports.qt.io/browse/QTBUG-68619
                            • XDG_SESSION_TYPE is non-standard, so Qt later replaced it with DISPLAY/WAYLAND_DISPLAY instead: https://bugreports.qt.io/browse/QTBUG-75732
                            • https://codereview.qt-project.org/c/qt/qtbase/+/369443 is supposed to remove the code that ignores the environment, but AFAICS Qt Creator 9.0.0-rc1 still ignores it and defaults to XCB somehow.

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

                            JoeCFDJ 1 Reply Last reply 22 Nov 2022, 15:05
                            0
                            • J JKSH
                              22 Nov 2022, 08:28

                              @JoeCFD said in Display issues with QT applications on Ubuntu22.04:

                              Why does not Qt creator recognize wayland automatically and set things properly? $XDG_SESSION_TYPE tells it, right?

                              Good question! Here's what I found:

                              • XDG_SESSION_TYPE was originally ignored on purpose on the GNOME Shell due to some serious bugs: https://bugreports.qt.io/browse/QTBUG-68619
                              • XDG_SESSION_TYPE is non-standard, so Qt later replaced it with DISPLAY/WAYLAND_DISPLAY instead: https://bugreports.qt.io/browse/QTBUG-75732
                              • https://codereview.qt-project.org/c/qt/qtbase/+/369443 is supposed to remove the code that ignores the environment, but AFAICS Qt Creator 9.0.0-rc1 still ignores it and defaults to XCB somehow.
                              JoeCFDJ Offline
                              JoeCFDJ Offline
                              JoeCFD
                              wrote on 22 Nov 2022, 15:05 last edited by
                              #14

                              @JKSH Wayland is the default setting on Ubuntu. But qt creator does not do the same thing. This does not make sense and causes inconvenience for users who do not know this.

                              J 1 Reply Last reply 23 Nov 2022, 07:31
                              0
                              • JoeCFDJ JoeCFD
                                22 Nov 2022, 15:05

                                @JKSH Wayland is the default setting on Ubuntu. But qt creator does not do the same thing. This does not make sense and causes inconvenience for users who do not know this.

                                J Online
                                J Online
                                JKSH
                                Moderators
                                wrote on 23 Nov 2022, 07:31 last edited by
                                #15

                                @JoeCFD said in Display issues with QT applications on Ubuntu22.04:

                                This does not make sense and causes inconvenience for users who do not know this.

                                Why would it inconvenience anyone? X clients can (usually) display just fine under Wayland.

                                Wayland is the default setting on Ubuntu. But qt creator does not do the same thing.

                                The links in my previous post explain why XCB was set as default under the GNOME shell. Feel free to open a new ticket to suggest changing this.

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

                                1 Reply Last reply
                                1

                                1/15

                                14 Nov 2022, 06:59

                                • Login

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