LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 03-29-2017, 12:35 PM   #1
msdobrescu
Member
 
Registered: Feb 2006
Location: Romania
Distribution: Sabayon
Posts: 36

Rep: Reputation: 3
libGL errors


Hello,

I have two systems, one PC with nVidia, one laptop having optimus, both with Sabayon up to date (kernel 4.10) with Plasma + sddm + Xorg.
The problem started on the PC only, on the laptop is not present.

I've tried to run Celestia. It shows the splash, loads a few seconds, then fails.

I've managed to debug it a bit:

Code:
$ export LIBGL_DEBUG=verbose
$ celestia
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 /home/user/.drirc: No such file or directory.
libGL: Can't open configuration file /home/user/.drirc: No such file or directory.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
The program 'celestia' received an X Window System error.
This probably reflects a bug in the program.
The error was 'GLXBadContext'.
  (Details: serial 1732 error_code 167 request_code 153 minor_code 6)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Here, I've listed the graphic libs:

Code:
find /usr -iname "*libGL.so*" -exec ls -l {} \;

lrwxrwxrwx 1 root root 14 mar  6 20:05 /usr/lib32/libGL.so.1 -> libGL.so.1.2.0
-rwxr-xr-x 1 root root 559796 mar  5 20:31 /usr/lib32/libGL.so.1.2.0
lrwxrwxrwx 1 root root 14 ian 29 10:51 /usr/lib32/opengl/nvidia/lib/libGL.so.1 -> libGL.so.1.0.0
-rwxr-xr-x 1 root root 444100 ian 14 11:13 /usr/lib32/opengl/nvidia/lib/libGL.so.1.0.0
lrwxrwxrwx 1 root root 14 ian 29 10:51 /usr/lib32/opengl/nvidia/lib/libGL.so -> libGL.so.1.0.0
lrwxrwxrwx 1 root root 12 mai  2  2016 /usr/lib32/opengl/ati/lib/libGL.so.1 -> libGL.so.1.2
lrwxrwxrwx 1 root root 12 mai  2  2016 /usr/lib32/opengl/ati/lib/libGL.so -> libGL.so.1.2
lrwxrwxrwx 1 root root 14 mar  6 20:05 /usr/lib32/libGL.so -> libGL.so.1.2.0

lrwxrwxrwx 1 root root 14 mar  6 20:05 /usr/lib64/libGL.so.1 -> libGL.so.1.2.0
-rwxr-xr-x 1 root root 430608 mar  5 20:31 /usr/lib64/libGL.so.1.2.0                                                                                                                                                                                                                       
lrwxrwxrwx 1 root root 14 ian 29 10:51 /usr/lib64/opengl/nvidia/lib/libGL.so.1 -> libGL.so.1.0.0                                                                                                                                                                                           
-rwxr-xr-x 1 root root 583912 ian 14 11:13 /usr/lib64/opengl/nvidia/lib/libGL.so.1.0.0                                                                                                                                                                                                     
lrwxrwxrwx 1 root root 14 ian 29 10:51 /usr/lib64/opengl/nvidia/lib/libGL.so -> libGL.so.1.0.0                                                                                                                                                                                             
lrwxrwxrwx 1 root root 12 mai  2  2016 /usr/lib64/opengl/ati/lib/libGL.so.1 -> libGL.so.1.2                                                                                                                                                                                                 
lrwxrwxrwx 1 root root 12 mai  2  2016 /usr/lib64/opengl/ati/lib/libGL.so -> libGL.so.1.2                                                                                                                                                                                                   
lrwxrwxrwx 1 root root 14 mar  6 20:05 /usr/lib64/libGL.so -> libGL.so.1.2.0
I've managed to run it, eventually:

Code:
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib32/opengl/nvidia/lib:/usr/lib64/opengl/nvidia/lib" celestia
On the laptop it is not necessary to add the libs path.

Of course I've reinstalled nvidia drivers, mesa, in order to fix glx, but no success.

What can I do to make it run without the libs path?

I suspect some other issues have the same source. I can't connect to the PC remotely using x2go to the pc (a black screen and a mouse pointer is present). The laptop works again.

glxgears works fine.

I've tried the nvidia setup of X.org, but no success.

Please help.

Thank you.

Last edited by msdobrescu; 03-31-2017 at 12:03 PM.
 
Old 03-31-2017, 06:09 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
post the output of
Code:
ls -l /use/lib64/libGL*

The first thing to eliminate is using Nvidia drivers with Mesa libGL stuff or vice-versa.

Also post full video driver details
 
Old 03-31-2017, 11:32 AM   #3
msdobrescu
Member
 
Registered: Feb 2006
Location: Romania
Distribution: Sabayon
Posts: 36

Original Poster
Rep: Reputation: 3
Hello,

Thank you for your time.

Code:
ls -l /usr/lib64/libGL*
lrwxrwxrwx 1 root root     40 oct 11  2012 /usr/lib64/libGLcore.so -> opengl/nvidia/lib/libGLcore.so.173.14.31
lrwxrwxrwx 1 root root     40 feb 21  2015 /usr/lib64/libGLESv1_CM.so -> opengl/nvidia/lib/libGLESv1_CM.so.346.35
lrwxrwxrwx 1 root root     18 mar  6 20:05 /usr/lib64/libGLESv2.so -> libGLESv2.so.2.0.0
lrwxrwxrwx 1 root root     18 mar  6 20:05 /usr/lib64/libGLESv2.so.2 -> libGLESv2.so.2.0.0
-rwxr-xr-x 1 root root  38608 mar  5 20:31 /usr/lib64/libGLESv2.so.2.0.0
lrwxrwxrwx 1 root root     19 nov 17 00:22 /usr/lib64/libGLEWmx.so -> libGLEWmx.so.1.13.0
lrwxrwxrwx 1 root root     19 nov 17 00:22 /usr/lib64/libGLEWmx.so.1.13 -> libGLEWmx.so.1.13.0
-rwxr-xr-x 1 root root 526296 sep 17  2016 /usr/lib64/libGLEWmx.so.1.13.0
lrwxrwxrwx 1 root root     17 nov 17 00:22 /usr/lib64/libGLEW.so -> libGLEW.so.1.13.0
lrwxrwxrwx 1 root root     17 sep 16  2015 /usr/lib64/libGLEW.so.1.12 -> libGLEW.so.1.12.0
-rwxr-xr-x 1 root root 612464 feb  2  2015 /usr/lib64/libGLEW.so.1.12.0
lrwxrwxrwx 1 root root     17 nov 17 00:22 /usr/lib64/libGLEW.so.1.13 -> libGLEW.so.1.13.0
-rwxr-xr-x 1 root root 595928 sep 17  2016 /usr/lib64/libGLEW.so.1.13.0
lrwxrwxrwx 1 root root     14 mar  6 20:05 /usr/lib64/libGL.so -> libGL.so.1.2.0
lrwxrwxrwx 1 root root     14 mar  6 20:05 /usr/lib64/libGL.so.1 -> libGL.so.1.2.0
-rwxr-xr-x 1 root root 430608 mar  5 20:31 /usr/lib64/libGL.so.1.2.0
lrwxrwxrwx 1 root root     15 dec 22  2013 /usr/lib64/libGLU.so -> libGLU.so.1.3.1
lrwxrwxrwx 1 root root     15 dec 22  2013 /usr/lib64/libGLU.so.1 -> libGLU.so.1.3.1
-rwxr-xr-x 1 root root 522960 nov 11  2013 /usr/lib64/libGLU.so.1.3.1
lrwxrwxrwx 1 root root     15 mar 28 21:26 /usr/lib64/libGLw.so -> libGLw.so.1.0.0
lrwxrwxrwx 1 root root     15 mar 28 21:26 /usr/lib64/libGLw.so.1 -> libGLw.so.1.0.0
-rwxr-xr-x 1 root root  26744 aug 18  2014 /usr/lib64/libGLw.so.1.0.0
I use the Sabayon supplied nvidia drivers. What do you need to know?

The package reprots to be "Nvidia Drivers 375.26-r1#4.10.0-sabayon~0":

Code:
USE flags: -compat -gtk3 -kernel_FreeBSD -pax_kernel -static-libs -x-multilib X abi_x86_64 acpi amd64 driver elibc_glibc kernel_linux kms multilib tools userland_GNU uvm wayland
Runtime dependencies
      app-eselect/eselect-opencl
      >=app-eselect/eselect-opengl-1.0.9
      app-misc/pax-utils
      dev-libs/wayland
      =sys-kernel/linux-sabayon-4.10.4~-1
      >=sys-libs/glibc-2.6.1
      sys-power/acpid
      virtual/modutils
      <x11-base/xorg-server-1.19.99:0
      ~x11-drivers/nvidia-userspace-375.26
      ~x11-drivers/nvidia-userspace-375.26[X]
      ~x11-drivers/nvidia-userspace-375.26[multilib]
      ~x11-drivers/nvidia-userspace-375.26[tools]
      >=x11-libs/libX11-1.6.2[abi_x86_32]
      >=x11-libs/libXext-1.3.2[abi_x86_32]
      >=x11-libs/libvdpau-1.0
Build dependencies
      app-arch/xz-utils
      app-eselect/eselect-opencl
      >=app-eselect/eselect-opengl-1.0.9
      app-misc/pax-utils
      sys-apps/pciutils
      sys-apps/sed
      >=sys-libs/glibc-2.6.1
      virtual/linux-sources
      virtual/modutils
      virtual/pkgconfig
But the issue is old, since kernel 4.9.0 at least.
 
Old 03-31-2017, 11:43 AM   #4
msdobrescu
Member
 
Registered: Feb 2006
Location: Romania
Distribution: Sabayon
Posts: 36

Original Poster
Rep: Reputation: 3
Analyzing the output, I see two broken links:

Code:
lrwxrwxrwx 1 root root     40 oct 11  2012 /usr/lib64/libGLcore.so -> opengl/nvidia/lib/libGLcore.so.173.14.31
lrwxrwxrwx 1 root root     40 feb 21  2015 /usr/lib64/libGLESv1_CM.so -> opengl/nvidia/lib/libGLESv1_CM.so.346.35
I have nothing named similarly to opengl/nvidia/lib/libGLcore.so.173.14.31, but I have a libGLESv1_CM_nvidia.so.375.26 for the second one.
 
Old 04-01-2017, 03:17 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
The way they are set out is:

Mesa libs have numbers like linGL*.so.1.2
Nvidia libs have the same number as the Nvidia package.

With the Nvidia drivers, the symlinks need to point to Nvidia libs, & likewise with Mesa
 
Old 04-01-2017, 08:46 AM   #6
msdobrescu
Member
 
Registered: Feb 2006
Location: Romania
Distribution: Sabayon
Posts: 36

Original Poster
Rep: Reputation: 3
Well, what is obvious to you, it's hidden to me.

What should I do, actually?

Last edited by msdobrescu; 04-01-2017 at 12:07 PM.
 
Old 04-02-2017, 03:39 AM   #7
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
I prefix this by saying I am on my back in hospital and haven't installed a Nvidia driver in many years.


Reinstall that Nvidia drivers. Run the binary with a /reinstall or --reinstall. I'm looking at your ls -l output. Make sure it is 64bit.

libGL.so & libGL.so.1 is pointing to a Mesa lib. Not good with Nvidia drivers.In fact most. of the symlinks are pointing to Mesa libs.
Some in /usr/lib64 are pointing to ../lib, which is the lurking place of 32 bit libs and I am presuming 64 bit, although you haven't said. You may have installed a 32 but driver binary from Nvidia.


Use the file command to check 64 bit
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Missing libGL.so.1 after changing Graphiccard - Fehlenede libGL.so.1 Bibliothek Basti890 Ubuntu 8 03-12-2013 07:30 AM
libGL.so.1 gone mossen Linux - Software 1 12-05-2012 05:02 AM
libGL.la art3mis Linux - Software 5 12-22-2004 08:50 AM
libGL.so.1(LIBGL) for SuSE 9.1? darkmatter333 SUSE / openSUSE 1 12-17-2004 10:23 PM
LibGL.so.1 hacker 8991 Linux - Hardware 17 12-15-2003 11:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 11:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration