Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Display issues with QT applications on Ubuntu22.04
Qt 6.12 LTS is out! See what's new in the release blog

Display issues with QT applications on Ubuntu22.04

Scheduled Pinned Locked Moved Unsolved General and Desktop
15 Posts 4 Posters 7.5k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on 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
    0
    • JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on 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
      • SGaistS SGaist

        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 last edited by
        #8

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

        1 Reply Last reply
        0
        • S sparmar

          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.

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on 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
          0
          • JKSHJ JKSH

            @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 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.

            JKSHJ 1 Reply Last reply
            0
            • S sparmar

              @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.

              JKSHJ Offline
              JKSHJ Offline
              JKSH
              Moderators
              wrote on 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
              1
              • JKSHJ JKSH

                @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 last edited by JoeCFD
                #12

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

                JKSHJ 1 Reply Last reply
                0
                • JoeCFDJ JoeCFD

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

                  JKSHJ Offline
                  JKSHJ Offline
                  JKSH
                  Moderators
                  wrote on 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
                  0
                  • JKSHJ JKSH

                    @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 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.

                    JKSHJ 1 Reply Last reply
                    0
                    • JoeCFDJ JoeCFD

                      @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.

                      JKSHJ Offline
                      JKSHJ Offline
                      JKSH
                      Moderators
                      wrote on 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

                      • Login

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