Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Under Kubuntu 14.04 Trusty, my graphic card is a nvidia gtx geforce 760. I am trying to play with minecraft implemented with Python and Pyglet

When trying to lauch the game (python main.py), I have the following error:

$ LIBGL_DEBUG=verbose python main.py 
libGL: screen 0 does not appear to be DRI3 capable
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
libGL: driver does not expose __driDriverGetExtensions_swrast(): /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so: undefined symbol: __driDriverGetExtensions_swrast
libGL: Can't open configuration file /home/oliver/.drirc: No such file or directory.
libGL: Can't open configuration file /home/oliver/.drirc: No such file or directory.
libGL error: failed to load driver: swrast

I am searching for one week the reason and a solution to this problem, if I found a lot of related posts I did not find the solution. Below is some informations and what I tried:

$ glxinfo | grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
OpenGL core profile version string: 4.3.0 NVIDIA 331.38
OpenGL core profile shading language version string: 4.30 NVIDIA via Cg compiler
OpenGL version string: 4.4.0 NVIDIA 331.38
OpenGL shading language version string: 4.40 NVIDIA via Cg compiler

There is indeed no /usr/lib/x86_64-linux-gnu/dri/tls/swrast_dri.so, but the other one is there:

$ l /usr/lib/x86_64-linux-gnu/dri/tls/swrast_dri.so
ls: impossible d'accéder à /usr/lib/x86_64-linux-gnu/dri/tls/swrast_dri.so: Aucun fichier ou dossier de ce type
$ l /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so 
/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so

I list the dependencies of swrast_dri.so:

$ ldd /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
        linux-vdso.so.1 =>  (0x00007fff4b070000)
        libgallium.so.0 => /usr/lib/x86_64-linux-gnu/libgallium.so.0 (0x00007f9b5c875000)
        libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f9b5c64b000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9b5c42c000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9b5c228000)
        libLLVM-3.4.so.1 => /usr/lib/x86_64-linux-gnu/libLLVM-3.4.so.1 (0x00007f9b5a887000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f9b5a582000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9b5a27c000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9b59eb6000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f9b59c9f000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f9b5d3c5000)
        libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f9b59a97000)
        libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f9b5986e000)

all the lib mentionned above seem ok.

I look at the symbols of swrast_dri.so:

$ readelf -Ws /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so 

There are no trace of a __driDriverGetExtensions_swrast

concerning dri I checked my packages:

$ ls -latr /var/lib/dpkg/info/*.list | grep dri | grep -v printer
-rw-r--r-- 1 root root     276 Apr 24 17:42 /var/lib/dpkg/info/libxcb-dri2-0:amd64.list
-rw-r--r-- 1 root root     276 Apr 24 17:44 /var/lib/dpkg/info/libxcb-dri3-0:amd64.list
-rw-r--r-- 1 root root     270 Mai  1 11:19 /var/lib/dpkg/info/libxcb-dri2-0:i386.list
-rw-r--r-- 1 root root     270 Mai  1 11:19 /var/lib/dpkg/info/libxcb-dri3-0:i386.list
-rw-r--r-- 1 root root    1388 Jun 20 16:40 /var/lib/dpkg/info/libgl1-mesa-dri:amd64.list
-rw-r--r-- 1 root root    1344 Jun 20 16:40 /var/lib/dpkg/info/libgl1-mesa-dri:i386.list
-rw-r--r-- 1 root root     420 Jun 20 16:40 /var/lib/dpkg/info/libegl1-mesa-drivers:amd64.list
-rw-r--r-- 1 root root    2525 Jun 20 16:41 /var/lib/dpkg/info/ubuntu-drivers-common.list
-rw-r--r-- 1 root root     494 Jun 20 16:43 /var/lib/dpkg/info/cups-filters-core-drivers.list
-rw-r--r-- 1 root root     600 Jun 20 16:45 /var/lib/dpkg/info/kubuntu-driver-manager.list
-rw-r--r-- 1 root root     411 Jul 10 07:50 /var/lib/dpkg/info/libxcb-dri3-dev:amd64.list
-rw-r--r-- 1 root root     417 Jul 10 07:50 /var/lib/dpkg/info/libxcb-dri2-0-dev:amd64.list
-rw-r--r-- 1 root root     407 Jul 10 07:50 /var/lib/dpkg/info/x11proto-dri2-dev.list
-rw-r--r-- 1 root root     299 Jul 29 08:59 /var/lib/dpkg/info/cups-core-drivers.list
-rw-r--r-- 1 root root     737 Jul 29 09:01 /var/lib/dpkg/info/libreoffice-base-drivers.list
-rw-r--r-- 1 root root    1377 Aug  7 12:03 /var/lib/dpkg/info/libgl1-mesa-dri-dbg:amd64.list
-rw-r--r-- 1 root root     183 Aug  7 12:03 /var/lib/dpkg/info/libgl1-mesa-dri-lts-trusty:amd64.list
-rw-r--r-- 1 root root     195 Aug  7 12:03 /var/lib/dpkg/info/libgl1-mesa-dri-lts-trusty-dbg:amd64.list

concerning mesa:

$ ls -latr /var/lib/dpkg/info/*.list | grep mesa
-rw-r--r-- 1 root root     353 Apr 24 17:38 /var/lib/dpkg/info/libglu1-mesa:amd64.list
-rw-r--r-- 1 root root    1388 Jun 20 16:40 /var/lib/dpkg/info/libgl1-mesa-dri:amd64.list
-rw-r--r-- 1 root root    1344 Jun 20 16:40 /var/lib/dpkg/info/libgl1-mesa-dri:i386.list
-rw-r--r-- 1 root root     635 Jun 20 16:40 /var/lib/dpkg/info/libgl1-mesa-glx:i386.list
-rw-r--r-- 1 root root     649 Jun 20 16:40 /var/lib/dpkg/info/libgl1-mesa-glx:amd64.list
-rw-r--r-- 1 root root     533 Jun 20 16:40 /var/lib/dpkg/info/libgles2-mesa:amd64.list
-rw-r--r-- 1 root root     441 Jun 20 16:40 /var/lib/dpkg/info/libwayland-egl1-mesa:amd64.list
-rw-r--r-- 1 root root     420 Jun 20 16:40 /var/lib/dpkg/info/libegl1-mesa-drivers:amd64.list
-rw-r--r-- 1 root root     478 Jun 20 16:40 /var/lib/dpkg/info/libglapi-mesa:amd64.list
-rw-r--r-- 1 root root     472 Jun 20 16:40 /var/lib/dpkg/info/libglapi-mesa:i386.list
-rw-r--r-- 1 root root     547 Jun 20 16:40 /var/lib/dpkg/info/libopenvg1-mesa:amd64.list
-rw-r--r-- 1 root root     566 Jun 20 16:40 /var/lib/dpkg/info/libegl1-mesa:amd64.list
-rw-r--r-- 1 root root    5766 Jul 10 07:50 /var/lib/dpkg/info/mesa-common-dev.list
-rw-r--r-- 1 root root     537 Jul 10 07:50 /var/lib/dpkg/info/libgl1-mesa-dev.list
-rw-r--r-- 1 root root     425 Jul 10 07:50 /var/lib/dpkg/info/libglu1-mesa-dev.list
-rw-r--r-- 1 root root     482 Jul 23 10:18 /var/lib/dpkg/info/libmirclientplatform-mesa:amd64.list
-rw-r--r-- 1 root root     799 Jul 23 10:18 /var/lib/dpkg/info/libegl1-mesa-dev.list
-rw-r--r-- 1 root root     754 Jul 23 10:18 /var/lib/dpkg/info/libgles2-mesa-dev.list
-rw-r--r-- 1 root root     482 Jul 29 09:47 /var/lib/dpkg/info/mesa-utils-extra.list
-rw-r--r-- 1 root root       0 Jul 29 09:49 /var/lib/dpkg/info/libglu1-mesa:i386.list
-rw-r--r-- 1 root root       0 Jul 29 09:50 /var/lib/dpkg/info/libosmesa6:amd64.list
-rw-r--r-- 1 root root       0 Jul 29 09:50 /var/lib/dpkg/info/libosmesa6:i386.list
-rw-r--r-- 1 root root     390 Aug  7 11:52 /var/lib/dpkg/info/mesa-utils.list
-rw-r--r-- 1 root root    1377 Aug  7 12:03 /var/lib/dpkg/info/libgl1-mesa-dri-dbg:amd64.list
-rw-r--r-- 1 root root     183 Aug  7 12:03 /var/lib/dpkg/info/libgl1-mesa-dri-lts-trusty:amd64.list
-rw-r--r-- 1 root root     195 Aug  7 12:03 /var/lib/dpkg/info/libgl1-mesa-dri-lts-trusty-dbg:amd64.list
-rw-r--r-- 1 root root     515 Aug  7 12:03 /var/lib/dpkg/info/libgl1-mesa-glx-dbg:amd64.list

I reinstalled my nvidia driver via the kubuntu driver manager, I have nom version 3331-38 from nvidia-33-updates but the problem remains

I found someone saying that one have to reinstall libdrm to solve this problem, but muon tells me that it is not possible to mark the libdrm packages to remove or update.

May be what follow can be interested:

$dpkg -l libgl1\* 
Souhait=inconnU/Installé/suppRimé/Purgé/H=à garder
| État=Non/Installé/fichier-Config/dépaqUeté/échec-conFig/H=semi-installé/W=attend-traitement-déclenchements
|/ Err?=(aucune)/besoin Réinstallation (État,Err: majuscule=mauvais)
||/ Nom                                                           Version                             Architecture                        Description
+++-========================================-========================-================-==============================================================
un  libgl1                                  <aucun>                 <aucune>         (aucune description n'est disponible)
ii  libgl1-mesa-dev                         10.1.3-0ubuntu0.1       amd64            free implementation of the OpenGL API -- GLX development files
ii  libgl1-mesa-dri:amd64                   10.1.3-0ubuntu0.1       amd64            free implementation of the OpenGL API -- DRI modules
ii  libgl1-mesa-dri:i386                    10.1.3-0ubuntu0.1       i386             free implementation of the OpenGL API -- DRI modules
ii  libgl1-mesa-dri-dbg:amd64               10.1.3-0ubuntu0.1       amd64            Debugging symbols for the Mesa DRI modules
un  libgl1-mesa-dri-dev                     <aucun>                 <aucune>         (aucune description n'est disponible)
un  libgl1-mesa-dri-experimental            <aucun>                 <aucune>         (aucune description n'est disponible)
un  libgl1-mesa-dri-experimental-dbg        <aucun>                 <aucune>         (aucune description n'est disponible)
ii  libgl1-mesa-dri-lts-trusty:amd64        3:6                     amd64            Transitional package for libgl1-mesa-dri
ii  libgl1-mesa-dri-lts-trusty-dbg:amd64    3:6                     amd64            Transitional package for libgl1-mesa-dri-dbg
ii  libgl1-mesa-glx:amd64                   10.1.3-0ubuntu0.1       amd64            free implementation of the OpenGL API -- GLX runtime
ii  libgl1-mesa-glx:i386                    10.1.3-0ubuntu0.1       i386             free implementation of the OpenGL API -- GLX runtime
ii  libgl1-mesa-glx-dbg:amd64               10.1.3-0ubuntu0.1       amd64            Debugging symbols for the Mesa GLX runtime
un  libgl1-mesa-glx-no-multiarch            <aucun>                 <aucune>         (aucune description n'est disponible)
un  libgl1-mesa-swx11                       <aucun>                 <aucune>         (aucune description n'est disponible)
un  libgl1-mesa-swx11-dev                   <aucun>                 <aucune>         (aucune description n'est disponible)
un  libgl1-nvidia-alternatives              <aucun>                 <aucune>         (aucune description n'est disponible)

Finally I tried to update my nvidia drivers with:

$ sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
$ sudo apt-get update
$ sudo apt-get install nvidia-current

Now I have:

$ glxinfo | grep version
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
OpenGL version string: 2.1.2 NVIDIA 331.38
OpenGL shading language version string: 1.20 NVIDIA via Cg compiler

Which seems to be a regression compared with the output of $ glxinfo | grep version given at the beginning of this post, isn't it?

shortly, I am maybe more interested on how to understand the problem and find the solution rather than a how-of-the-box solution.

all suggestions/explanations/... would be highly appreciate

share|improve this question

1 Answer 1

I found a solution: installing pyglet for 64-bits. My compiter ha a 64-bits arch so I just tried what it is said on https://github.com/fogleman/Minecraft:

pip install https://pyglet.googlecode.com/files/pyglet-1.2alpha1.tar.gz

Now I do not have an error anymore, Minecraft is displayed... but it is froozen, none entries are actives (mouse is disabled and the W, S, A, D does not work neither).. Naja, I wanted to have Minecraft to take a look on the code, I think it is time for me to dive into :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.