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. Debian: after upgrading the system the program became unusable. How to approach the problem?
Forum Updated to NodeBB v4.3 + New Features

Debian: after upgrading the system the program became unusable. How to approach the problem?

Scheduled Pinned Locked Moved Unsolved General and Desktop
29 Posts 5 Posters 3.7k 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.
  • J Offline
    J Offline
    JanuszSB
    wrote on last edited by JanuszSB
    #9

    Looks like I found the culprit:
    qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
    It works correctly under X.

    So the upgrade of Wayland broke the program. How to fix it?

    JSB

    JonBJ Pl45m4P SGaistS 3 Replies Last reply
    0
    • J JanuszSB

      Looks like I found the culprit:
      qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
      It works correctly under X.

      So the upgrade of Wayland broke the program. How to fix it?

      JonBJ Online
      JonBJ Online
      JonB
      wrote on last edited by
      #10

      @JanuszSB
      Unless you get a better reply. There are quite a few features which used to work under Xorg but do not under Wayland, at least with the default compositor. Other than changing to X11 you are then stuck with the new behaviour, which is by design under Wayland.

      1 Reply Last reply
      0
      • J JanuszSB

        Looks like I found the culprit:
        qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
        It works correctly under X.

        So the upgrade of Wayland broke the program. How to fix it?

        Pl45m4P Offline
        Pl45m4P Offline
        Pl45m4
        wrote on last edited by
        #11

        @JanuszSB

        Might be helpful to read:

        • https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/issues/288

        If debugging is the process of removing software bugs, then programming must be the process of putting them in.

        ~E. W. Dijkstra

        J 1 Reply Last reply
        1
        • J JanuszSB

          Looks like I found the culprit:
          qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
          It works correctly under X.

          So the upgrade of Wayland broke the program. How to fix it?

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #12

          @JanuszSB if memory serves well, you can use X application under Wayland. You can try forcing your application to use xcb backend.

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

          J 1 Reply Last reply
          0
          • Pl45m4P Pl45m4

            @JanuszSB

            Might be helpful to read:

            • https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/issues/288
            J Offline
            J Offline
            JanuszSB
            wrote on last edited by
            #13

            @Pl45m4 Very interesting link, but the solutions suggested there (XDG_SESSION_TYPE=x11, QT_QPA_PLATFORM=xcb) don't work for me.

            JSB

            1 Reply Last reply
            0
            • SGaistS SGaist

              @JanuszSB if memory serves well, you can use X application under Wayland. You can try forcing your application to use xcb backend.

              J Offline
              J Offline
              JanuszSB
              wrote on last edited by
              #14

              @SGaist said in Debian: after upgrading the system the program became unusable. How to approach the problem?:

              @JanuszSB if memory serves well, you can use X application under Wayland. You can try forcing your application to use xcb backend.

              Yes, this should solve the problem. Unfortunately it is not clear how to do it. As I said above, QT_QPA_PLATFORM=xcb doesn't work for me.

              For the time being switching to X at the login time is acceptable, but I will continue to look for a more elegant solution.

              JSB

              Pl45m4P 1 Reply Last reply
              0
              • J JanuszSB

                @SGaist said in Debian: after upgrading the system the program became unusable. How to approach the problem?:

                @JanuszSB if memory serves well, you can use X application under Wayland. You can try forcing your application to use xcb backend.

                Yes, this should solve the problem. Unfortunately it is not clear how to do it. As I said above, QT_QPA_PLATFORM=xcb doesn't work for me.

                For the time being switching to X at the login time is acceptable, but I will continue to look for a more elegant solution.

                Pl45m4P Offline
                Pl45m4P Offline
                Pl45m4
                wrote on last edited by Pl45m4
                #15

                @JanuszSB

                On that linked page someone also mention that it might be fixed in Qt6.3+
                At least the error message was gone, it I understand this right...
                What version are you using? Can you upgrade?


                If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                ~E. W. Dijkstra

                J 1 Reply Last reply
                0
                • Pl45m4P Pl45m4

                  @JanuszSB

                  On that linked page someone also mention that it might be fixed in Qt6.3+
                  At least the error message was gone, it I understand this right...
                  What version are you using? Can you upgrade?

                  J Offline
                  J Offline
                  JanuszSB
                  wrote on last edited by
                  #16

                  @Pl45m4 said in Debian: after upgrading the system the program became unusable. How to approach the problem?:

                  @JanuszSB

                  On that linked page someone also mention that it might be fixed in Qt6.3+
                  At least the error message was gone, it I understand this right...
                  What version are you using? Can you upgrade?

                  qmake -query QT_VERSION reports 5.15.8 but I installed also qt6-base-dev .

                  The question "How do I install Qt 6 in Debian Bookworm?" (https://unix.stackexchange.com/questions/752145/how-do-i-install-qt-6-in-debian-bookworm) has practically no answer since 6 months :-(
                  QT is split on Bookworm into over 20 packages, installing all of them doesn't seem reasonable. I have no idea which of them I really need.
                  There is an option to install it from https://www.qt.io/download-qt-installer-oss, but I'm afraid of creating a mess by mixing various versions.

                  JSB

                  SGaistS 1 Reply Last reply
                  0
                  • J JanuszSB

                    @Pl45m4 said in Debian: after upgrading the system the program became unusable. How to approach the problem?:

                    @JanuszSB

                    On that linked page someone also mention that it might be fixed in Qt6.3+
                    At least the error message was gone, it I understand this right...
                    What version are you using? Can you upgrade?

                    qmake -query QT_VERSION reports 5.15.8 but I installed also qt6-base-dev .

                    The question "How do I install Qt 6 in Debian Bookworm?" (https://unix.stackexchange.com/questions/752145/how-do-i-install-qt-6-in-debian-bookworm) has practically no answer since 6 months :-(
                    QT is split on Bookworm into over 20 packages, installing all of them doesn't seem reasonable. I have no idea which of them I really need.
                    There is an option to install it from https://www.qt.io/download-qt-installer-oss, but I'm afraid of creating a mess by mixing various versions.

                    SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #17

                    For the packages you need: look at the modules your application uses and just install those.

                    The Qt online installer does not mess with your system. It either install Qt in your home folder or in /opt so unless you do some pretty convoluted things, it will have no impact on your system.

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

                    J 1 Reply Last reply
                    1
                    • SGaistS SGaist

                      For the packages you need: look at the modules your application uses and just install those.

                      The Qt online installer does not mess with your system. It either install Qt in your home folder or in /opt so unless you do some pretty convoluted things, it will have no impact on your system.

                      J Offline
                      J Offline
                      JanuszSB
                      wrote on last edited by JanuszSB
                      #18

                      @SGaist said in Debian: after upgrading the system the program became unusable. How to approach the problem?:

                      For the packages you need: look at the modules your application uses and just install those.

                      The Qt online installer does not mess with your system. It either install Qt in your home folder or in /opt so unless you do some pretty convoluted things, it will have no impact on your system.

                      Thanks for the information. Looks like I have some mess already :-(

                      I prefer to focus now on xcb. I have both
                      /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so and
                      /usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqxcb.so.

                      qtchooser reports 7 (!) versions:
                      4
                      5
                      default
                      qt4-x86_64-linux-gnu
                      qt4
                      qt5-x86_64-linux-gnu
                      qt5

                      All of them has been installed some time ago just to compile two programs: djview4shapes discussed here and djview4poliqarp (https://github.com/jsbien/djview-poliqarp_fork); they share a lot of code, so it is a little strange that the latter has no problem with opening panels.

                      QTCreator reports 5.15.8 twice: /usr/lib/qt5/bin/qmake and /usr/lib/x86_64-linux-gnu/qt5/bin/qmake

                      So the question is: when I write QT_QPA_PLATFORM=xcb on the command line what actually happens? How to check whether the plugin is activated?

                      I noticed mentions of the platform parameter. Does it work for all programs? Should djview-shapes -platform xcb' work?

                      JSB

                      C 1 Reply Last reply
                      0
                      • J JanuszSB

                        @SGaist said in Debian: after upgrading the system the program became unusable. How to approach the problem?:

                        For the packages you need: look at the modules your application uses and just install those.

                        The Qt online installer does not mess with your system. It either install Qt in your home folder or in /opt so unless you do some pretty convoluted things, it will have no impact on your system.

                        Thanks for the information. Looks like I have some mess already :-(

                        I prefer to focus now on xcb. I have both
                        /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so and
                        /usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqxcb.so.

                        qtchooser reports 7 (!) versions:
                        4
                        5
                        default
                        qt4-x86_64-linux-gnu
                        qt4
                        qt5-x86_64-linux-gnu
                        qt5

                        All of them has been installed some time ago just to compile two programs: djview4shapes discussed here and djview4poliqarp (https://github.com/jsbien/djview-poliqarp_fork); they share a lot of code, so it is a little strange that the latter has no problem with opening panels.

                        QTCreator reports 5.15.8 twice: /usr/lib/qt5/bin/qmake and /usr/lib/x86_64-linux-gnu/qt5/bin/qmake

                        So the question is: when I write QT_QPA_PLATFORM=xcb on the command line what actually happens? How to check whether the plugin is activated?

                        I noticed mentions of the platform parameter. Does it work for all programs? Should djview-shapes -platform xcb' work?

                        C Offline
                        C Offline
                        ChrisW67
                        wrote on last edited by
                        #19

                        @JanuszSB said in Debian: after upgrading the system the program became unusable. How to approach the problem?:

                        So the question is: when I write QT_QPA_PLATFORM=xcb on the command line what actually happens? How to check whether the plugin is activated?

                        QT_QPA_PLATFORM=xcb djview-shapes will start djview-shapes with QT_QPA_PLATFORM in the environment. When QApplication initialises it forces the xcb Qt Platform Abstraction (QPA) plugin where it would normally auto-select Wayland.

                        If you add QT_DEBUG_PLUGINS you see much more information about plugins found and loaded.
                        QT_DEBUG_PLUGINS=1 QT_QPA_PLATFORM=xcb djview-shapes

                        I noticed mentions of the platform parameter. Does it work for all programs?

                        Yes for anything using QGuiApplication or the QApplication subclass.

                        J 1 Reply Last reply
                        0
                        • C ChrisW67

                          @JanuszSB said in Debian: after upgrading the system the program became unusable. How to approach the problem?:

                          So the question is: when I write QT_QPA_PLATFORM=xcb on the command line what actually happens? How to check whether the plugin is activated?

                          QT_QPA_PLATFORM=xcb djview-shapes will start djview-shapes with QT_QPA_PLATFORM in the environment. When QApplication initialises it forces the xcb Qt Platform Abstraction (QPA) plugin where it would normally auto-select Wayland.

                          If you add QT_DEBUG_PLUGINS you see much more information about plugins found and loaded.
                          QT_DEBUG_PLUGINS=1 QT_QPA_PLATFORM=xcb djview-shapes

                          I noticed mentions of the platform parameter. Does it work for all programs?

                          Yes for anything using QGuiApplication or the QApplication subclass.

                          J Offline
                          J Offline
                          JanuszSB
                          wrote on last edited by
                          #20

                          @ChrisW67 said in Debian: after upgrading the system the program became unusable. How to approach the problem?:

                          If you add QT_DEBUG_PLUGINS you see much more information about plugins found and loaded.
                          QT_DEBUG_PLUGINS=1 QT_QPA_PLATFORM=xcb djview-shapes

                          Nothing changed, no output. However if instead of xcb I write some other string then I get an error report.

                          In https://stackoverflow.com/questions/55731797/custom-plugin-for-qt-is-not-loaded-how-to-debug I found "you apparently have QT to build with debug information". Can it be relevant for my case?

                          JSB

                          C 1 Reply Last reply
                          0
                          • J JanuszSB

                            @ChrisW67 said in Debian: after upgrading the system the program became unusable. How to approach the problem?:

                            If you add QT_DEBUG_PLUGINS you see much more information about plugins found and loaded.
                            QT_DEBUG_PLUGINS=1 QT_QPA_PLATFORM=xcb djview-shapes

                            Nothing changed, no output. However if instead of xcb I write some other string then I get an error report.

                            In https://stackoverflow.com/questions/55731797/custom-plugin-for-qt-is-not-loaded-how-to-debug I found "you apparently have QT to build with debug information". Can it be relevant for my case?

                            C Offline
                            C Offline
                            ChrisW67
                            wrote on last edited by
                            #21

                            @JanuszSB I get plugin debug information for both debug and release builds of a small example. For example:

                            $ ~/Qt/6.6.1/gcc_64/bin/qmake CONFIG+=release
                            
                            $ make
                            ...
                            
                            $ file ./simple_example
                            ./simple_example: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=89d8e1eca37d300fbcfd802cd1f2bb82ce9e708c, for GNU/Linux 3.2.0, not stripped
                            
                            $ QT_DEBUG_PLUGINS=1 QT_QPA_PLATFORM=xcb ./simple_example 
                            qt.core.plugin.factoryloader: checking directory path "/home/chrisw/Qt/6.6.1/gcc_64/plugins/platforms" ...
                            qt.core.plugin.factoryloader: looking at "/home/chrisw/Qt/6.6.1/gcc_64/plugins/platforms/libqminimal.so"
                            qt.core.plugin.loader: Found metadata in lib /home/chrisw/Qt/6.6.1/gcc_64/plugins/platforms/libqminimal.so, metadata=
                            {
                                "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                "MetaData": {
                                    "Keys": [
                                        "minimal"
                                    ]
                                },
                                "archlevel": 1,
                                "className": "QMinimalIntegrationPlugin",
                                "debug": false,
                                "version": 394752
                            }
                            ...
                            qt.core.library: "/home/chrisw/Qt/6.6.1/gcc_64/plugins/platforms/libqxcb.so" loaded library
                            ...
                            

                            I guess your application could be doing something creative to trash the output.

                            J 1 Reply Last reply
                            0
                            • C ChrisW67

                              @JanuszSB I get plugin debug information for both debug and release builds of a small example. For example:

                              $ ~/Qt/6.6.1/gcc_64/bin/qmake CONFIG+=release
                              
                              $ make
                              ...
                              
                              $ file ./simple_example
                              ./simple_example: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=89d8e1eca37d300fbcfd802cd1f2bb82ce9e708c, for GNU/Linux 3.2.0, not stripped
                              
                              $ QT_DEBUG_PLUGINS=1 QT_QPA_PLATFORM=xcb ./simple_example 
                              qt.core.plugin.factoryloader: checking directory path "/home/chrisw/Qt/6.6.1/gcc_64/plugins/platforms" ...
                              qt.core.plugin.factoryloader: looking at "/home/chrisw/Qt/6.6.1/gcc_64/plugins/platforms/libqminimal.so"
                              qt.core.plugin.loader: Found metadata in lib /home/chrisw/Qt/6.6.1/gcc_64/plugins/platforms/libqminimal.so, metadata=
                              {
                                  "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                                  "MetaData": {
                                      "Keys": [
                                          "minimal"
                                      ]
                                  },
                                  "archlevel": 1,
                                  "className": "QMinimalIntegrationPlugin",
                                  "debug": false,
                                  "version": 394752
                              }
                              ...
                              qt.core.library: "/home/chrisw/Qt/6.6.1/gcc_64/plugins/platforms/libqxcb.so" loaded library
                              ...
                              

                              I guess your application could be doing something creative to trash the output.

                              J Offline
                              J Offline
                              JanuszSB
                              wrote on last edited by
                              #22

                              @ChrisW67 said in Debian: after upgrading the system the program became unusable. How to approach the problem?:

                              @JanuszSB I get plugin debug information for both debug and release builds of a small example. For example:

                              $ ~/Qt/6.6.1/gcc_64/bin/qmake CONFIG+=release
                              

                              What is it for?

                              $ make
                              ...

                              $ file ./simple_example
                              ./simple_example: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=89d8e1eca37d300fbcfd802cd1f2bb82ce9e708c, for GNU/Linux 3.2.0, not stripped

                              Can you somehow share the program?

                              $ QT_DEBUG_PLUGINS=1 QT_QPA_PLATFORM=xcb ./simple_example

                              I guess your application could be doing something creative to trash the output.

                              The program was written12 years ago, can this be relevant?

                              JSB

                              SGaistS 1 Reply Last reply
                              0
                              • J JanuszSB

                                @ChrisW67 said in Debian: after upgrading the system the program became unusable. How to approach the problem?:

                                @JanuszSB I get plugin debug information for both debug and release builds of a small example. For example:

                                $ ~/Qt/6.6.1/gcc_64/bin/qmake CONFIG+=release
                                

                                What is it for?

                                $ make
                                ...

                                $ file ./simple_example
                                ./simple_example: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=89d8e1eca37d300fbcfd802cd1f2bb82ce9e708c, for GNU/Linux 3.2.0, not stripped

                                Can you somehow share the program?

                                $ QT_DEBUG_PLUGINS=1 QT_QPA_PLATFORM=xcb ./simple_example

                                I guess your application could be doing something creative to trash the output.

                                The program was written12 years ago, can this be relevant?

                                SGaistS Offline
                                SGaistS Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on last edited by
                                #23

                                @JanuszSB can you share your own build ?

                                Tested on KDE Neon with wayland as backend and it looks like it's working as expected. The widget on the left is a scroll area where widgets are added. It does not do anything special.

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

                                J 2 Replies Last reply
                                0
                                • SGaistS SGaist

                                  @JanuszSB can you share your own build ?

                                  Tested on KDE Neon with wayland as backend and it looks like it's working as expected. The widget on the left is a scroll area where widgets are added. It does not do anything special.

                                  J Offline
                                  J Offline
                                  JanuszSB
                                  wrote on last edited by
                                  #24

                                  @SGaist said in Debian: after upgrading the system the program became unusable. How to approach the problem?:

                                  @JanuszSB can you share your own build ?

                                  If a Debian package will do, it is available in the repository https://github.com/jsbien/djview4shapes in the Releases. I can also upload somewhere just the binaries.

                                  On the other hand it seems the problem is not reproducible on KDE...

                                  JSB

                                  1 Reply Last reply
                                  0
                                  • SGaistS SGaist

                                    @JanuszSB can you share your own build ?

                                    Tested on KDE Neon with wayland as backend and it looks like it's working as expected. The widget on the left is a scroll area where widgets are added. It does not do anything special.

                                    J Offline
                                    J Offline
                                    JanuszSB
                                    wrote on last edited by
                                    #25

                                    @SGaist After upgrading yesterday to Debian 11.9, the situation changed slightly. The left panel still doesn't open but QT_DEBUG_PLUGINS=1 produced some output. I uploaded it to
                                    https://github.com/jsbien/djview4shapes/issues/5#issuecomment-1938158253

                                    JSB

                                    SGaistS 1 Reply Last reply
                                    0
                                    • J JanuszSB

                                      @SGaist After upgrading yesterday to Debian 11.9, the situation changed slightly. The left panel still doesn't open but QT_DEBUG_PLUGINS=1 produced some output. I uploaded it to
                                      https://github.com/jsbien/djview4shapes/issues/5#issuecomment-1938158253

                                      SGaistS Offline
                                      SGaistS Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #26

                                      @JanuszSB It's something else, if it was a plugin problem, you wouldn't see the application at all. There's no error in the logs.

                                      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
                                      • J Offline
                                        J Offline
                                        JanuszSB
                                        wrote on last edited by
                                        #27

                                        Any idea how to diagnose the problem? BTW, does this forum have a function of mail notification?

                                        JSB

                                        C 1 Reply Last reply
                                        0
                                        • J JanuszSB

                                          Any idea how to diagnose the problem? BTW, does this forum have a function of mail notification?

                                          C Offline
                                          C Offline
                                          ChrisW67
                                          wrote on last edited by
                                          #28

                                          @JanuszSB Your code saves and restores the main window and splitter geometry. Are you absolutely sure you have not just collapsed the left panel of the splitter entirely? This would persist by virtue of the state save/restore.

                                          Find the save configuration and remove/move it sideways before starting the application.
                                          One or more of these locations:

                                          ~/.config/djview-poliqarp/djview-poliqarp.conf
                                          ~/.config/djview-poliqarp.conf
                                          for D in $(echo $XDG_CONFIG_DIRS | tr ':' ' ') 
                                          do 
                                            echo $D/djview-poliqarp/djview-poliqarp.conf
                                            echo $D/djview-poliqarp.conf
                                          done
                                          
                                          SGaistS 1 Reply Last reply
                                          0

                                          • Login

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