Einar's blog

Rapid Photo Downloader Error on Wayland on Arch

If you try to run rapid-photo-downloader on Arch on Wayland, you get this error message:

qt.qpa.plugin: Could not find the Qt platform plugin "wayland-egl" 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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Fatal Python error: Aborted

Current thread 0x00007fa0cd669740 (most recent call first): File "/usr/lib/python3.11/site-packages/raphodo/ui/viewutils.py", line 975 in anyscreenscaledqt File "/usr/lib/python3.11/site-packages/raphodo/ui/viewutils.py", line 991 in anyscreenscaled File "/usr/lib/python3.11/site-packages/raphodo/rapid.py", line 7489 in main File "/usr/bin/rapid-photo-downloader", line 33 in <module>

Extension modules: PyQt5.QtCore, gi.gi, zmq.backend.cython.context, zmq.backend.cython.message, zmq.backend.cython.socket, zmq.backend.cython.device, zmq.backend.cython.poll, zmq.backend.cython.proxysteerable, zmq.backend.cython.version, zmq.backend.cython.error, zmq.backend.cython.utils, psutil.psutillinux, psutil.psutilposix, gphoto2.widget, gphoto2.version, gphoto2.result, gphoto2.portlog, gphoto2.portinfolist, gphoto2.list, gphoto2.filesys, gphoto2.file, gphoto2.context, gphoto2.camera, gphoto2.abilitieslist, PyQt5.QtGui, PyQt5.QtWidgets, PyQt5.QtNetwork, tornado.speedups, PyQt5.QtXml, PyQt5.QtX11Extras, PyQt5.QtWebChannel, PyQt5.QtTest, PyQt5.QtSvg, PyQt5.QtSql, PyQt5.QtQml, PyQt5.QtQuick, PyQt5.QtQuickWidgets, PyQt5.QtPrintSupport, PyQt5.QtPositioning, PyQt5.QtLocation, PyQt5.QtOpenGL, PyQt5.QtDBus (total: 42) Avbrutt (SIGABRT) (kjerne lagret i fil)

Reinstalling the program does nothing. It turns out that there is a missing dependency. I have spent a lot of time trying to figure this out, but finding the information is hard, so I thought I would help my future self and maybe some others by supplying the fix I have found. It is not, as many suggest online, enough to install Python-PyQt5. It is already a dependency and installed. You need to install qt5-wayland to get it to work. On some distros, you also need to install egl-wayland, while on others, it comes as a dependency of qt5-wayland.

This is not just a problem with rapid-photo-downloader. There is a lot of discussion online about this error message with other Qt5 and Qt6 packages from different distros like Debian, Ubuntu and Arch. qt5-wayland is a dependency only if you run Wayland, so maybe that is why it does not come with the package as a dependency even if I think it should. Now that the larger desktop environments are all Wayland by default, I would guess X11 users are the minority of GNU/Linux users. Therefore, Wayland dependencies should come with all packages that need them. Legacy X11 users would probably not worry too much if a small extra package they do not need is installed. If they really worried about bloat, they would not have used X11 in the first place since it is a baroque collection of legacy cruft.

Update August 6th, 2023: I have experienced the same issue with Kdenlive on GNU Guix as well. It turns out that both Qt5-wayland (qtwayland@5.15.8 on Guix) and egl-wayland are missing dependencies for Kdenlive for Wayland users. I tried installing both qtwayland (qt6-wayland on other distros) and qtwayland@5.15.8, but Guix complained and only let me have one of them. This makes it impossible to mix and match Qt5 and Qt6 apps on Wayland on Guix. Guix should have two sets of packages like other distros (qt5-wayland and Qt6-wayland) even if it is simple to make a clean environment since users expect to be able to mix and match packages from different versions of the same toolkit as on any other distro without going through extra hoops. It is not the users' choice if the devs of their favourite packages use the older version of the Qt toolkit instead of the newest one. We need both Qt5-wayland and Qt6-wayland, just as we still need both GTK2, GTK3 and GTK4.

All content is shared under the terms of the Creative Commons Attribution-ShareAlike license.