RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Fail to launch ps2 game with Qt error

    Scheduled Pinned Locked Moved Help and Support
    ubuntu x64ps2runcommand
    7 Posts 2 Posters 436 Views
    Loading More Posts
    • 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.
    • X
      Xinu
      last edited by

      Hello, I've installed RetroPie yesterday on a mini-pc with Ubuntu:

      • Version 4.8.8
      • Last Commit: 11 days ago (18c2b43)
      • System x86_64
      • Ubuntu 24.04.1 LTS

      I did the basic install following the doc, then I enabled ps2 from experimental packages (sudo ~/RetroPie-Setup/retropie_setup.sh > Manage packages > exp > pcsx2) and it now show as pcsx2 (Installed - via binary).

      Now when I try to launch a game, it goes back to the main screen after a couple of seconds. Here is the error log:

      $ cat /dev/shm/runcommand.log
      Parameters:
      Executing: pcsx2-qt -fullscreen -nogui "/home/anthony/RetroPie/roms/ps2/Final Fantasy X (France).iso"
      qt.qpa.xcb: could not connect to display
      qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
      This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
      
      Available platform plugins are: eglfs, linuxfb, wayland, minimal, wayland-egl, vkkhrdisplay, minimalegl, offscreen, xcb, vnc.
      
      /usr/bin/pcsx2-qt: line 2:  7414 Aborted                 (core dumped) /opt/pcsx2-unstable/pcsx2-qt "$@"
      

      With QT_DEBUG_PLUGINS=1 (I added it in configs/ps2/emulators.cfg) it shows more details (quite verbose):

      cat /dev/shm/runcommand.log
      Parameters:
      Executing: QT_DEBUG_PLUGINS=1 pcsx2-qt -fullscreen -nogui "/home/anthony/RetroPie/roms/ps2/Final Fantasy X (France).iso"
      qt.core.plugin.factoryloader: checking directory path "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms" ...
      qt.core.plugin.factoryloader: looking at "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqeglfs.so"
      qt.core.plugin.loader: Found metadata in lib /usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqeglfs.so, metadata=
      {
          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
          "MetaData": {
              "Keys": [
                  "eglfs"
              ]
          },
          "archlevel": 1,
          "className": "QEglFSIntegrationPlugin",
          "debug": false,
          "version": 394240
      }
      
      
      qt.core.plugin.factoryloader: Got keys from plugin meta data QList("eglfs")
      qt.core.plugin.factoryloader: looking at "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqlinuxfb.so"
      qt.core.plugin.loader: Found metadata in lib /usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqlinuxfb.so, metadata=
      {
          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
          "MetaData": {
              "Keys": [
                  "linuxfb"
              ]
          },
          "archlevel": 1,
          "className": "QLinuxFbIntegrationPlugin",
          "debug": false,
          "version": 394240
      }
      
      
      qt.core.plugin.factoryloader: Got keys from plugin meta data QList("linuxfb")
      qt.core.plugin.factoryloader: looking at "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqwayland-generic.so"
      qt.core.plugin.loader: Found metadata in lib /usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqwayland-generic.so, metadata=
      {
          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
          "MetaData": {
              "Keys": [
                  "wayland"
              ]
          },
          "archlevel": 1,
          "className": "QWaylandIntegrationPlugin",
          "debug": false,
          "version": 394240
      }
      
      
      qt.core.plugin.factoryloader: Got keys from plugin meta data QList("wayland")
      qt.core.plugin.factoryloader: looking at "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqminimal.so"
      qt.core.plugin.loader: Found metadata in lib /usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqminimal.so, metadata=
      {
          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
          "MetaData": {
              "Keys": [
                  "minimal"
              ]
          },
          "archlevel": 1,
          "className": "QMinimalIntegrationPlugin",
          "debug": false,
          "version": 394240
      }
      
      
      qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimal")
      qt.core.plugin.factoryloader: looking at "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqwayland-egl.so"
      qt.core.plugin.loader: Found metadata in lib /usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqwayland-egl.so, metadata=
      {
          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
          "MetaData": {
              "Keys": [
                  "wayland-egl"
              ]
          },
          "archlevel": 1,
          "className": "QWaylandEglPlatformIntegrationPlugin",
          "debug": false,
          "version": 394240
      }
      
      
      qt.core.plugin.factoryloader: Got keys from plugin meta data QList("wayland-egl")
      qt.core.plugin.factoryloader: looking at "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqvkkhrdisplay.so"
      qt.core.plugin.loader: Found metadata in lib /usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqvkkhrdisplay.so, metadata=
      {
          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
          "MetaData": {
              "Keys": [
                  "vkkhrdisplay"
              ]
          },
          "archlevel": 1,
          "className": "QVkKhrDisplayIntegrationPlugin",
          "debug": false,
          "version": 394240
      }
      
      
      qt.core.plugin.factoryloader: Got keys from plugin meta data QList("vkkhrdisplay")
      qt.core.plugin.factoryloader: looking at "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqminimalegl.so"
      qt.core.plugin.loader: Found metadata in lib /usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqminimalegl.so, metadata=
      {
          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
          "MetaData": {
              "Keys": [
                  "minimalegl"
              ]
          },
          "archlevel": 1,
          "className": "QMinimalEglIntegrationPlugin",
          "debug": false,
          "version": 394240
      }
      
      
      qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimalegl")
      qt.core.plugin.factoryloader: looking at "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqoffscreen.so"
      qt.core.plugin.loader: Found metadata in lib /usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqoffscreen.so, metadata=
      {
          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
          "MetaData": {
              "Keys": [
                  "offscreen"
              ]
          },
          "archlevel": 1,
          "className": "QOffscreenIntegrationPlugin",
          "debug": false,
          "version": 394240
      }
      
      
      qt.core.plugin.factoryloader: Got keys from plugin meta data QList("offscreen")
      qt.core.plugin.factoryloader: looking at "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqxcb.so"
      qt.core.plugin.loader: Found metadata in lib /usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqxcb.so, metadata=
      {
          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
          "MetaData": {
              "Keys": [
                  "xcb"
              ]
          },
          "archlevel": 1,
          "className": "QXcbIntegrationPlugin",
          "debug": false,
          "version": 394240
      }
      
      
      qt.core.plugin.factoryloader: Got keys from plugin meta data QList("xcb")
      qt.core.plugin.factoryloader: looking at "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqvnc.so"
      qt.core.plugin.loader: Found metadata in lib /usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqvnc.so, metadata=
      {
          "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
          "MetaData": {
              "Keys": [
                  "vnc"
              ]
          },
          "archlevel": 1,
          "className": "QVncIntegrationPlugin",
          "debug": false,
          "version": 394240
      }
      
      
      qt.core.plugin.factoryloader: Got keys from plugin meta data QList("vnc")
      qt.core.plugin.factoryloader: checking directory path "/opt/pcsx2-unstable/platforms" ...
      qt.core.library: "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms/libqxcb.so" loaded library
      qt.qpa.xcb: could not connect to display
      qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
      This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
      
      Available platform plugins are: eglfs, linuxfb, wayland, minimal, wayland-egl, vkkhrdisplay, minimalegl, offscreen, xcb, vnc.
      
      /usr/bin/pcsx2-qt: line 2:  7880 Aborted                 (core dumped) /opt/pcsx2-unstable/pcsx2-qt "$@"
      

      I tried a few things I found on the net, including installing libxcb-cursor0 (and other packages that were already present) but it didn't change anything after reboot.

      I know this is experimental but can I get some help to solve this?

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        Are you running from a desktop environment ? Which one ?

        X 1 Reply Last reply Reply Quote 0
        • X
          Xinu @mitu
          last edited by

          @mitu No desktop, I installed Ubuntu Server and connect using ssh to run the scripts etc

          1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator
            last edited by

            That's not a supported configuration - you need to start RetroPie from the desktop environment (X11/Wayland). The pcsx2 error is just that - Qt needs an X11 environment. Some emulators need a desktop environment to work, even on a Pi.

            X 1 Reply Last reply Reply Quote 0
            • X
              Xinu @mitu
              last edited by

              @mitu

              I tried to run sudo apt install -y xorg xinit but that didn't change anything.

              I guess you mean I must have a full DE like xfce, and launch emulationstation from there, correct?

              If so, is there a way to do this step without a mouse or keyboard? Because I'm using this mini-pc as a gaming station connected to the TV.

              mituM 1 Reply Last reply Reply Quote 0
              • mituM
                mitu Global Moderator @Xinu
                last edited by

                @Xinu said in Fail to launch ps2 game with Qt error:

                I guess you mean I must have a full DE like xfce, and launch emulationstation from there, correct?

                Yes.

                If so, is there a way to do this step without a mouse or keyboard? Because I'm using this mini-pc as a gaming station connected to the TV.

                Probably yes, but my advice is to use the desktop image for Ubuntu/Debian and re-do the installation. I'm not sure what are all the steps/packages needed to 'transform' a server based installation into a desktop one.

                1 Reply Last reply Reply Quote 0
                • X
                  Xinu
                  last edited by

                  I managed to launch it without installing a full DE, here is what I did in case anyone is interested (although installing a DE is probably the simplest option):

                  Install xorg and xinit:

                  sudo apt install -y xorg xinit
                  

                  In /etc/X11/Xwrapper.config set allowed_users=anybody

                  Add the current user (or replace with user that launches the command) to these groups:

                  sudo usermod -aG input,tty,video $USER
                  

                  Grant access to the second tty to current user (this need to be repeated after a reset):

                  sudo chown $USER /dev/tty2
                  

                  Now replace the command to launch the emulator in /opt/retropie/configs/ps2/emulators.cfg:

                  pcsx2-nogui = "xinit /opt/pcsx2-unstable/pcsx2-qt -fullscreen -nogui %ROM% -- :0"
                  

                  It's important to use the full path /opt/pcsx2-unstable/pcsx2-qt and not just pcsx2-qt because the later is actually a shell script that calls the former and xinit doesn't like that:

                  cat $(which pcsx2-qt)
                  #!/usr/bin/bash
                  /opt/pcsx2-unstable/pcsx2-qt "$@"
                  

                  And that's it. Launching a game will show the PCSX2 gui where we can choose the different folders for roms and BIOS. This step require a keyboard and ideally a mouse.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post

                  Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                  Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.