Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Remote X glx problems [not solved]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 882

PostPosted: Tue Nov 05, 2024 3:11 pm    Post subject: Remote X glx problems [not solved] Reply with quote

Edited for clarity.

I am using remote X with ssh -Y:

Many applications work that do not start OpenGL, like xosview and pcmanfm-qt.
BUT when I go to start dolphin I get:

Code:

jesnow@merckx ~ $ dolphin
qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QColorSpace(), profile  QSurfaceFormat::NoProfile)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QColorSpace(), profile  QSurfaceFormat::NoProfile)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig for QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize 1, greenBufferSize 1, blueBufferSize 1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::SingleBuffer, swapInterval 1, colorSpace QColorSpace(), profile  QSurfaceFormat::NoProfile)
Could not initialize GLX
Aborted
jesnow@merckx ~ $ glxinfo
name of display: localhost:17.0
Error: couldn't find RGB GLX visual or fbconfig

jesnow@merckx ~ $ glxgears
Error: couldn't get an RGB, Double-buffered visual



I think most of the Dolphin errors may be junk: KDE apps are very very chatty. Except when something goes wrong. Then they are terse: "Error, Aborted". The X server on the remote machine likely can't be started.

Also: Here is the relevant bit of emerge --info mesa:

Code:

=================================================================
                        Package Settings
=================================================================

media-libs/mesa-24.1.7::gentoo was built with the following:
USE="X llvm (opengl) proprietary-codecs vulkan wayland zstd -d3d9 -debug -lm-sensors -opencl -osmesa (-selinux) -test -unwind -vaapi -valgrind -vdpau -vulkan-overlay -xa" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="sse2" LLVM_SLOT="18 -15 -16 -17" VIDEO_CARDS="-d3d12 (-freedreno) -intel -lavapipe (-lima) -nouveau -nvk (-panfrost) -r300 -r600 -radeon -radeonsi (-v3d) (-vc4) -virgl (-vivante) -vmware -zink"


Cheers,
Jon.


Last edited by jesnow on Fri Nov 08, 2024 2:57 pm; edited 2 times in total
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3430

PostPosted: Tue Nov 05, 2024 6:51 pm    Post subject: Reply with quote

Geez, man, that chaos.....
Right now I have an impression that you can run KDE apps over SSH, but you can't run them locally on the server after you physically walk up to that machine, which makes it effectively your workstation and there is no point in even mentioning that SSH, because you're not using it when the problem occurs.

What are you trying to do on which machine and it doesn't work?
And which machine do those bits of code come from?
_________________
Make Computing Fun Again
Back to top
View user's profile Send private message
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 882

PostPosted: Tue Nov 05, 2024 7:39 pm    Post subject: Reply with quote

Unhelpful "insult then ignore".

szatox wrote:
Geez, man, that chaos.....
Right now I have an impression that you can run KDE apps over SSH, but you can't run them locally on the server after you physically walk up to that machine, which makes it effectively your workstation and there is no point in even mentioning that SSH, because you're not using it when the problem occurs.

What are you trying to do on which machine and it doesn't work?
Back to top
View user's profile Send private message
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 882

PostPosted: Sun Nov 10, 2024 5:11 pm    Post subject: Reply with quote

So now I understand the *category* of problem I seem to be having. This is very old, very arcane stuff. Mostly only people trying to run 3D X apps on supercomputers that don't have graphics cards have this problem.

https://mail.ncmir.ucsd.edu/pipermail/3dem/2019-February/006512.html

KDE plasma requires GLX hardware acceleration. This doesn't work in a remote X window, obviously. It's a known issue obviously for decades. So GLX rendering is forced to use the software rendering. Which it will do if allowed.

The problem is apparently that Xorg disabled indirect GLX rendering by default many years ago, so it is necessary to edit xorg.conf, or rather one of the many files in /usr/share/X11/xorg.conf.d/ so I added a file /usr/share/X11/xorg.conf.d/99-allow-indirect-glx.conf

containing:

Code:

# JES Nov 2024 I shouldn't have to do this
#
Section "ServerFlags"
Option "AllowIndirectGLX" "on"
Option "IndirectGLX" "on"
EndSection


I will update whether that solved anything after I relaunch the X server, currently busy.


Cheers,
Jon.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3430

PostPosted: Sun Nov 10, 2024 6:59 pm    Post subject: Reply with quote

Quote:
Unhelpful "insult then ignore".

You know, after you've seen a bunch of people fall for various pitfalls, you start developing an instinctive sense of what makes a pitfall. With experience, it is often possible to figure out what the problem is based on almost no information, to the point you're able to answer questions the OP didn't even know he should have asked... But X is a special case. It has history. It is confusing. It doesn't work the way people think it works, and loosely used terminology which would be fine in any other case guarantees a misunderstanding. At this point I expect a whole lot of people to have many, many very wrong ideas about it, effectively making the whole thing one huge bottomless abyss.
So, I don't know if I'll be able to answer your questions, but I do know you need to do a really good job describing your setup to even have a chance. So far, you've posted 2 random outputs, and we don't even know how you obtained them, nor how they fit into the whole picture. With the lack of information so far, the princess might as well be in another castle.

For starters:
What are the names of those machines?
Which one is your terminal, and which is the application server?
Which machine does this mesa info come from?
On which machine did you enable indirect GLX?
Can you run glxgears locally on the terminal, without going through ssh to the application server?
_________________
Make Computing Fun Again
Back to top
View user's profile Send private message
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 882

PostPosted: Mon Nov 11, 2024 3:50 pm    Post subject: Reply with quote

Thanks for your help!

I have been using X for a while, and have been in this particular pitfall before and gotten out of it. When you do things that were once common (eg Remote X) people often decide for you that another way is better ("just use rdp!") you then sometimes find that your way has been quietly deprecated and isn't possible any more. I really use remote X every day, where an application is runinng on some remote machine but showing its face to the world on the X server on my desk. Basic x apps like xeyes and xosview and pcmanfm-qt still run just fine. Remote X is 100% healthy, except for GLX.

Systems: Headless server Merckx. Hasn't has a screen attached to it in years. It *should* be able to start X, but I have no idea.
Client (but of course where the X server lives) Bartali.

The code is all from merckx. In a terminal running on bartali. Emerge --info also merckx, as that's what I understood should be doing the software rendering.

I enabled indirect glx on Bartali. Since merckx is never running an x server it would be pointless. And it didn't change anything.

glxgears runs just great on bartali. If I use __GL_SYNC_TO_VBLANK=0 I get 29Kfps. glxinfo on bartali shows many attributes like GL_AMD_multidraw_indirect, so I'm guessing that it would accept indirect GLX instructions if merckx were sending them.

There seem to be a few *possible* solutions:
- Don't use kde apps (this will work: pcmanfm-qt works but is not as functional as dolphin)
- Remove or turn off GLX from KDE and its dependencies (this is probably very difficult)
- Have KDE/QT fall back to software rendering seamlessly (wasn't this the default behavior before?)
- *Force* KDE/QT to do its GLX rendering in software (should be possible but I don't know how)
- Get KDE/QT to do its GLX rendering indirectly on bartali's GPU (I tried this, but nothing changed, I'm probably not doing it right)

I'm not trying to run games, so I don't care at all about performance. It just needs to work. It *has* worked in the past. I was able to connect this way from japan with a massive ping aand low bandwidth and still get done what I needed done. I had *chromium* running in a remote X window from Japan at one point (long story why), it was just last year.

I suspect kde of simply deciding that kde-plasma 6 depends on hardware acceleration because of course everybody has that now.

Any of the above you can help with would be greatly appreciated.

Cheers,
Jon.

szatox wrote:
Quote:
Unhelpful "insult then ignore".

You know, after you've seen a bunch of people fall for various pitfalls, you start developing an instinctive sense of what makes a pitfall. With experience, it is often possible to figure out what the problem is based on almost no information, to the point you're able to answer questions the OP didn't even know he should have asked... But X is a special case. It has history. It is confusing. It doesn't work the way people think it works, and loosely used terminology which would be fine in any other case guarantees a misunderstanding. At this point I expect a whole lot of people to have many, many very wrong ideas about it, effectively making the whole thing one huge bottomless abyss.
So, I don't know if I'll be able to answer your questions, but I do know you need to do a really good job describing your setup to even have a chance. So far, you've posted 2 random outputs, and we don't even know how you obtained them, nor how they fit into the whole picture. With the lack of information so far, the princess might as well be in another castle.

For starters:
What are the names of those machines?
Which one is your terminal, and which is the application server?
Which machine does this mesa info come from?
On which machine did you enable indirect GLX?
Can you run glxgears locally on the terminal, without going through ssh to the application server?
Back to top
View user's profile Send private message
Ralphred
l33t
l33t


Joined: 31 Dec 2013
Posts: 653

PostPosted: Mon Nov 11, 2024 9:49 pm    Post subject: Reply with quote

jesnow wrote:
It *should* be able to start X, but I have no idea.
This could be the issue, I can start glxgears (and other apps that whinge about GLX being missing if I start them in Xnest) via an ssh -{X|Y} name@host terminal, and they "just work". I have no references to iglx in config or commands. The test machine isn't headless though and I make sure it's GPU is always working properly.
I do have a headless one I can throw mesa-progs at if you think it might "break" and produce useful info?
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3430

PostPosted: Tue Nov 12, 2024 2:05 pm    Post subject: Reply with quote

Quote:
The code is all from merckx. In a terminal running on bartali. Emerge --info also merckx, as that's what I understood should be doing the software rendering.
And that's one of the confusing things about X-forwarding. Indirect rendering means xserver talks to mesa on behalf of the user's application. This part happens on the terminal, bartali, using its mesa and GPU.
Some application even request opencl calculation via xserver, even though there's nothing to display at the end.
Unless you're using stuff like virgl or xpra, which BTW might be a good option. I found an article covering both tools on Arch wiki, it seems to be a decent starting point https://wiki.archlinux.org/title/VirtualGL

Still, it would be good to know whether the problem with runing KDE applications on merckx via SSH comes from merckx or from SSH. Can you try starting X on merckx and running dolphin there, without X-forwarding via ssh?
Also, one thing that gave me a pause: KDE's dependence on wayland. Dolphin depends on qtbase, which requires wayland.
I don't know to what extent is this declared requirement real, but it is entirely possible that kde apps will not run with X-forwarding because they don't speak X11 anymore. It is something to verify.
And thinking about it again, even if you manage to solve all problems and make it work for now, it's likely to break soon, since KDE appears to be moving away from X11. Well, at least that's my impression.

Too bad, I like the simplicity of X-forwarding too.
_________________
Make Computing Fun Again
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum