[Nix-dev] root OpenGL: 1.4/2.1.2; user OpenGL 4.4

Mateusz Kowalczyk fuuzetsu at fuuzetsu.co.uk
Wed May 28 21:17:52 CEST 2014


On 05/28/2014 09:09 PM, Mateusz Kowalczyk wrote:
> Hi,
> 
> I tried to run a graphical application as root for various dubious
> reasons just to find out that I have problems doing so. In fact:
> 
> [root at lenalee:/tmp]# glxinfo | grep 'OpenGL version'
> libGL error: failed to load driver: swrast
> libGL error: Try again with LIBGL_DEBUG=verbose for more details.
> OpenGL version string: 1.4 (2.1.2 NVIDIA 331.79)
> 
> [shana at lenalee:/tmp]$ glxinfo | grep 'OpenGL version'
> OpenGL version string: 4.4.0 NVIDIA 331.79
> 
> [root at lenalee:/tmp]# ldd `which PPSSPPQt` | grep libGL
>         libGL.so.1 =>
> /nix/store/cs95cfgbfkmjykbxx3h2wv1j8d22kdhj-mesa-noglu-10.1.4/lib/libGL.so.1
> (0xb67c8000)
> 
> [shana at lenalee:/tmp]$ ldd `which PPSSPPQt` | grep libGL
>         libGL.so.1 => /run/opengl-driver/lib/libGL.so.1 (0xb6755000)
> 
> Huh, what gives? Why isn't the root case also
> /run/opengl-driver/lib/libGL.so.1? Why aren't the versions the same? Why
> is the root version so crippled? How do I fix it? The program is the
> same derivation.
> 

As it usually happens, I make progress right after sending out an e-mail.

The difference seems that on my user, LD_LIBRARY_PATH is set to
/run/opengl-… while on root it is not set at all. I don't know why this
is however or where it is being set so I'd still love an answer to this
part.

-- 
Mateusz K.


More information about the nix-dev mailing list