Hey, recently, I’ve been getting messages like this:
[code]root [0] TCanvas c
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Error in : GLXBadContext (XID: 39846151, XREQ: 154)
When trying to use root through ssh on lxplus. Any idea how to solve this? google searches indicate a problem with libGL, but I’m pretty sure my local version is fine, and I can do nothing about lxplus’s…
I’ve attached my ~/.rootlogon.C ~/.rootrc and system.rootrc for my local machine. To my knowledge I have no .rootlogon.C or .rootrc for lxplus. system.rootrc.txt (32.4 KB) .rootrc.txt (84 Bytes) .rootlogon.C.txt (5.54 KB)
Note: it’s not “.rootlogon.C” but “rootlogon.C” (no “.” in the front) and you should search for it in the “current subdirectory” (i.e. where you start the ROOT executable), not in your “${HOME}”.
And search for “.rootrc” in both, your “${HOME}” and in the “current subdirectory”.
Also, search for “rootalias.C” in the “current subdirectory”.
Okay, Just to simplify matters, I’m launching my ssh connection from my home directory on my local machine, and I’m starting root in my local directory on lxplus.
I’ve found no trace of files with ‘rootlogon’, ‘rootrc’, or ‘rootalias’ in their name in the current directory on both machines (That counts as $HOME as well). different than the ones I attached.
I tried launching both root and ssh with LIBGL_DEBUG=verbose, and I encountered the following output:
root [0] TBrowser tb
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
libGL: Can't open configuration file /afs/cern.ch/user/m/mkrafczy/lxplus/.drirc: No such file or directory.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Error in <RootX11ErrorHandler>: GLXBadContext (XID: 90177789, XREQ: 154)
My labmate isn’t having problems, and I didn’t have any problems before I changed to Arch, so I’m fairly certain that the problem is on my end.
To that end, I tried seeing if /usr/lib64/dri/swrast_dri.so existed on my local machine. It didn’t, so I created a symbolic link to it’s actual location which was /usr/lib/xorg/modules/dri.
Well, that was promising, but I’m still getting the GLXBadContext error…
After exporting LIBGL_ALWAYS_INDIRECT=1, when I use LIBGL_DEBUG=verbose when launching root, here is my new output:
[code]LIBGL_DEBUG=verbose root
*
W E L C O M E to R O O T *
*
Version 5.34/32 23 June 2015 *
*
You are welcome to visit our Web site *
http://root.cern.ch *
*
ROOT 5.34/32 (heads/v5-34-00-patches@v5-34-30-102-g626b950, Jul 03 2015, 15:01:00 on linuxx8664gcc)
CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] TCanvas c
Error in : GLXBadContext (XID: 90177799, XREQ: 154)[/code]
Try to remove the additional “swrast_dri.so” link that you created and restart your X server (i.e. return to the original / standard configuration) and then try to run “glxinfo” and “glxgears” and see if they report any problems (btw. try to run them on your local machine and then on the remote one when you login using “ssh -X -Y”).
mkrafczy on lxplus0091 [12:19:38]
~
○ glxgears
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 154 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 33
Current serial number in output stream: 35[/code]
That’s without LIBGL_ALWAYS_INDIRECT or LIBGL_DEBUG
I’ve gone and tried the X forwarding on another machine, and it works fine on a machine running centos6. (both the TCanvas as well as glxgears).
Well, google searches like that have not turned up anything helpful for me.
In my case, the only the apparently wrong with my opengl installation is the inability to do X11 forwarding. Literally everything else I’ve tried works perfectly.
It’s definitely me though, I tried another server (my own home server) and I’m getting the same problem.
At this time, I can now launch TCanvas windows without getting that GLX error!
I didn’t do anything specific to fix it though. Either lxplus updated their xorg installation, or it was me upgrading to xorg 1.17.4 which fixed the problem or something like this.
I’m going to mark this question as solved though since I’m no longer having this issue.
The current version of XQuartz, 2.7.9 has a problem with recent X11 libs from Linux. When starting a X11 app on lxplus with a display on the Mac, the users get an error message like
libGL error: failed to load driver: swrast
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 149 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 26
Current serial number in output stream: 28
This issue is independent of the OS X version used.
For the time being the only work-around consists of installing a beta version of XQuartz that already contains a patch for this issue, and change some XQuartz related defaults. Using a pre-release beta version unfortunately implies the risk of new bugs and incompatibilities, so you have to decide whether this risk is acceptable.
To install the beta version of XQuartz:
Quit the actual version of Xquartz if it is still running.
To get this beta version go to [xquartz.org/releases/index.html](https://www.xquartz.org/releases/index.html), download and install XQuartz 2.7.10_beta2 (or a newer beta if available).
Once it is installed execute on the command line of your Mac
Thanks very much. The ROOT part works nicely for me.
But still does not work for me is using GL applications with the swrast driver. I still get the following error just doing:
$ ssh -Y lxplus
...
$ setenv LIBGL_DEBUG verbose
$ glxgears
libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
libGL: Can't open configuration file /afs/cern.ch/user/m/mato/.drirc: No such file or directory.
libGL: Can't open configuration file /afs/cern.ch/user/m/mato/.drirc: No such file or directory.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
...