You are not logged in.

#1 2023-08-10 14:57:53

the_good_sloth
Member
Registered: 2023-08-10
Posts: 3

Qt.qpa.plugin: could not find the qt platform

I'm trying to run the sioyek appimage (pdf viewer) on `Hyprland` but it does not start. However, I have no problem running it on GNOME Wayland.
The maintainer thinks it could be a bug with `qt`, but I don't think so. If that was the case, why would it work on GNOME without issues?
I don't know really where to look to solve this.
Adding QT_QPA_PLATFORM=wayland did not work; adding QT_PLUGIN_PATH=/usr/lib/qt/plugins did not work either.

Terminal output of `sioyek`:

qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

Aborted (core dumped)qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

Aborted (core dumped)

Kernel: 6.4.9-arch1-1
Qt packages installed:

  • python-pyqt6 6.5.2-1 (pyqt6)

  • python-pyqt6-sip 13.5.2-1

  • python-pyqt6-webengine 6.5.0-2 (pyqt6)

  • qt6-3d 6.5.2-1 (qt6)

  • qt6-base 6.5.2-1 (qt6)

  • qt6-declarative 6.5.2-1 (qt6)

  • qt6-imageformats 6.5.2-1 (qt6)

  • qt6-positioning 6.5.2-1 (qt6)

  • qt6-svg 6.5.2-1 (qt6)

  • qt6-tools 6.5.2-1 (qt6)

  • qt6-translations 6.5.2-1 (qt6)

  • qt6-wayland 6.5.2-1 (qt6)

  • qt6-webchannel 6.5.2-1 (qt6)

  • qt6-webengine 6.5.2-1 (qt6)

  • qt6ct 0.8-6

  • avahi 1:0.8+r22+gfd482a7-1

  • kvantum 1.0.10-1

  • libaccounts-qt 1.16-3

  • libdbusmenu-qt5 0.9.3+16.04.20160218-6

  • phonon-qt5 4.11.1-3

  • phonon-qt5-gstreamer 4.10.0-4

  • polkit-qt5 0.114.0-1

  • poppler-qt5 23.07.0-1

  • pyside2 5.15.10-1

  • python-pyqt5 5.15.9-2 (pyqt5)

  • python-pyqt5-sip 12.12.2-1

  • qca-qt5 2.3.7-1

  • qt5-3d 5.15.10-1 (qt qt5)

  • qt5-base 5.15.10+kde+r147-1 (qt qt5)

  • qt5-declarative 5.15.10+kde+r29-1 (qt qt5)

  • qt5-graphicaleffects 5.15.10-1 (qt qt5)

  • qt5-location 5.15.10+kde+r4-2 (qt qt5)

  • qt5-multimedia 5.15.10+kde+r3-1 (qt qt5)

  • qt5-quickcontrols 5.15.10-1 (qt qt5)

  • qt5-quickcontrols2 5.15.10+kde+r6-1 (qt qt5)

  • qt5-speech 5.15.10+kde+r1-1 (qt qt5)

  • qt5-svg 5.15.10+kde+r8-1 (qt qt5)

  • qt5-tools 5.15.10+kde+r3-1 (qt qt5)

  • qt5-translations 5.15.10-1 (qt qt5)

  • qt5-wayland 5.15.10+kde+r52-1 (qt qt5)

  • qt5-webchannel 5.15.10+kde+r3-1 (qt qt5)

  • qt5-webengine 5.15.14-4 (qt qt5)

  • qt5-x11extras 5.15.10-1 (qt qt5)

  • qt5-xmlpatterns 5.15.10-1 (qt qt5)

  • qt5ct 1.7-1

  • sonnet 5.108.0-1 (kf5)

Last edited by the_good_sloth (2023-08-10 15:57:12)

Offline

#2 2023-08-10 15:43:15

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,462
Website

Re: Qt.qpa.plugin: could not find the qt platform

I can replicate this issue without qt5-wayland installed, but once it is installed sioyek starts just fine.  The output from qt that you quoted indicates that qt5-wayland is not actually installed.  Please post the output of the following:

pacman -Qkk qt5-wayland
env | grep -i qt
env | grep -i session

"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2023-08-10 15:56:09

the_good_sloth
Member
Registered: 2023-08-10
Posts: 3

Re: Qt.qpa.plugin: could not find the qt platform

I forgot one very important info, i'll add it now on the original post. I am using the appimage.

Here the outputs:

pacman -Qkk qt5-wayland
qt5-wayland: 398 total files, 0 altered files
env | grep -i qt
QT_QPA_PLATFORMTHEME=qt5ct
QT_QPA_PLATFORM=wayland
env | grep -i session
DESKTOP_SESSION=hyprland
XDG_SESSION_DESKTOP=sway
XDG_SESSION_TYPE=wayland
STARSHIP_SESSION_KEY=1701993491751260
XDG_SESSION_CLASS=user
XDG_SESSION_ID=3
GDMSESSION=hyprland
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus

Last edited by the_good_sloth (2023-08-10 15:56:35)

Offline

#4 2023-08-10 16:54:16

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,462
Website

Re: Qt.qpa.plugin: could not find the qt platform

the_good_sloth wrote:

I forgot one very important info, i'll add it now on the original post. I am using the appimage.

Ah, yeah, then none of the rest of that matters.  Don't use the appimage.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2023-08-10 23:21:07

the_good_sloth
Member
Registered: 2023-08-10
Posts: 3

Re: Qt.qpa.plugin: could not find the qt platform

I'd love to, but it has this bug which is pretty annoying. Is there anything I can do about it?
The flatpak version does not have this problem, but I'd still like to have a solution for this problem if it does present itself in other apps

Last edited by the_good_sloth (2023-08-10 23:24:07)

Offline

#6 2023-08-11 00:05:42

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,462
Website

Re: Qt.qpa.plugin: could not find the qt platform

Then build it against the compatible version of libmupdf so it works - but that's a seperate issue.  And if that's your bug report, that's a different OS...


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2023-09-07 19:28:06

hao
Member
Registered: 2023-09-07
Posts: 1

Re: Qt.qpa.plugin: could not find the qt platform

I'm using the aur package on wayland/hyprland, same error happens to me after the installation (although it seems running fine). For aur package, simply install `qt5-wayland` fixed the error. Hope people using aur package found this helpful.

Offline

#8 2023-09-07 20:09:46

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,462
Website

Re: Qt.qpa.plugin: could not find the qt platform

Please don't bump and old thread just to restate something that was already clear in the thread.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB