solus-project / linux-steam-integration

Helper for enabling better Steam integration on Linux
GNU Lesser General Public License v2.1
433 stars 19 forks source link

Snap version 0.6 fails to launch on Ubuntu 17.10 #35

Closed johningve closed 7 years ago

johningve commented 7 years ago

After downloading updates, it shows the message "glXChooseVisual failed" before I get to the login screen. The output on the command line is:

bash-4.3$ $SNAP/linux-steam-integration
[lsi:__init__] PATH = /snap/linux-steam-integration/x1/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
[lsi:__init__] PATH = /snap/linux-steam-integration/x1/bin:/snap/linux-steam-integration/x1/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
[lsi:__init__] XDG_CONFIG_DIRS = /etc/xdg:/etc/xdg/xdg-/usr/share/xsessions/plasma:/etc/xdg:/usr/share/kubuntu-default-settings/kf5-settings
[lsi:__init__] XDG_CONFIG_DIRS = /usr/share/xdg:/etc/xdg:/etc/xdg/xdg-/usr/share/xsessions/plasma:/etc/xdg:/usr/share/kubuntu-default-settings/kf5-settings
[lsi:__init__] XDG_CONFIG_DIRS = /snap/linux-steam-integration/x1/etc/xdg:/usr/share/xdg:/etc/xdg:/etc/xdg/xdg-/usr/share/xsessions/plasma:/etc/xdg:/usr/share/kubuntu-default-settings/kf5-settings
[lsi:__init__] XDG_CONFIG_DIRS = /snap/linux-steam-integration/x1/usr/xdg:/snap/linux-steam-integration/x1/etc/xdg:/usr/share/xdg:/etc/xdg:/etc/xdg/xdg-/usr/share/xsessions/plasma:/etc/xdg:/usr/share/kubuntu-default-settings/kf5-settings
[lsi:__init__] XDG_DATA_DIRS = /snap/linux-steam-integration/x1/usr/share:/usr/share//usr/share/xsessions/plasma:/home/john/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
[lsi:__init__] XDG_DATA_DIRS = /usr/share:/snap/linux-steam-integration/x1/usr/share:/usr/share//usr/share/xsessions/plasma:/home/john/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
[lsi:__init__] XDG_DATA_DIRS = /snap/linux-steam-integration/x1/usr/share:/usr/share:/snap/linux-steam-integration/x1/usr/share:/usr/share//usr/share/xsessions/plasma:/home/john/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
[lsi:__init__] XDG_DATA_DIRS = /home/john/snap/linux-steam-integration/x1:/snap/linux-steam-integration/x1/usr/share:/usr/share:/snap/linux-steam-integration/x1/usr/share:/usr/share//usr/share/xsessions/plasma:/home/john/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
[lsi:__init__] LD_AUDIT = /snap/linux-steam-integration/x1/usr/$LIB/liblsi-intercept.so
[lsi:__init__] LD_PRELOAD = /snap/linux-steam-integration/x1/usr/$LIB/liblsi-redirect.so
Running Steam on ubuntu 17.10 64-bit
STEAM_RUNTIME is disabled by the user
[lsi:__init__] loading libintercept for 'steam'
Installing breakpad exception handler for appid(steam)/version(1509425745)
[lsi:steam] Enforcing Mesa snapd driver links: /usr/lib32/libGL.so.1 -> /usr/lib32/glx-provider/default/libGL.so.1
[lsi:steam] Enforcing snapd DRI links: /usr/lib/glx-provider/default/tls/swrast_dri.so -> /usr/lib32/dri/swrast_dri.so
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Installing breakpad exception handler for appid(steam)/version(1509425745)
Installing breakpad exception handler for appid(steam)/version(1509425745)
[lsi:steam] blacklisted loading of vendor library: /home/john/snap/linux-steam-integration/x1/.local/share/Steam/ubuntu12_32/libSDL2-2.0.so.0
Installing breakpad exception handler for appid(steam)/version(1509425745)
[lsi:__init__] loading libintercept for 'steamwebhelper'
[lsi:steamwebhelper] blacklisted loading of vendor library: ./libSDL2-2.0.so.0
[lsi:steam] Enforcing snapd DRI links: /usr/lib/glx-provider/default/tls/swrast_dri.so -> /usr/lib32/dri/swrast_dri.so
[lsi:steamwebhelper] Enforcing hostfs snapd driver links: /usr/lib64/libGL.so.1 -> /var/lib/snapd/lib/gl/libGL.so.1
[lsi:steamwebhelper] Enforcing NVIDIA snapd driver links: ./tls/haswell/x86_64/libGLdispatch.so.0 -> /var/lib/snapd/lib/gl/libGLdispatch.so.0
[lsi:steamwebhelper] Enforcing NVIDIA snapd driver links: ./tls/haswell/x86_64/libnvidia-tls.so.387.22 -> /var/lib/snapd/lib/gl/libnvidia-tls.so.387.22
[lsi:steamwebhelper] Enforcing NVIDIA snapd driver links: ./tls/haswell/x86_64/libnvidia-glcore.so.387.22 -> /var/lib/snapd/lib/gl/libnvidia-glcore.so.387.22
[lsi:steamwebhelper] Enforcing NVIDIA snapd driver links: ./tls/haswell/x86_64/libEGL_nvidia.so.0 -> /var/lib/snapd/lib/gl/libEGL_nvidia.so.0
[lsi:steamwebhelper] Enforcing NVIDIA snapd driver links: ./tls/haswell/x86_64/libnvidia-glsi.so.387.22 -> /var/lib/snapd/lib/gl/libnvidia-glsi.so.387.22
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
glXChooseVisual failedMain.cpp (321) : Assertion Failed: Fatal Error: glXChooseVisual failed
Assert( Assertion Failed: Fatal Error: glXChooseVisual failed ):Main.cpp:321

Installing breakpad exception handler for appid(steam)/version(1509425745)
No minidump written, nothing to upload.
/home/john/snap/linux-steam-integration/x1/.local/share/Steam/ubuntu12_64/steamwebhelper.sh: line 5:  9975 Segmentation fault      (core dumped) ./steamwebhelper "$@"

I am using proprietary nvidia drivers version 387.22 and I had to update snapd from the "Snappy Edge" ppa. Hope this can help!

ikeydoherty commented 7 years ago

You need a patched snapd - my guess is you do not?

johningve commented 7 years ago

Ah, I guess that might be the problem. For the record, I have snapd 2.29.3.

ikeydoherty commented 7 years ago

Looking more at this we're gonna need to add support to snapd for 32-bit drivers on Ubuntu too. Our patches have the multilib portion at /var/lib/snapd/lib/gl/32 for biarch, we'll need to do the same thing for Ubuntu. This is why you're seeing the invalid mesa intercept as it hasn't got access to the 32-bit NVIDIA libGL right now.

I would assume this would launch and work without the proprietary drivers, but I mean, who wants to do that? Don't get me wrong, I'd still be hella interested to know if it does launch on open source drivers on Ubuntu!

ikeydoherty commented 7 years ago

Out of curiosity, on the proprietary drivers, just to make sure Solus can see the NVIDIA, please try:

snap run --shell linux-steam-integration

LD_AUDIT="$SNAP/usr/\$LIB/liblsi-intercept.so" glxgears

glxinfo is in there as well right now, just so we can check if you can use host-side 64-bit drivers

johningve commented 7 years ago
bash-4.3$ LD_AUDIT="$SNAP/usr/\$LIB/liblsi-intercept.so" glxgears
Segmentation fault (core dumped)
ikeydoherty commented 7 years ago

Oooo interesting.

OK, change to

LD_AUDIT="$SNAP/usr/\$LIB/liblsi-intercept.so" LSI_DEBUG=1 ldd /usr/bin/glxgears

johningve commented 7 years ago
bash-4.3$ LD_AUDIT="$SNAP/usr/\$LIB/liblsi-intercept.so" LSI_DEBUG=1 ldd /usr/bin/glxgears
[lsi:vendor_offender] Enforcing hostfs snapd driver links: /usr/lib64/libGL.so.1 -> /var/lib/snapd/lib/gl/libGL.so.1
[lsi:vendor_offender] Enforcing NVIDIA snapd driver links: /usr/lib/nvidia-387/tls/libnvidia-tls.so.387.22 -> /var/lib/snapd/lib/gl/libnvidia-tls.so.387.22
[lsi:vendor_offender] Enforcing NVIDIA snapd driver links: /usr/lib/nvidia-387/libnvidia-glcore.so.387.22 -> /var/lib/snapd/lib/gl/libnvidia-glcore.so.387.22
        linux-vdso.so.1 (0x00007ffc45bc7000)
        libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007f9bdadfc000)
        libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f9bdac9a000)
        libm.so.6 => /usr/lib64/haswell/libm.so.6 (0x00007f9bdab52000)
        libc.so.6 => /usr/lib64/haswell/libc.so.6 (0x00007f9bda96e000)
        libnvidia-tls.so.387.22 => /usr/lib/nvidia-387/tls/libnvidia-tls.so.387.22 (0x00007f9bda76b000)
        libnvidia-glcore.so.387.22 => /usr/lib/nvidia-387/libnvidia-glcore.so.387.22 (0x00007f9bd8843000)
        libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f9bd862d000)
        libdl.so.2 => /usr/lib64/haswell/libdl.so.2 (0x00007f9bd8626000)
        libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f9bd85fb000)
        /usr/lib64/ld-linux-x86-64.so.2 (0x00007f9bdb483000)
        libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f9bd83f7000)
ikeydoherty commented 7 years ago

OK thats nasty, /usr/lib64/libGL.so.1 shouldn't exist as far as LSI is concerned!

What is /usr/lib64/libGL.so.1, symlink or .. ?

Also whats the listing for /usr/lib/nvidia-387/ -Ra ?

ikeydoherty commented 7 years ago

FWIW I can see the biarch code is deeply confused about what should be where :D

johningve commented 7 years ago

I also tried installing it on my laptop (intel graphics) just now and I got The Binding of Isaac to run with no issues. screenshot_20171113_000203

EDIT: The laptop is also on Ubuntu 17.10

ikeydoherty commented 7 years ago

Oh cool! So at least open source graphics work :D Would be interesting to see if Vulkan works there

LD_AUDIT="$SNAP/usr/\$LIB/liblsi-intercept.so" vulkaninfo

johningve commented 7 years ago

this is what i get from vulkaninfo: https://pastebin.com/hCFQbbVh

johningve commented 7 years ago

also this

bash-4.3$ LD_AUDIT="$SNAP/usr/lib/liblsi-intercept.so" vulkaninfo > /dev/null
ERROR: ld.so: object '/snap/linux-steam-integration/x1/usr/lib/liblsi-intercept.so' cannot be loaded as audit interface: cannot open shared object file; ignored.
INTEL-MESA: warning: Haswell Vulkan support is incomplete
ikeydoherty commented 7 years ago

Awesome - so at least vulkan works!

So our TODO is initially to get LSI to understand how to deal with the 64-bit portion of NVIDIA drivers on multiarch systems. We'll also need to patch snapd to expose the 32-bit drivers and vulkan ICD on multiarch too in a consistent fashion.

ikeydoherty commented 7 years ago

Oh I meant /usr/\$LIB not /usr/lib sorry, but ya.

ikeydoherty commented 7 years ago

Ok so to debug this further I need:

ls -lRa /var/lib/snapd/lib/gl/
file /usr/lib64/lib{E,GL}*
johningve commented 7 years ago

From the Intel or Nvidia ?

ikeydoherty commented 7 years ago

NVIDIA sorry

johningve commented 7 years ago

ls -lRa /var/lib/snapd/lib/gl/

/var/lib/snapd/lib/gl/:
total 126276
drwxr-xr-x 6 root root    12288 Nov  1 20:38 .
drwxr-xr-x 3 root root     4096 Oct 17 22:39 ..
-rw-r--r-- 1 root root        0 Oct 31 13:41 alt_ld.so.conf
drwxr-xr-x 2 root root     4096 Nov  1 20:38 bin
-rw-r--r-- 1 root root       42 Oct 31 13:41 ld.so.conf
lrwxrwxrwx 1 root root       23 Oct 31 13:41 libEGL_nvidia.so.0 -> libEGL_nvidia.so.387.22
-rw-r--r-- 1 root root  1369400 Oct 26 09:26 libEGL_nvidia.so.387.22
lrwxrwxrwx 1 root root       16 Oct 31 13:41 libEGL.so -> libEGL.so.387.22
lrwxrwxrwx 1 root root       16 Oct 31 13:41 libEGL.so.1 -> libEGL.so.387.22
-rw-r--r-- 1 root root    23488 Oct 26 07:39 libEGL.so.387.22
-rw-r--r-- 1 root root   711864 Oct 26 07:39 libGLdispatch.so.0
lrwxrwxrwx 1 root root       29 Oct 31 13:41 libGLESv1_CM_nvidia.so.1 -> libGLESv1_CM_nvidia.so.387.22
-rw-r--r-- 1 root root    54840 Oct 26 09:26 libGLESv1_CM_nvidia.so.387.22
lrwxrwxrwx 1 root root       17 Oct 31 13:41 libGLESv1_CM.so -> libGLESv1_CM.so.1
-rw-r--r-- 1 root root    43696 Oct 26 07:39 libGLESv1_CM.so.1
lrwxrwxrwx 1 root root       26 Oct 31 13:41 libGLESv2_nvidia.so.2 -> libGLESv2_nvidia.so.387.22
-rw-r--r-- 1 root root    86296 Oct 26 09:26 libGLESv2_nvidia.so.387.22
lrwxrwxrwx 1 root root       14 Oct 31 13:41 libGLESv2.so -> libGLESv2.so.2
-rw-r--r-- 1 root root    60528 Oct 26 07:39 libGLESv2.so.2
lrwxrwxrwx 1 root root       10 Oct 31 13:41 libGL.so -> libGL.so.1
lrwxrwxrwx 1 root root       15 Oct 31 13:41 libGL.so.1 -> libGL.so.387.22
-rw-r--r-- 1 root root  1263952 Oct 26 07:40 libGL.so.387.22
lrwxrwxrwx 1 root root       23 Oct 31 13:41 libGLX_indirect.so.0 -> libGLX_nvidia.so.387.22
lrwxrwxrwx 1 root root       23 Oct 31 13:41 libGLX_nvidia.so.0 -> libGLX_nvidia.so.387.22
-rw-r--r-- 1 root root  1263952 Oct 26 07:40 libGLX_nvidia.so.387.22
lrwxrwxrwx 1 root root       11 Oct 31 13:41 libGLX.so -> libGLX.so.0
-rw-r--r-- 1 root root    64752 Oct 26 07:39 libGLX.so.0
lrwxrwxrwx 1 root root       15 Oct 31 13:41 libnvcuvid.so -> libnvcuvid.so.1
lrwxrwxrwx 1 root root       20 Oct 31 13:41 libnvcuvid.so.1 -> libnvcuvid.so.387.22
-rw-r--r-- 1 root root  2420912 Oct 26 09:09 libnvcuvid.so.387.22
lrwxrwxrwx 1 root root       18 Oct 31 13:41 libnvidia-cfg.so -> libnvidia-cfg.so.1
lrwxrwxrwx 1 root root       23 Oct 31 13:41 libnvidia-cfg.so.1 -> libnvidia-cfg.so.387.22
-rw-r--r-- 1 root root   166152 Oct 26 09:06 libnvidia-cfg.so.387.22
lrwxrwxrwx 1 root root       23 Oct 31 13:41 libnvidia-compiler.so -> libnvidia-compiler.so.1
lrwxrwxrwx 1 root root       28 Oct 31 13:41 libnvidia-compiler.so.1 -> libnvidia-compiler.so.387.22
-rw-r--r-- 1 root root 48546864 Oct 26 09:28 libnvidia-compiler.so.387.22
-rw-r--r-- 1 root root 28658624 Oct 26 09:26 libnvidia-eglcore.so.387.22
-rw-r--r-- 1 root root    31784 Oct 26 09:26 libnvidia-egl-wayland.so.1.0.2
lrwxrwxrwx 1 root root       21 Oct 31 13:41 libnvidia-encode.so -> libnvidia-encode.so.1
lrwxrwxrwx 1 root root       26 Oct 31 13:41 libnvidia-encode.so.1 -> libnvidia-encode.so.387.22
-rw-r--r-- 1 root root   168152 Oct 26 09:09 libnvidia-encode.so.387.22
-rw-r--r-- 1 root root   314952 Oct 26 08:00 libnvidia-fatbinaryloader.so.387.22
lrwxrwxrwx 1 root root       18 Oct 31 13:41 libnvidia-fbc.so -> libnvidia-fbc.so.1
lrwxrwxrwx 1 root root       23 Oct 31 13:41 libnvidia-fbc.so.1 -> libnvidia-fbc.so.387.22
-rw-r--r-- 1 root root   110696 Oct 26 07:46 libnvidia-fbc.so.387.22
-rw-r--r-- 1 root root 30470376 Oct 26 07:39 libnvidia-glcore.so.387.22
-rw-r--r-- 1 root root   514744 Oct 26 09:10 libnvidia-glsi.so.387.22
lrwxrwxrwx 1 root root       18 Oct 31 13:41 libnvidia-ifr.so -> libnvidia-ifr.so.1
lrwxrwxrwx 1 root root       23 Oct 31 13:41 libnvidia-ifr.so.1 -> libnvidia-ifr.so.387.22
-rw-r--r-- 1 root root   207880 Oct 26 09:27 libnvidia-ifr.so.387.22
lrwxrwxrwx 1 root root       17 Oct 31 13:41 libnvidia-ml.so -> libnvidia-ml.so.1
lrwxrwxrwx 1 root root       22 Oct 31 13:41 libnvidia-ml.so.1 -> libnvidia-ml.so.387.22
-rw-r--r-- 1 root root  1317024 Oct 26 09:07 libnvidia-ml.so.387.22
lrwxrwxrwx 1 root root       34 Nov  1 20:38 libnvidia-ptxjitcompiler.so.1 -> libnvidia-ptxjitcompiler.so.387.22
-rw-r--r-- 1 root root 10825448 Oct 26 08:07 libnvidia-ptxjitcompiler.so.387.22
-rw-r--r-- 1 root root    13080 Oct 26 07:45 libnvidia-tls.so.387.22
lrwxrwxrwx 1 root root       23 Nov  1 20:38 libnvidia-wfb.so.1 -> libnvidia-wfb.so.387.22
-rw-r--r-- 1 root root   295416 Dec 15  2012 libnvidia-wfb.so.387.22
lrwxrwxrwx 1 root root       14 Oct 31 13:41 libOpenGL.so -> libOpenGL.so.0
-rw-r--r-- 1 root root   211728 Oct 26 07:39 libOpenGL.so.0
drwxr-xr-x 2 root root     4096 Nov  1 20:38 tls
drwxr-xr-x 2 root root     4096 Nov  1 20:38 vdpau
drwxr-xr-x 2 root root     4096 Nov  1 20:38 xorg

/var/lib/snapd/lib/gl/bin:
total 1128
drwxr-xr-x 2 root root   4096 Nov  1 20:38 .
drwxr-xr-x 6 root root  12288 Nov  1 20:38 ..
-rwxr-xr-x 1 root root  26804 Oct 26 09:38 nvidia-bug-report.sh
-rwxr-xr-x 1 root root  68952 Oct 26 07:59 nvidia-cuda-mps-control
-rwxr-xr-x 1 root root  47832 Oct 26 07:59 nvidia-cuda-mps-server
-rwxr-xr-x 1 root root 225776 Oct 26 09:07 nvidia-debugdump
-rwxr-xr-x 1 root root  46608 Oct 26 07:46 nvidia-persistenced
-rwxr-xr-x 1 root root 520320 Oct 26 09:07 nvidia-smi
-rwxr-xr-x 1 root root 188000 Oct 26 09:06 nvidia-xconfig

/var/lib/snapd/lib/gl/tls:
total 32
drwxr-xr-x 2 root root  4096 Nov  1 20:38 .
drwxr-xr-x 6 root root 12288 Nov  1 20:38 ..
-rw-r--r-- 1 root root 14480 Oct 26 07:45 libnvidia-tls.so.387.22

/var/lib/snapd/lib/gl/vdpau:
total 888
drwxr-xr-x 2 root root   4096 Nov  1 20:38 .
drwxr-xr-x 6 root root  12288 Nov  1 20:38 ..
lrwxrwxrwx 1 root root     20 Oct 31 13:41 libvdpau_nvidia.so -> libvdpau_nvidia.so.1
lrwxrwxrwx 1 root root     25 Oct 31 13:41 libvdpau_nvidia.so.1 -> libvdpau_nvidia.so.387.22
-rw-r--r-- 1 root root 889536 Oct 26 07:45 libvdpau_nvidia.so.387.22

/var/lib/snapd/lib/gl/xorg:
total 21484
drwxr-xr-x 2 root root     4096 Nov  1 20:38 .
drwxr-xr-x 6 root root    12288 Nov  1 20:38 ..
lrwxrwxrwx 1 root root       16 Oct 31 13:41 libglx.so -> libglx.so.387.22
-rw-r--r-- 1 root root 14038792 Oct 26 07:45 libglx.so.387.22
-rw-r--r-- 1 root root  7941104 Oct 26 07:19 nvidia_drv.so

file /usr/lib64/lib{E,GL}*

/usr/lib64/libE*:             cannot open `/usr/lib64/libE*' (No such file or directory)
/usr/lib64/libGLEW.so.1.10:   symbolic link to libGLEW.so.1.10.0
/usr/lib64/libGLEW.so.1.10.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=37359b76c4634b918f3ea23c0818a4b07a9e3e8c, stripped
/usr/lib64/libGLEW.so.1.12:   symbolic link to libGLEW.so.1.12.0
/usr/lib64/libGLEW.so.1.12.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=efb96ddde89dcc71471b096393064313da98aaff, stripped
/usr/lib64/libGLEW.so.1.6:    symbolic link to libGLEW.so.1.6.0
/usr/lib64/libGLEW.so.1.6.0:  ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=c2e0875db64f871c30eae5123494536fcccb1419, stripped
/usr/lib64/libGLU.so.1:       symbolic link to libGLU.so.1.3.1
/usr/lib64/libGLU.so.1.3.1:   ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=d4623501a0c22d60bdd1a25bba854ae1e1085923, stripped
ikeydoherty commented 7 years ago

blink does /usr/lib64/libGL.so.1 actually exist?

johningve commented 7 years ago

I assume you wanted them to be run in the linux-steam-integration bash prompt?

ikeydoherty commented 7 years ago

right

johningve commented 7 years ago

/usr/lib64/libGL.so.1 does not exist.

From regular shell:

john@Ares ➜ ~ ldconfig -p |grep libGL.so
        libGL.so.1 (libc6,x86-64) => /usr/lib/nvidia-387/libGL.so.1
        libGL.so.1 (libc6) => /usr/lib32/nvidia-387/libGL.so.1
        libGL.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libGL.so
        libGL.so (libc6,x86-64) => /usr/lib/nvidia-387/libGL.so
        libGL.so (libc6) => /usr/lib32/nvidia-387/libGL.so
ikeydoherty commented 7 years ago

OK can you ldd the glxgears binary again without LD_AUDIT this time? I think LSI blew a gasket somewhere

johningve commented 7 years ago

Like this?

bash-4.3$ glxgears
glxgears: error while loading shared libraries: libGL.so.1: cannot open shared object file: No such file or directory
johningve commented 7 years ago

Not sure if it's relevant, but I also ran glxgears on the intel laptop, and it works when i use LD_AUDIT, but without it, I get the same error

ikeydoherty commented 7 years ago

no i need the ldd on it in the shell

ldd /usr/bin/glxgears

johningve commented 7 years ago
bash-4.3$ ldd /usr/bin/glxgears
        linux-vdso.so.1 (0x00007ffc863eb000)
        libGL.so.1 => not found
        libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f2ec4987000)
        libm.so.6 => /usr/lib64/haswell/libm.so.6 (0x00007f2ec483f000)
        libc.so.6 => /usr/lib64/haswell/libc.so.6 (0x00007f2ec465b000)
        libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f2ec4630000)
        libdl.so.2 => /usr/lib64/haswell/libdl.so.2 (0x00007f2ec4629000)
        /usr/lib64/ld-linux-x86-64.so.2 (0x00007f2ec4b21000)
        libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f2ec4425000)
ikeydoherty commented 7 years ago

This is my local for an LD_AUDIT:

bash-4.3$ LSI_DEBUG=1 LD_AUDIT="$SNAP/usr/\$LIB/liblsi-intercept.so" ldd /usr/bin/glxgears 
[lsi:vendor_offender] Enforcing hostfs snapd driver links: /usr/lib/libGL.so.1 -> /var/lib/snapd/lib/gl/libGL.so.1
[lsi:vendor_offender] Enforcing NVIDIA snapd driver links: /usr/lib/libnvidia-tls.so.384.98 -> /var/lib/snapd/lib/gl/libnvidia-tls.so.384.98
[lsi:vendor_offender] Enforcing NVIDIA snapd driver links: /usr/lib/libnvidia-glcore.so.384.98 -> /var/lib/snapd/lib/gl/libnvidia-glcore.so.384.98
    linux-vdso.so.1 (0x00007ffd3b565000)
    libGL.so.1 => /usr/lib/libGL.so.1 (0x00007efc86435000)
    libX11.so.6 => /usr/lib/libX11.so.6 (0x00007efc862d3000)
    libm.so.6 => /usr/lib/libm.so.6 (0x00007efc8617c000)
    libc.so.6 => /usr/lib/libc.so.6 (0x00007efc85f99000)
    libnvidia-tls.so.384.98 => /usr/lib/libnvidia-tls.so.384.98 (0x00007efc85d95000)
    libnvidia-glcore.so.384.98 => /usr/lib/libnvidia-glcore.so.384.98 (0x00007efc83ed9000)
    libXext.so.6 => /usr/lib/libXext.so.6 (0x00007efc83cc3000)
    libdl.so.2 => /usr/lib/libdl.so.2 (0x00007efc83cbc000)
    libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007efc83c91000)
    /usr/lib64/ld-linux-x86-64.so.2 (0x00007efc86ab3000)
    libXau.so.6 => /usr/lib/libXau.so.6 (0x00007efc83a8d000)
johningve commented 7 years ago
bash-4.3$ LSI_DEBUG=1 LD_AUDIT="$SNAP/usr/\$LIB/liblsi-intercept.so" ldd /usr/bin/glxgears
[lsi:vendor_offender] Enforcing hostfs snapd driver links: /usr/lib64/libGL.so.1 -> /var/lib/snapd/lib/gl/libGL.so.1
[lsi:vendor_offender] Enforcing NVIDIA snapd driver links: /usr/lib/nvidia-387/tls/libnvidia-tls.so.387.22 -> /var/lib/snapd/lib/gl/libnvidia-tls.so.387.22
[lsi:vendor_offender] Enforcing NVIDIA snapd driver links: /usr/lib/nvidia-387/libnvidia-glcore.so.387.22 -> /var/lib/snapd/lib/gl/libnvidia-glcore.so.387.22
        linux-vdso.so.1 (0x00007ffcca5fe000)
        libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007f9b15d26000)
        libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f9b15bc4000)
        libm.so.6 => /usr/lib64/haswell/libm.so.6 (0x00007f9b15a7c000)
        libc.so.6 => /usr/lib64/haswell/libc.so.6 (0x00007f9b15898000)
        libnvidia-tls.so.387.22 => /usr/lib/nvidia-387/tls/libnvidia-tls.so.387.22 (0x00007f9b15695000)
        libnvidia-glcore.so.387.22 => /usr/lib/nvidia-387/libnvidia-glcore.so.387.22 (0x00007f9b1376d000)
        libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f9b13557000)
        libdl.so.2 => /usr/lib64/haswell/libdl.so.2 (0x00007f9b13550000)
        libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f9b13525000)
        /usr/lib64/ld-linux-x86-64.so.2 (0x00007f9b163ad000)
        libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f9b13321000)
ikeydoherty commented 7 years ago

Ugly one here

LD_AUDIT="$SNAP/usr/\$LIB/liblsi-intercept.so" LSI_DEBUG=1 LD_LIBRARY_PATH="/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl/vdpau:/var/lib/snapd/lib/gl/xorg" LIBGL_DRIVERS_PATH="/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl/vdpau:/var/lib/snapd/lib/gl/xorg" LIBGL_DEBUG=verbose LD_DEBUG=libs glxgears
johningve commented 7 years ago

Now glxgears starts, shall I send all of the output?

ikeydoherty commented 7 years ago

Yes please pastebin!

johningve commented 7 years ago

https://pastebin.com/T094YHkM

johningve commented 7 years ago

the error on the end is because I closed it

ikeydoherty commented 7 years ago

LD_AUDIT="$SNAP/usr/\$LIB/liblsi-intercept.so" LSI_DEBUG=1 LD_LIBRARY_PATH="/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl/vdpau:/var/lib/snapd/lib/gl/xorg" LIBGL_DEBUG=verbose glxgears

Does this one work? testing if its actually LIBGL_DRIVERS_PATH

johningve commented 7 years ago

yup. works fine

johningve commented 7 years ago

Output if you need it:

bash-4.3$ LD_AUDIT="$SNAP/usr/\$LIB/liblsi-intercept.so" LSI_DEBUG=1 LD_LIBRARY_PATH="/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl/vdpau:/var/lib/snapd/lib/gl/xorg" LIBGL_DEBUG=verbose glxgears
[lsi:vendor_offender] Enforcing NVIDIA snapd driver links: /var/lib/snapd/lib/gl/tls/libnvidia-glcore.so.387.22 -> /var/lib/snapd/lib/gl/libnvidia-glcore.so.387.22
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
303 frames in 5.0 seconds = 60.483 FPS
ikeydoherty commented 7 years ago

And how about now:

LD_AUDIT="$SNAP/usr/\$LIB/liblsi-intercept.so" LSI_DEBUG=1 LD_LIBRARY_PATH="/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl/vdpau" LIBGL_DEBUG=verbose glxgears

johningve commented 7 years ago

yeah, still works

ikeydoherty commented 7 years ago

o_O

LD_AUDIT="$SNAP/usr/\$LIB/liblsi-intercept.so" LSI_DEBUG=1 LD_LIBRARY_PATH="/var/lib/snapd/lib/gl" LIBGL_DEBUG=verbose glxgears

johningve commented 7 years ago

still going strong! same output as before

ikeydoherty commented 7 years ago

Ah ok. And if you remove the LD_LIBRARY_PATH?

johningve commented 7 years ago
bash-4.3$ LD_AUDIT="$SNAP/usr/\$LIB/liblsi-intercept.so" LSI_DEBUG=1  LIBGL_DEBUG=verbose glxgears
[lsi:vendor_offender] Enforcing hostfs snapd driver links: /usr/lib64/libGL.so.1 -> /var/lib/snapd/lib/gl/libGL.so.1
[lsi:vendor_offender] Enforcing NVIDIA snapd driver links: /usr/lib/nvidia-387/tls/libnvidia-tls.so.387.22 -> /var/lib/snapd/lib/gl/libnvidia-tls.so.387.22
[lsi:vendor_offender] Enforcing NVIDIA snapd driver links: /usr/lib/nvidia-387/libnvidia-glcore.so.387.22 -> /var/lib/snapd/lib/gl/libnvidia-glcore.so.387.22
Segmentation fault (core dumped)
ikeydoherty commented 7 years ago

Aha! OK I think this is because your setup has the separate tls directory and Solus does not. OK not to worry, the shim does actually set up LD_LIBRARY_PATH and I'm making it more robust right now.

So - all we need now is 32-bit support!

johningve commented 7 years ago

And that requires the snapd patches?

ikeydoherty commented 7 years ago

It requires a new patch for snapd actually :)

ikeydoherty commented 7 years ago

Right now our patches are just the biarch side, this is the multiarch side. Basically I wanna get Ubuntu systems to have /var/lib/snapd/lib/gl/32 inside the solus image

johningve commented 7 years ago

Ok. Is there anything else you want me to check right now? If not, I think I'll go to bed :)

ikeydoherty commented 7 years ago

Nah go on you can go bed :D Thanks for all the assistance! I'll make sure to help get 32-bit nvidia support into snapd so you'll be able to play with this properly soon :)