mmtrt / leagueoflegends

Unofficial league of legends snap repo
https://snapcraft.io/leagueoflegends
GNU Lesser General Public License v2.1
220 stars 27 forks source link

libGL error: failed to load driver: swrast #87

Closed Lavande-aspic closed 5 years ago

Lavande-aspic commented 5 years ago

I have installed league of legends via snap on debian 10 with an amd fx 8320 and (for testing purpose only) an nvidia gt 730.

I get the following error


libGL error: No matching fbConfigs or visuals found

libGL error: failed to load driver: swrast

X Error: GLXBadContext

Request Major code 151 (GLX)

Request Minor code 6 ()

Error Serial #242

Current Serial #241

From what I have read this means that this is an error caused because libGL cannot be found.

If I runLIBGL_DEBUG=verbose glxgears it doesnt show any errors. Same with glxdemo

My 32bit libGL.so.1 can be found @ /usr/lib/i385-linux-gnu, symlinked to /usr/lib

The 64bit version is under /usr/lib/x86_64-linux-gnu/.

I have reinstalled my nvidia drivers twice (purged everything in between), right now I'm running v418.74. Edit: I have upgraded my nvidia driver to 430.50 + installed nvidia-driver-libs-i386. Same result.

snapd 2.37.4-1+b1

mmtrt commented 5 years ago

can you print installed nvidia pkgs.

apt list --installed | grep nvidia

Lavande-aspic commented 5 years ago

apt list --installed | grep nvidia

glx-alternative-nvidia/stable,now 1.0.0 amd64 [installed,automatic] libegl-nvidia0/now 430.50-1 amd64 [installed,local] libegl-nvidia0/now 430.50-1 i386 [installed,local] libgl1-nvidia-glvnd-glx/now 430.50-1 amd64 [installed,local] libgl1-nvidia-glvnd-glx/now 430.50-1 i386 [installed,local] libgles-nvidia1/now 430.50-1 amd64 [installed,local] libgles-nvidia1/now 430.50-1 i386 [installed,local] libgles-nvidia2/now 430.50-1 amd64 [installed,local] libgles-nvidia2/now 430.50-1 i386 [installed,local] libglx-nvidia0/now 430.50-1 amd64 [installed,local] libglx-nvidia0/now 430.50-1 i386 [installed,local] libnvidia-cfg1/now 430.50-1 amd64 [installed,local] libnvidia-eglcore/now 430.50-1 amd64 [installed,local] libnvidia-eglcore/now 430.50-1 i386 [installed,local] libnvidia-glcore/now 430.50-1 amd64 [installed,local] libnvidia-glcore/now 430.50-1 i386 [installed,local] libnvidia-ml1/now 430.50-1 amd64 [installed,local] nvidia-alternative/now 430.50-1 amd64 [installed,local] nvidia-detect/stable,now 418.74-1 amd64 [installed] nvidia-driver-bin/now 430.50-1 amd64 [installed,local] nvidia-driver-libs-i386/now 430.50-1 i386 [installed,local] nvidia-driver-libs/now 430.50-1 amd64 [installed,local] nvidia-driver-libs/now 430.50-1 i386 [installed,local] nvidia-driver/now 430.50-1 amd64 [installed,local] nvidia-egl-common/stable,now 418.74-1 amd64 [installed,automatic] nvidia-egl-icd/now 430.50-1 amd64 [installed,local] nvidia-egl-icd/now 430.50-1 i386 [installed,local] nvidia-installer-cleanup/stable,now 20151021+9 amd64 [installed,automatic] nvidia-kernel-common/stable,now 20151021+9 amd64 [installed,automatic] nvidia-kernel-dkms/now 430.50-1 amd64 [installed,local] nvidia-kernel-support/now 430.50-1 amd64 [installed,local] nvidia-legacy-check/stable,now 418.74-1 amd64 [installed,automatic] nvidia-modprobe/stable,now 418.56-1 amd64 [installed,automatic] nvidia-persistenced/stable,now 418.56-1 amd64 [installed,automatic] nvidia-settings/now 430.50-1 amd64 [installed,local] nvidia-smi/now 430.50-1 amd64 [installed,local] nvidia-support/stable,now 20151021+9 amd64 [installed,automatic] nvidia-vdpau-driver/now 430.50-1 amd64 [installed,local] xserver-xorg-video-nvidia/now 430.50-1 amd64 [installed,local]

(removed 390xx packages)

mmtrt commented 5 years ago

looks like you have different versions of pkgs installed and make sure remove all nvidia pkgs before installing different version of nvidia drivers.

nvidia-detect/stable,now 418.74-1 amd64 [installed]
nvidia-legacy-check/stable,now 418.74-1 amd64 [installed,automatic]
nvidia-modprobe/stable,now 418.56-1 amd64 [installed,automatic]
nvidia-persistenced/stable,now 418.56-1 amd64 [installed,automatic]

And print this for me grep -r nvidia /usr/lib/i386-linux-gnu | awk '{print $3}'

Also try this game snap as well see if this work for you. snap install mari0

Lavande-aspic commented 5 years ago

All my nvidia drivers are on the same version now

glx-alternative-nvidia/stable,unstable,now 1.0.0 amd64 [installed,automatic] libegl-nvidia0/unstable,now 430.50-1 amd64 [installed,automatic] libegl-nvidia0/unstable,now 430.50-1 i386 [installed,automatic] libgl1-nvidia-glvnd-glx/unstable,now 430.50-1 amd64 [installed,automatic] libgl1-nvidia-glvnd-glx/unstable,now 430.50-1 i386 [installed,automatic] libgles-nvidia1/unstable,now 430.50-1 amd64 [installed,automatic] libgles-nvidia1/unstable,now 430.50-1 i386 [installed,automatic] libgles-nvidia2/unstable,now 430.50-1 amd64 [installed,automatic] libgles-nvidia2/unstable,now 430.50-1 i386 [installed,automatic] libglx-nvidia0/unstable,now 430.50-1 amd64 [installed,automatic] libglx-nvidia0/unstable,now 430.50-1 i386 [installed,automatic] libnvidia-cbl/unstable,now 430.50-1 amd64 [installed,automatic] libnvidia-cfg1/unstable,now 430.50-1 amd64 [installed,automatic] libnvidia-eglcore/unstable,now 430.50-1 amd64 [installed,automatic] libnvidia-eglcore/unstable,now 430.50-1 i386 [installed,automatic] libnvidia-fatbinaryloader/unstable,now 430.50-1 amd64 [installed,automatic] libnvidia-glcore/unstable,now 430.50-1 amd64 [installed,automatic] libnvidia-glcore/unstable,now 430.50-1 i386 [installed,automatic] libnvidia-glvkspirv/unstable,now 430.50-1 amd64 [installed,automatic] libnvidia-glvkspirv/unstable,now 430.50-1 i386 [installed,automatic] libnvidia-ml1/unstable,now 430.50-1 amd64 [installed,automatic] libnvidia-ptxjitcompiler1/unstable,now 430.50-1 amd64 [installed,automatic] libnvidia-rtcore/unstable,now 430.50-1 amd64 [installed,automatic] nvidia-alternative/unstable,now 430.50-1 amd64 [installed,automatic] nvidia-detect/unstable,now 430.50-1 amd64 [installed] nvidia-driver-bin/unstable,now 430.50-1 amd64 [installed,automatic] nvidia-driver-libs-i386/unstable,now 430.50-1 i386 [installed,automatic] nvidia-driver-libs/unstable,now 430.50-1 amd64 [installed,automatic] nvidia-driver-libs/unstable,now 430.50-1 i386 [installed,automatic] nvidia-driver/unstable,now 430.50-1 amd64 [installed] nvidia-egl-common/unstable,now 430.50-1 amd64 [installed] nvidia-egl-icd/unstable,now 430.50-1 amd64 [installed,automatic] nvidia-egl-icd/unstable,now 430.50-1 i386 [installed,automatic] nvidia-installer-cleanup/stable,unstable,now 20151021+9 amd64 [installed,automatic] nvidia-kernel-common/stable,unstable,now 20151021+9 amd64 [installed,automatic] nvidia-kernel-dkms/unstable,now 430.50-1 amd64 [installed,automatic] nvidia-kernel-support/unstable,now 430.50-1 amd64 [installed,automatic] nvidia-legacy-check/unstable,now 430.50-1 amd64 [installed] nvidia-modprobe/unstable,now 430.50-1 amd64 [installed] nvidia-persistenced/unstable,now 430.50-1 amd64 [installed] nvidia-settings/unstable,now 430.50-1 amd64 [installed,automatic] nvidia-support/stable,unstable,now 20151021+9 amd64 [installed,automatic] nvidia-vdpau-driver/unstable,now 430.50-1 amd64 [installed,automatic] nvidia-vulkan-common/unstable,now 430.50-1 amd64 [installed,automatic] nvidia-vulkan-icd/unstable,now 430.50-1 amd64 [installed,automatic] nvidia-vulkan-icd/unstable,now 430.50-1 i386 [installed,automatic] xserver-xorg-video-nvidia/unstable,now 430.50-1 amd64 [installed,automatic]

grep -r nvidia /usr/lib/i386-linux-gnu | awk '{print $3}'

/usr/lib/i386-linux-gnu/libva-x11.so.2.400.0 /usr/lib/i386-linux-gnu/libblkid.so.1.1.0 /usr/lib/i386-linux-gnu/libnvidia-glcore.so.430.50 /usr/lib/i386-linux-gnu/libgomp.so.1.0.0 /usr/lib/i386-linux-gnu/libvdpau.so.1.0.0 /usr/lib/i386-linux-gnu/libLLVM-7.so.1 /usr/lib/i386-linux-gnu/nvidia/current/libGLX_nvidia.so.430.50 /usr/lib/i386-linux-gnu/nvidia/current/libGLESv1_CM_nvidia.so.430.50 /usr/lib/i386-linux-gnu/nvidia/current/libGLESv2_nvidia.so.430.50 /usr/lib/i386-linux-gnu/nvidia/current/libEGL_nvidia.so.430.50 /usr/lib/i386-linux-gnu/libnvidia-eglcore.so.430.50 /usr/lib/i386-linux-gnu/libnvidia-glsi.so.430.50 /usr/lib/i386-linux-gnu/libnvidia-glvkspirv.so.430.50 /usr/lib/i386-linux-gnu/libnvidia-tls.so.430.50

snap run mari0

Error: Could not initialize SDL joystick subsystem (Could not initialize UDEV) stack traceback:

[C]: at 0x7fbeee46ac3b [C]: in function 'require'

[C]: in function 'xpcall'

[C]: in function 'xpcall'

mmtrt commented 5 years ago

These libs could be the issue because of path in nvidia/current which does not exists in my system and maybe symlink them to /usr/lib/i386-linux-gnu/ path though I'm not sure this could break your system.

/usr/lib/i386-linux-gnu/nvidia/current/libGLX_nvidia.so.430.50
/usr/lib/i386-linux-gnu/nvidia/current/libGLESv1_CM_nvidia.so.430.50
/usr/lib/i386-linux-gnu/nvidia/current/libGLESv2_nvidia.so.430.50
/usr/lib/i386-linux-gnu/nvidia/current/libEGL_nvidia.so.430.50

snap run mari0

Did it worked?

Lavande-aspic commented 5 years ago

Hmm, I softlinked those libs to /usr/lib/i386-linux-gnu but I still get the same error.

sudo ln -s /usr/lib/i386-linux-gnu/nvidia/current/libGLX_nvidia.so.430.50 /usr/lib/i386-linux-gnu/

sudo ln -s /usr/lib/i386-linux-gnu/nvidia/current/libGLESv1_CM_nvidia.so.430.50 /usr/lib/i386-linux-gnu/

sudo ln -s /usr/lib/i386-linux-gnu/nvidia/current/libGLESv2_nvidia.so.430.50 /usr/lib/i386-linux-gnu

sudo ln -s /usr/lib/i386-linux-gnu/nvidia/current/libEGL_nvidia.so.430.50 /usr/lib/i386-linux-gnu/

Oh sorry I forgot to specify that mari0 didnt start and that the error code was the following:

Error: Could not initialize SDL joystick subsystem (Could not initialize UDEV)
stack traceback:
[string "boot.lua"]:637: in function <[string "boot.lua"]:633>
[C]: at 0x7fbeee46ac3b
[C]: in function 'require'
[string "boot.lua"]:416: in function <[string "boot.lua"]:311>
[C]: in function 'xpcall'
[string "boot.lua"]:645: in function <[string "boot.lua"]:639>
[C]: in function 'xpcall'
Lavande-aspic commented 5 years ago

Wellp, I lost patience and switched to an amd GPU. Now it works perfectly. I'm going to sell my 970 to get an rx 580... Thanks for the assistance.

Augustin-FL commented 4 years ago

I got this issue as well and i found the solution.

Seems like the NVIDIA installer (NVIDIA-Linux-x86_64-[xxx].[xxx].run) simply install the 32 bit compatibility libs in the wrong folder.

sudo cp /usr/lib32/*nvidia* /usr/lib/i386-linux-gnu/ fixes the issue