canonical / steam-snap

Steam as a snap
72 stars 10 forks source link

nvidia32 fails with ImportError: libgirepository-1.0.so.1: cannot open shared object file: No such file or directory #379

Open smcv opened 4 months ago

smcv commented 4 months ago

Ensure there isn't an existing issue for this and check the wiki

Current Behavior

  File "/snap/steam/191/bin/nvidia32", line 3, in <module>
    import gi
...
ImportError: libgirepository-1.0.so.1: cannot open shared object file: No such file or directory

Expected Behavior

nvidia32 should launch successfully, and all of its dependencies should be provided.

Steps To Reproduce

  1. Install Ubuntu 24.04 on a system with an Nvidia GPU. Choose to install the proprietary driver.
  2. snap install steam
  3. /snap/bin/steam

Environment

Ubuntu 24.04, snapd 2.62.

gaming-graphics-core22 version

kisak-fresh (default)

Anything else?

No response

Sturmlocke86 commented 4 months ago

I'm having the same issue here on a freshly installed Ubuntu 24.04 rig with an RTX A2000 + driver version 535. Can't launch any games from Steam's Proton (tried V8 and EXP). Any idea how to fix this, any known workarounds?

ashuntu commented 4 months ago

I'm having the same issue here on a freshly installed Ubuntu 24.04 rig with an RTX A2000 + driver version 535. Can't launch any games from Steam's Proton (tried V8 and EXP). Any idea how to fix this, any known workarounds?

This should never be an issue that prevents you from launching Steam or playing games. It is only for the warning dialog regarding NVIDIA drivers. If you're experiencing issues with Steam, you're likely having another problem. Please look through the other issues or open a new issue if you find your situation unique.

ashuntu commented 4 months ago

In my experience, this is usually pretty flaky and depends largely on your environment (when you installed the snap, if it just refreshed, system updates, etc.). Usually this is "resolved" by either rebooting or running sudo /usr/lib/snapd/snap-discard-ns steam. Obviously, these are not real solutions, but they're workarounds for now since this isn't a critical part of the snap.

If the problem indeed persists through doing both of those things, then there is something larger going on that should be investigated.

Sturmlocke86 commented 4 months ago

In my experience, this is usually pretty flaky and depends largely on your environment (when you installed the snap, if it just refreshed, system updates, etc.). Usually this is "resolved" by either rebooting or running sudo /usr/lib/snapd/snap-discard-ns steam. Obviously, these are not real solutions, but they're workarounds for now since this isn't a critical part of the snap.

If the problem indeed persists through doing both of those things, then there is something larger going on that should be investigated.

Hey there Ash, thanks for taking the time. I believe you are right. I just switched between the Steam Snap channel (stable -> bleeding edge -> beta -> back to stable) and then I rebooted this machine. Lo and behold, it's working again, all of my games can be launched just fine now. Thank you!

smcv commented 4 months ago

In my experience, this is usually pretty flaky

In this sentence, did "this" refer to what @Sturmlocke86 reported, or to what I originally reported here?

smcv commented 4 months ago

Usually [something, maybe what I reported, maybe the more serious problem that @Sturmlocke86 reported, maybe both] is "resolved" by either rebooting or running sudo /usr/lib/snapd/snap-discard-ns steam. Obviously, these are not real solutions, but they're workarounds for now since this isn't a critical part of the snap.

If these workarounds are necessary to make the Snap Steam app reliably find libraries that are intended to be among its dependencies, then I think that's a symptom of something more serious, and if Canonical intends this app to be considered to be production-quality, then that unreliability should be addressed.

I'm aware that cache invalidation is one of the classic hard problems in computer science, but if Snap can't invalidate its cache at an appropriate time, then perhaps it shouldn't be caching those things from one run to the next at all?

The older LD_LIBRARY_PATH Steam Runtime and the newer pressure-vessel container framework both go to quite some lengths to make sure that Steam can reliably access all the libraries that ought to be present, either with automatic cache invalidation whenever the dependency libraries change or no caching between runs at all. This works quite reliably with no sandboxing or in the unofficial Flatpak app, and it seems like a shame for the Snap app to be undermining that.

I'm trying to invest the time to make the Snap app something that is tested regularly from the Steam Runtime side, but my test matrix is already inconveniently large, and if I'm expected to reboot every time I am about to try the Snap app, then that's going to make it too slow for me to be able to treat it as a useful acceptance criterion for new runtime releases.

ashuntu commented 4 months ago

Yes, we're aware of the problem, and a couple of the other issues in this repo are symptoms of it (notably, NVIDIA driver related ones). This is something we'd like to address soon but haven't put on our agenda just yet.

In this sentence, did "this" refer to what @Sturmlocke86 reported, or to what I originally reported here?

Referring to what you originally reported.

ZoopOTheGoop commented 1 month ago

should be fixed by #398, even on the current snapd revision