You are not logged in.

#1 2022-07-21 03:30:59

charper_flow
Member
Registered: 2022-07-15
Posts: 34

[Wayland] some applications are having issues finding my qt plugins

EDIT:: I was sloppy with my qt5 and qt6 vocab. I have tried all these steps with qt5 installed and then I uninstalled and installed qt6 just to check. I mix and match them a bit in my problem description.

I am using wayland for my display server, and some applications are having issues finding my qt plugins. I have installed qt6-wayland , and have the following lines in my .bash_profile (I don't use a log-in manager):

if [ "$(tty)" = "/dev/tty1" ] ; then
        #Your environment variables
        export QT_QPA_PLATFORM=wayland
        export MOZ_ENABLE_WAYLAND=1
        export MOZ_WEBRENDER=1
        export XDG_SESSION_TYPE=wayland
        export XDG_CURRENT_DESKTOP=sway
        exec sway
fi

Most of my applications are running smoothly (even zoom) but I have some critical programs which cannot find my qt plugins. The most important is Julia.

Julia qt error
The archwiki suggests installing julia-bin from the AUR because it provides official builds compiled against patched LLVM libs. I don't completely understand this but it seem important so I installed Julias as follows.   

 paru -S julia-bin 

Julia seems to run fine until i do anything requiring graphical interfaces such as plots. As soon as I run something using the plots command, I get the following error:

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: linuxfb, minimal, offscreen, vnc, xcb.

^Cconnect: Connection refused
GKS: can't connect to GKS socket application

GKS: Open failed in routine OPEN_WS
GKS: GKS not in proper state. GKS must be either in the state WSOP or WSAC in routine ACTIVATE_WS

My guess is that somehow I need to make it so that something in my $HOME/.julia directory can find the qtt5 plugins? I am not exactly sure what to do. I posted a similar question on the julia forums but  I was not sure what to make of the response which I share below:

I’m on arch using sway as well. I never use the GR backend though but Makie and specifically GLMakie. If you’ve tarball installed Julia then in arch I often have to go in and update the outdated .so files that comes with the Julia tarball. Basically copying them from my ‘/use/lib’ to the Julia lib folder. This has fixed many problems with Makie for me. Not sure if it works for you though.

What files do I need to copy over so that julia can find my plug-ins? Do I need to put something in my $HOME/.julia/<something>?You can see my whole post here if you want to see more of what I tried from the Julia side of things.

My second qt problem involves running an application in a conda environment.

Running an application within a conda environment
I have installed conda on my machine yikes, but I took the precuations I saw on this forum and have downloaded miniconda.sh and run it as non-root pointing to a folder into $HOME. I launch my conda environment and launch a gui based application

source miniconda3/bin/activate 
conda activate mfix-22.1.1
mfix &

I get the exact same error that my qt plugin cannot be found. I imagine the solution is pretty similar, but instead of making my .julia aware of the qt plugins I probably have to put something in my $HOME/miniconda3/<something>

Let me know if there is anymore information I should provide. I appreciate all of this communities' help so far, and I swear Im slowly figuring it out!

Last edited by charper_flow (2022-07-21 06:50:22)

Offline

#2 2022-07-21 03:52:14

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

Re: [Wayland] some applications are having issues finding my qt plugins

charper_flow wrote:

I have installed qt6-wayland ... I need to make it so that something in my $HOME/.julia directory can find the qtt5 plugins?

Do these applications use qt5 or qt6?  If the former, do you also have qt5-wayland installed?


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

Offline

#3 2022-07-21 05:04:35

charper_flow
Member
Registered: 2022-07-15
Posts: 34

Re: [Wayland] some applications are having issues finding my qt plugins

I tried all of these steps with qt5-wayland installed too. But that does bring up another question. Is it ok to have qt5 and qt6 installed simultaneously? I have been removing one before installing the other ....

Offline

#4 2022-07-21 06:48:07

charper_flow
Member
Registered: 2022-07-15
Posts: 34

Re: [Wayland] some applications are having issues finding my qt plugins

It might be helpful to mention that Julia, when built from the official repositories, plots just fine. However it does have many many other issues and as I mentioned even the archwiki suggests installing from AURs julia-bin. Still maybe that will help someone see something im missing!

Offline

#5 2022-07-21 10:34:43

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,097

Re: [Wayland] some applications are having issues finding my qt plugins

Using -bin releases from the AUR will most likely lead to custom qt builds getting used that can very well not have Wayland support compiled in. There's little you can do about that. Either you suck up the issues when built against system libs or run these under xwayland if you need -bin releases coming with their own libraries. if you do not globally export QT_QPA_PLATFORM=wayland then either wayland will be used if possible or xcb/xwayland if that's the only option.

So the "quick fix" that's generally going to work is simply not exporting QT_QPA_PLATFORM at all.

Last edited by V1del (2022-07-21 10:37:26)

Offline

#6 2022-07-21 17:13:00

charper_flow
Member
Registered: 2022-07-15
Posts: 34

Re: [Wayland] some applications are having issues finding my qt plugins

Thanks so much that fixed everything. I just want to make sure I'm understanding how this is all working.

V1del wrote:

Either you suck up the issues when built against system libs

Things built against the system libs are things I can install from the official repository? And all of those things build from the libraries I have in /usr/lib or just /lib? But then sometimes (like in the case of julia) It might need to be built against its own libraries because of variety of package and compatibility goals, so in this case I download the bin from the AUR and these have custom built libraries that will be different from my system libraries? I think that makes sense to me

Final question! So because I set my session to Wayland is that how it knows to try Wayland first, even with that qt_plugin line in my bash_profile commented out?  Thanks again. It's all slowly starting to click, but there's a lot to how all of this is organized !

Offline

#7 2022-07-21 17:28:02

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

Re: [Wayland] some applications are having issues finding my qt plugins


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

Offline

Board footer

Powered by FluxBB