The forum

[SOLVED] Crash with "libGL error" despite necessary files being present

Author Replies
Redchrome Monday 14 November 2016 at 4:27
RedchromeAnonymous

Synopsis:
When launching games from PlayOnLinux they crash with a "libGL error" in spite of (as near as I can tell) all the necessary files being present. Can someone advise me where and how Wine (when run under PlayOnLinux) looks for its libGL files and DRI drivers?

Long description:
OS: Ubuntu 16.04
POL: v4.2.10, the one which came with Ubuntu 16.04
Graphics: nVidia proprietary driver v367, installed with Ubuntu packages
User: I have almost 20 years of Linux administration experience, including (once upon a time) building XFree86 out of the CVS tree to test Direct Rendering (DRI) updates (which was very new at the time). So while I'm a bit rusty on how DRI works these days and where the libraries go, I have some grasp of the principles behind it all. I have no meaningful experience with PlayOnLinux before this, and my grasp of WINE is poor and 15 years out of date.
Wine: 1.9.23 (also tested 1.9.22-staging as well as the stock versions 1.7.55 and 1.7.22)

I've tried installing both World of Tanks and World of Warships via PlayOnLinux, and I can get the installers to run to completion, but upon launch the program crashes. The relevant lines in the debug log seem to be:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

I've spent about a day searching for fixes to this.
At one point I tried reinstalling d3dx9:
POL->World of Warshiops->Configure->Install Components tab->d3dx9->Install
and did same for Internet Explorer 8.

This page:
https://www.codeweavers.com/support/wiki/Diag/MissingLibGL
says the driver is missing and suggests installing nvidia-XXX... but that's already installed.

This page:
http://wiki.playonlinux.com/index.php/Graphics_Card_Drivers
suggests installing nvidia-xxx, multiarch-support, and libgl1-mesa-glx:i386, but those are already installed.

swrast driver is present in both 32-bit and 64-bit versions:
$ locate swrast
/usr/lib/i386-linux-gnu/dri/kms_swrast_dri.so
/usr/lib/i386-linux-gnu/dri/swrast_dri.so
/usr/lib/x86_64-linux-gnu/dri/kms_swrast_dri.so
/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so

mesa-dri package is installed in both 32-bit and 64-bit versions:
ii  libgl1-mesa-dri:amd64                           11.2.0-1ubuntu2.2
ii  libgl1-mesa-dri:i386                            11.2.0-1ubuntu2.2

nVidia libGL.so* files are present in all archs:
$ find /usr -iname "*libGL.so*" -exec ls -l {} \;
-rw-r--r-- 1 root root 439972 Oct  3 22:59 /usr/lib32/nvidia-367/libGL.so.1.0.0
lrwxrwxrwx 1 root root 14 Oct 25 13:57 /usr/lib32/nvidia-367/libGL.so.1 -> libGL.so.1.0.0
lrwxrwxrwx 1 root root 10 Oct 25 13:57 /usr/lib32/nvidia-367/libGL.so -> libGL.so.1
-rw-r--r-- 1 root root 579760 Oct  3 23:26 /usr/lib/nvidia-367/libGL.so.1.0.0
lrwxrwxrwx 1 root root 14 Oct 25 13:57 /usr/lib/nvidia-367/libGL.so.1 -> libGL.so.1.0.0
lrwxrwxrwx 1 root root 10 Oct 25 13:57 /usr/lib/nvidia-367/libGL.so -> libGL.so.1
lrwxrwxrwx 1 root root 14 Aug 11 18:47 /usr/lib/i386-linux-gnu/mesa/libGL.so.1 -> libGL.so.1.2.0
-rw-r--r-- 1 root root 448200 Aug 11 18:47 /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0
lrwxrwxrwx 1 root root 14 Aug 11 18:49 /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 -> libGL.so.1.2.0
-rw-r--r-- 1 root root 459392 Aug 11 18:49 /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0

and yes, the ones in the i386 directory really are 32-bit:
$ file /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0
/usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=6fcd451d597a8244f55c5336aba468a54a7b76bd, stripped
as well as the nVidia libraries in lib32:
$ file /usr/lib32/nvidia-367/libGL.so.1.0.0
/usr/lib32/nvidia-367/libGL.so.1.0.0: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped

I removed nvidia-346 and nvidia-352 packages, then did:
dpkg-reconfigure -plow nvidia-367
and rebooted. Got no change in PlayOnLinux behavior, it still crashes with that error when launching the game. All files listed above are still present.


nVidia packages left installed ('dpkg -l|grep -i nvidia'):
ii  nvidia-367                                      367.57-0ubuntu0.16.04.1                           amd64        NVIDIA binary driver - version 367.57
ii  nvidia-opencl-icd-367                           367.57-0ubuntu0.16.04.1                           amd64        NVIDIA OpenCL ICD
ii  nvidia-prime                                    0.8.2                                             amd64        Tools to enable NVIDIA's Prime
ii  nvidia-settings                                 361.42-0ubuntu1                                   amd64        Tool for configuring the NVIDIA graphics driver

Removed all these. Reinstalled all these. Rebooted. No change.

I've seen a suggestion that I need some lib32*gl or lib32*dri packages installed. Those are not available according to "apt-cache search lib32|egrep 'gl|dri'", so they must have been replaced with something else in the current Ubuntu version.

When I launch POL from the command line, I see this in the output:
[Check_OpenGL] Warning: check_dd_x86 missing, test skipped
[Check_OpenGL] Warning: check_dd_amd64 missing, test skipped


Is this relevant? I'd take a wild guess that 'dd' might mean 'Direct Draw', the setting for which seems to be relevant to this problem.
When configuring World of Warships in PlayOnLinux, going to the Display tab, and changing the Direct Draw Renderer from 'opengl' to 'gdi' the game got a little farther before crashing. It crashed with 'windows' dialogs rather than leaving error messages in the PlayOnLinux log. So this makes me think I should be using OpenGL. (i.e. the game won't run under the Windows GDI, which most modern games won't).

DRI is working fine, Kerbal Space Program (which runs natively on Linux) works. However, that's 64-bit and native instead of 32-bit and running under Wine.

The next step might be to follow Wine with a debugger and try to figure out where it's looking for the DRI libraries. However, my grasp of debugging is pretty poor. (I'm an admin, not a programmer). Can someone advise me how Wine works when looking for DRI libraries?

Do I need to symlink the libGL.so files from under /usr/lib32 to /usr/i386-linux-gnu/ somewhere?

Is Wine looking at the Mesa drivers instead of the nVidia drivers somehow?

What debugging information should I provide?

Redchrome Monday 21 November 2016 at 3:32
RedchromeAnonymous

I solved this (or at least I have a working result).

Install the nVidia drivers from http://www.nvidia.com/object/unix.html rather than using the Ubuntu packaged drivers. (Much as it offends me to use non-package-managed system files). After installing them, World of Warships runs just fine. World of Tanks has a problem with the application 'flickering' (the screen goes black, then returns, and this happens about once a second).

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca-notice@playonlinux.com