timothycrosley / streamdeck-ui

A Linux compatible UI for the Elgato Stream Deck.
https://timothycrosley.github.io/streamdeck-ui/
MIT License
1.12k stars 240 forks source link

Actually solved on Ubuntu: `qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.` #320

Closed desrod closed 1 year ago

desrod commented 1 year ago

This one is mentioned in the Troubleshooting page, but the instructions there for Ubuntu do not work on the last 4 versions of Ubuntu when this error is thrown (Lunar, Jammy, Focal nor Bionic).

The suggestions imply to install the libxcb-xinerama0 packages, but even after --reinstall install on that package, it still throws the same error.

Digging deeper with export QT_DEBUG_PLUGINS=, I see that there's an ancillary package that is needed, based on an error that isn't shown (libxcb-cursor.so.0: cannot open shared object file: No such file or directory) when running streamdeck which throws the above error:

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("linuxfb")
qt.core.plugin.factoryloader: checking directory path "/usr/bin/platforms" ...
qt.core.library: "/home/desrod/.local/lib/python3.10/site-packages/PySide6/Qt/plugins/platforms/libqxcb.so" cannot load: Cannot load library /home/desrod/.local/lib/python3.10/site-packages/PySide6/Qt/plugins/platforms/libqxcb.so: (libxcb-cursor.so.0: cannot open shared object file: No such file or directory)
qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "/home/desrod/.local/lib/python3.10/site-packages/PySide6/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /home/desrod/.local/lib/python3.10/site-packages/PySide6/Qt/plugins/platforms/libqxcb.so: (libxcb-cursor.so.0: cannot open shared object file: No such file or directory)"
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: wayland, vnc, minimalegl, offscreen, xcb, wayland-egl, vkkhrdisplay, eglfs, minimal, linuxfb.

Aborted

Simply installing the libxcb-cursor0 package solves that.

I came here because I couldn't get both my XL and my Mini working under 2.0.4, but now they both work under 2.0.15.

Great work!

Andreasgdp commented 1 year ago

Should this be incorporated into one of the guides? I faced the same issue, and same solution worked.

desrod commented 1 year ago

Yes, this should be in the docs. Feel free to PR this over to troubleshooting.md and push it.