Debian and NVIDIA issue

Using snap on Debian (stable, Stretch) and Nvidia 340xx legacy driver, any snap that include UI (anbox, hiri, etc.) does not work!
But glxgears works instead out-of-the-box, for instance.

E.g.:

~$ LIBGL_DEBUG=verbose hiri
libGL: screen 0 does not appear to be DRI2 capable
libGL: OpenDriver: trying /snap/hiri/19/usr/lib/x86_64-linux-gnu/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /snap/hiri/19/usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
libGL: Can’t open configuration file /.drirc: No such file or directory.
libGL: Can’t open configuration file /.drirc: No such file or directory.
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
function is no-op

What version of snapd do you have? You can find out with snap version. Please paste the output here. Thanks.

snap 2.27.6-2
snapd 2.27.6-2
series 16
debian 9
kernel 4.9.0-4-amd64

This reminds me that I need to get back to packaging 2.28 for debian but I don’t know if that will help this specific problem.

I just tried using the Ubuntu package-version (snapd_2.29.4.1+18.04_amd64.deb): still same problem.
So probably is a specific trouble with nvidia drivers or something else.

It’s quite interesting that it runs well (Hiri, let’s say) if running it directly from the path:
LIBGL_DEBUG=verbose LD_LIBRARY_PATH=$(pwd) ./hirimain

This solved issue for me on debian 10:

sudo snap refresh --beta core

I’m getting exactly the same error. I’ve tried “sudo snap refresh --beta core” but still getting the same problem. Any idea what might be causing this and how to fix it?

re-viving a 4y old topic for software that is constatly rolling forward is perhaps not the best way to get your issue fixed … better open a new one …

It was last replied to 8 days ago . . .

yes, i was talking to both of you :stuck_out_tongue:

if you encounter an issue it is helpful to open a fresh topic about it, attaching the output of

snap version

the exact error output you see when running into the issue while starting a snap from command line or an excerpt of your logs showing the errors when not doing so … if it is related to some desktop snap, some info about your graphics hardware would also be helpful.

randomly replying to old threads will not help and not tell us what the actual issue is you are seeing.