Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
v1.1.0 brakes Steam on bumblebee on Manjaro #158
After updating libglvnd to v1.1.0 Steam on intel works, bumblebee alone works, but when trying to run
Installing again v.1.0 of libglvnd and lib32-libglvnd fixes the issue. Here are the topics:
Okay, I've found several things that are likely to cause problems with primusrun and Steam.
primusrun works by setting LD_LIBRARY_PATH so that it can intercept calls to libGL.so.1, and redirect GLX calls to a secondary X server. On Arch and Manjaro, it sets
But, Steam's startup scripts also muck with LD_LIBRARY_PATH. Steam will put a couple of its own directories first, then the default search directories, and then some more of its own directories.
To figure out the default search paths, it runs
Without the system paths, you end up with Steam's own copies of a bunch of libraries that would otherwise come from the distro. This is the cause of the mismatch in Primus with libstdc++.so.6 -- it gets Steam's copy, but Primus was built against the version that the rest of Arch uses.
If you avoid that so that Primus's library can at least load, Primus will try to load the normal system libGL.so.1. In this case, that's libglvnd. Libglvnd then tries to load libGLX_mesa.so.0 for the regular (visible) X server. But, libGLX_mesa.so.0 fails to load, because of a mismatch with Steam's libxcb-dri3.so. Libglvnd is left without a vendor library for that screen, which eventually leads to calling glXQueryExtensionsString and getting NULL. Primus doesn't check for a NULL and segfaults when it tries to dereference it.
Now, if you instead set
However, if you do that, then running Steam through primusrun still won't work, because Steam puts the original LD_LIBRARY_PATH value at the end, after all of the default system paths. You'll end up with the normal libGL.so.1 instead of Primus, and so primusrun doesn't do anything. That's arguably a bug in Steam.
On top of all of that, Manjaro's NVIDIA driver packages include additional copies of the libglvnd libraries. I haven't figured out yet if those are the ones from the .run installer, but if so, they could also lead to conflicts with the distro's normal libglvnd libraries.
The extra libglvnd libraries in the NVIDIA package might actually make a difference between libglvnd 1.0.0 and 1.1.0. But, I can't find any setup where one of the other problems wouldn't break it first.
I am happy that you looked at this so closely!
Manjaro has also steam-native package which I use since it bypasses many arch related runtime issues and I did have one before. I had to launch steam with a command that excludes one of the manjaro's libraries, but then it got broken after some update so instead of figuring out how to fix it (I wouldn't know where to start), I used steam-native package and all was good.
At the moment I keep previous libglvnd versions to make it work hassle-free as I want.
Since simple downgrade was screaming about dependency breakages, I went back to old libglvnd with this command:
Others also found this (temporal) solution as fixing the entire issue.
As you may have noticed in further responses, Manjaro modified its steam-manjaro package somehow after this and suggested not running Steam with bumblebee but instead use applications launch options for each game:
Also, when we come across those rare Steam system checks, our system will show as Linux with Intel GPU instead Nvidia one which messes Linux stats ;). This is, of course, a very small thing but we like to present Linux from a good perspective nonetheless :P.
Anyway, those are the reasons why I'm not particularly happy with the current state. I can't hold on to libglvnd 1.0.0-1 indefinitely.
I can provide you with some tests if you want to look into this, but you need to post me the commands as my terminal skills are basic. So I can do tests on libglvnd 1.0.0-1 (and its 32 version) and then upgrade it to new ones, do tests again and if needed, revert back to libglvnd 1.0.0-1 for the time being.
Unfortunately, Arch still doesn't have debug symbols, although it was promised a while ago :(. Not sure why the holdup.
Maybe some further steam or another package update will straight this issue? Some things resolve itself when waited long enough ;). Still, it's not always good to sit idle and then complain ;P.
The steam-native package does avoid all of the LD_LIBRARY_PATH problems I found. With those out of the way, I'm pretty sure I know what the problem is.
@michaldybczak -- Can you try running this and see if it avoids the crash?
Bingo! Using this command Steam starts with bumblebee correctly with updated libglvnd! :D
Now I can incorporate it into my launcher. This is a workaround I can live with :).
So now what? Just waiting for some further Steam or other updates that may fix it or is there any fix on libglvnd level? I guess that you must think about a bigger picture then just Manjaro so I'm not sure if there is anything to do?