X11 forwarding through ssh on lxplus

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)

root [0]
root [1] TBrowser tb
Error in : GLXBadContext (XID: 39846174, XREQ: 154)[/code]

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…

It is strange that Lib GL is invoked on lxplus. do you have SetCanvasPerferGL in your rootlogon.C ?
Or system.rootrc ?

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)

These files do not trigger the GL option on.
Does the canvas your a creating have the thing GL in its title ?

No, I just called ‘TCanvas c’.

So whatever the default canvas is.

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.

This didn’t help anything though.

I guess you should do “ssh -Y” ?

Yes, I’m doing this.

other x programs such as ‘xclock’ work just fine.

Also when I launch root without -l, The splash screen appears just fine.

I’ve also added

Host lxplus*
User mkrafczy
ForwardX11Trusted yes

to my local ~/.ssh/config file, so that it X11 connections are forwarded in the trusted fashion each time.

See also:
CMSPublic → OpenGL and X11 problems

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]

Okay, I’m getting worried that this is a driver interaction of some type which will be very difficult to change.

Is there a way I can tell root to not use OpenGL at all?

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”).

glxgears works great on my local machine.

In the original configuration, when I try to run glxgears on lxplus with ssh -X -Y, I get

[code]ssh -X -Y mkrafczy@lxplus.cern.ch
Password:
Password:
Last login: Sat Aug 29 17:03:55 2015 from pb-d-128-141-132-42.cern.ch


  • Welcome to lxplus0091.cern.ch, SLC, 6.7
  • Archive of news is available in /etc/motd-archive
  • Reminder: You have agreed to comply with the CERN computing rules
  • http://cern.ch/ComputingRules
  • Puppet environment: production
  • Puppet hostgroup: bi/inter/plus/live/login
  • LXPLUS Public Login Service
  • 2015-09-01 - nano the editor(?) installed

Node is : LXPLUS

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).

google.pl/search?q=libGL+er … 8&oe=utf-8

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.

If I find the answer, I’ll post it here.

You’ll get another set of hints if you try: google.pl/search?q=ssh+libG … 8&oe=utf-8

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.

Hi

Ive been facing the same problem, here is a solution if others arent working

posting.php?mode=reply&f=3&t=20297

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

defaults write org.macosforge.xquartz.X11 enable_iglx -bool true

You might have to reboot your Mac to activate the new XQuartz.

hope this helps, :slight_smile:

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
...