LIBGL_DRIVERS_PATH wrong after deactivating and restarting computer

Bug #552903 reported by i30817
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
fglrx-installer (Ubuntu)
Fix Released
High
Alberto Milone

Bug Description

In amd64. When trying to install the proprietary ati drivers for the first time, jockey crashed (it is reported here somewhere). I rebooted and i could activate the driver in jockey then, However:
glxinfo failed with a problem with LIBGL_DRIVERS_PATH, probably related to the fact that:
1)
i30817@AIVAS:~$ echo $LIBGL_DRIVERS_PATH
/usr/lib/fglrx/dri:/usr/lib32/fglrx/dri
i30817@AIVAS:~$ ls /usr/lib/fglrx/dri/
fglrx_dri.so
i30817@AIVAS:~$ ls /usr/lib32/fglrx/dri/
fglrx_dri.so

there seem to be missing files.
I thought "whatever" and disabled the drivers, restarted and ... glxinfo had the same problem. The cause is obvious.
i30817@AIVAS:~$ echo $LIBGL_DRIVERS_PATH
/usr/lib/fglrx/dri:/usr/lib32/fglrx/dri

Revision history for this message
i30817 (i30817) wrote :

glxinfo reported problems

libGL: OpenDriver: trying /usr/lib/fglrx/dri/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib/fglrx/dri/r600_dri.so
libGL error: dlopen /usr/lib/fglrx/dri/r600_dri.so failed (/usr/lib/fglrx/dri/r600_dri.so: cannot open shared object file: No such file or directory)
libGL: OpenDriver: trying /usr/lib32/fglrx/dri/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib32/fglrx/dri/r600_dri.so
libGL error: dlopen /usr/lib32/fglrx/dri/r600_dri.so failed (/usr/lib32/fglrx/dri/r600_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL: OpenDriver: trying /usr/lib/fglrx/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/fglrx/dri/swrast_dri.so
libGL error: dlopen /usr/lib/fglrx/dri/swrast_dri.so failed (/usr/lib/fglrx/dri/swrast_dri.so: cannot open shared object file: No such file or directory)
libGL: OpenDriver: trying /usr/lib32/fglrx/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib32/fglrx/dri/swrast_dri.so
libGL error: dlopen /usr/lib32/fglrx/dri/swrast_dri.so failed (/usr/lib32/fglrx/dri/swrast_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: swrast_dri.so
libGL error: reverting to indirect rendering

Revision history for this message
i30817 (i30817) wrote :

"Solved" by sudo find . -name *fglrx*
and removing every single file given.

Gah. Binary drivers suck.

Revision history for this message
Alberto Milone (albertomilone) wrote :

"jockey crashed" doesn't really help me understand what went wrong.

My guess is that your xorg.conf wasn't set to "fglrx", therefore you kept using the open driver with the GL libraries from the proprietary driver.

In order to reproduce the problem in Jockey, please remove the "fglrx" package and try Jockey again, then (if Jockey fails) attach your /var/log/jockey.log

Revision history for this message
i30817 (i30817) wrote : Re: [Bug 552903] Re: LIBGL_DRIVERS_PATH wrong after deactivating and restarting computer

I reinstalled and it didn't crash now. However i have no xorg.conf. It seems
to be auto generated. I've now disabled the firegl drivers, updated and it
seems that the opensource drivers enabled the R700 path? Regardless i have
3d acceleration without the ati driver.

Revision history for this message
i30817 (i30817) wrote :

Started happening again after a update when i tried (stupidly) to enable and disable the fglrx drivers (but it didn't crash jockey now).

Regardless, the value of
paulo@AIVAS:~$ echo $LIBGL_DRIVERS_PATH
/usr/lib/fglrx/dri

Is persistent even if the fglrx and fglrx-modaliases are uninstalled, or even if i export the correct value. On the next reboot something sets it again. What is this something, have you any idea?

Revision history for this message
i30817 (i30817) wrote :

Ok found the problem.
Removing fglrx or deactivating it doesn't remove the file
/etc/X11/Xsession.d/10fglrx
That is run sometime after the /etc/environment (since i tried to put the correct values there, but was replaced by this)

That contains this code:
LIBGL_DRIVERS_PATH=/usr/lib/fglrx/dri
if [ `uname -m` = 'x86_64' ]; then
  if [ -d /usr/lib32/fglrx/dri ]; then
    LIBGL_DRIVERS_PATH=${LIBGL_DRIVERS_PATH}:/usr/lib32/fglrx/dri
    if [ ! -z $LD_LIBRARY_PATH ]; then
 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:
    fi
    LD_LIBRARY_PATH=${LD_LIBRARY_PATH}/usr/lib32
    export LD_LIBRARY_PATH
  fi
fi
export LIBGL_DRIVERS_PATH

Revision history for this message
i30817 (i30817) wrote :

Confirmed. Removing the fglrx dir from those paths sets the correct variable , and glxinfo reports that
"direct rendering: Yes".

Revision history for this message
i30817 (i30817) wrote :

Removing the file disables the acceleration again, since LIBGL_DRIVERS_PATH is now empty. I'm going to set in my environment instead.

Revision history for this message
Ian Corne (icorne) wrote :

What are the correct values?

I also have this problem.

Revision history for this message
Ian Corne (icorne) wrote :

I removed (moved to somewhere else) the file and now I do have direct rendering.

However:

$ export LIBGL_DEBUG=verbose
$ glxinfo | grep -i direct
libGL: OpenDriver: trying /usr/lib/dri/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib/dri/r600_dri.so
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/icorne/.drirc: No such file or directory.
direct rendering: Yes

I don't know what that is tho.

Revision history for this message
i30817 (i30817) wrote :

Depends if you're using 32 bits programs (requiring a package of 32libs) or not.

For me it is (for you it might not have the lib32 directory):
paulo@AIVAS:~$ echo $LIBGL_DRIVERS_PATH
/usr/lib/dri:/usr/lib32/dri

I have no idea about the other problems or how you can have rendering without this variable (i hadn't).

Revision history for this message
i30817 (i30817) wrote :

Opss that was a response to a private email.

Revision history for this message
i30817 (i30817) wrote :

Depends if you're using 32 bits programs (requiring a package of 32libs) or
not.

For me it is (for you it might not be if you don't have that directory):
paulo@AIVAS:~$ echo $LIBGL_DRIVERS_PATH
/usr/lib/dri:/usr/lib32/dri

Revision history for this message
Alberto Milone (albertomilone) wrote :

This is an issue in the packaging of the fglrx driver. It's not Jockey that causes this (at least directly).

affects: jockey (Ubuntu) → fglrx-installer (Ubuntu)
Changed in fglrx-installer (Ubuntu):
assignee: nobody → Alberto Milone (albertomilone)
importance: Undecided → High
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package fglrx-installer - 2:8.721-0ubuntu8

---------------
fglrx-installer (2:8.721-0ubuntu8) lucid; urgency=low

  * debian/rules, fglrx.dirs, fglrx.postinst:
    - Install the blacklist file in /lib/fglrx instead of
      /usr/lib/fglrx so that the file is available early
      in the boot process when /usr is on a different
      partition (LP: #538071).
    - Ignore errors when trying to update the initramfs
      with -k $CURRENT_KERNEL which is known to fail when
      using chroots (LP: #556653).
    - Make 10fglrx a slave link so that it's removed from
      /etc/X11/Xsession.d when we switch to a different
      alternative (LP: #552903).
  * debian/fglrx.preinst:
    - Make sure that any 10fglrx file in /etc/X11/Xsession.d
      which is not a symbolic link is removed.
    - Remove diversions previously added by xorg-driver-fglrx
      not by fglrx (LP: #552782). Thanks to Steve Langasek
      for spotting the problem.
 -- Alberto Milone <email address hidden> Thu, 08 Apr 2010 18:37:48 +0200

Changed in fglrx-installer (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Michael (mstrelan) wrote :

I have tried both changing the path in 10fglrx and removing that file but both results in the following output from glxinfo | grep rendering

Error: couldn't find RGB GLX visual or fbconfig

Any suggestions? I am on fglrx 2:8.723.1-0ubuntu2 and xorg-xserver-core 2:1.7.6-2ubuntu5

Revision history for this message
Michael (mstrelan) wrote :

Solved number 16 by doing this
sudo rm /usr/lib/libGL.so.1
sudo ln -s /usr/lib/fglrx/libGL.so.1.2 /usr/lib/libGL.so.1
http://ubuntu-virginia.ubuntuforums.org/showpost.php?p=9015235&postcount=103

Revision history for this message
Alberto Milone (albertomilone) wrote :

@Michael
/usr/lib/libGL.so.1 is not supposed to exist in Ubuntu Lucid (as the new alternatives system works in a different way). Having one will definitely cause problems.

Note: you should not create a new link as, if you installed the fglrx driver with Jockey, ldconfig will know where to find fglrx's libGL libraries.

Revision history for this message
Michael (mstrelan) wrote :

@Alberto Milone
Well it sounds to me like there is a problem with the upgrade path. Mine is not a clean install, I updated from Karmic, where I was using drivers from the ATI website. I completely uninstalled them and installed the drivers through jockey and this was the result I got.

If I remove the symlink I get "glxinfo: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory". So it seems ldconfig does not in fact know where to find the library.

How can I fix this? I don't really feel like reinstalling the drivers but maybe this is the best way to go?

Revision history for this message
Alberto Milone (albertomilone) wrote :

On 20 April 2010 11:18, Michael <email address hidden> wrote:
> @Alberto Milone
> Well it sounds to me like there is a problem with the upgrade path. Mine is not a clean install, I updated from Karmic, where I was using drivers from the ATI website. I completely uninstalled them and installed the drivers through jockey and this was the result I got.
>
> If I remove the symlink I get "glxinfo: error while loading shared
> libraries: libGL.so.1: cannot open shared object file: No such file or
> directory". So it seems ldconfig does not in fact know where to find the
> library.
>
> How can I fix this? I don't really feel like reinstalling the drivers
> but maybe this is the best way to go?
>
> --
> LIBGL_DRIVERS_PATH wrong after deactivating and restarting computer
> https://bugs.launchpad.net/bugs/552903
> You received this bug notification because you are a bug assignee.
>
Try the following commands:

sudo update-alternatives --config gl_conf

(and select the alternative provided by fglrx)

sudo ldconfig
sudo update-initramfs -u

Then attach the output of the following commands:

update-alternatives --display gl_conf
ldconfig -p | grep GL

If all goes well, a system restart will be required.

--
Alberto Milone
Sustaining Engineer (system)
Foundations Team
Canonical OEM Services

Revision history for this message
Michael (mstrelan) wrote :

Output of ldconfig -p | grep GL

 libQtOpenGL.so.4 (libc6) => /usr/lib/libQtOpenGL.so.4
 libGLU.so.1 (libc6) => /usr/lib/libGLU.so.1
 libGLEW.so.1.5 (libc6) => /usr/lib/libGLEW.so.1.5
 libGL.so.1 (libc6, OS ABI: Linux 2.4.20) => /usr/lib/libGL.so.1
 libGL.so.1 (libc6) => /usr/lib/fglrx/libGL.so.1
 libGL.so (libc6) => /usr/lib/fglrx/libGL.so

Restarting now

Revision history for this message
Michael (mstrelan) wrote :

glxinfo | grep rendering
Error: couldn't find RGB GLX visual or fbconfig

Revision history for this message
Michael (mstrelan) wrote :

Got it!

When I ran
sudo update-alternatives --config gl_conf

I was presented with fglrx auto or fglrx manual (or without fglrx at all). Choosing auto did not work. Manual worked fine

Thanks for the support

Revision history for this message
Alberto Milone (albertomilone) wrote :

On 21 April 2010 09:21, Michael <email address hidden> wrote:
> Got it!
>
> When I ran
> sudo update-alternatives --config gl_conf
>
> I was presented with fglrx auto or fglrx manual (or without fglrx at
> all). Choosing auto did not work. Manual worked fine
>
> Thanks for the support
>
> --
> LIBGL_DRIVERS_PATH wrong after deactivating and restarting computer
> https://bugs.launchpad.net/bugs/552903
> You received this bug notification because you are a bug assignee.
>

Good to know.

By the way, some old (mesa?) package must have left
/usr/lib/libGL.so.1 as in recent version of mesa in Lucid there's no
abi note tag ( i.e. OS ABI: Linux 2.4.20)

--
Alberto Milone
Sustaining Engineer (system)
Foundations Team
Canonical OEM Services

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.