Shared publicly  - 
 
An update on Bumblebee and Steam compatibility

Steam beta is available for more than 10 days already, but unfortunately Bumblebee graphics offloading is not easily usable with Steam games, and there is some confusion about current status, for example in the Reddit discussions. This lengthy and somewhat technical post is here to clear things up.

First, there was an issue that Steam UI would not load if started under primus. That issue was actually due to OpenGL API misuse in Steam, and was worked around in primus on the same day. After that, there were no Steam bugreports on the issue trackers. However, that actually was not enough, because games started from the Steam UI would still run on the integrated card. This problem was pointed out to primus developer just a day ago on IRC. Take note: bugs do not get developers' attention unless someone actually reports them.

This problem is due to Steam overwriting both LD_PRELOAD and LD_LIBRARY_PATH environment variables. VirtualGL uses the former, and primus the latter to perform OpenGL offloading. This issue was raised in private communications with Valve.

However, a really good use of hybrid graphics would involve running Steam UI off the integrated card, and only individual games off the discrete card. Today, people just edit game launch scripts to achieve that, but that is not exactly convenient (and the script will be overwritten when a game update arrives).

There is a feature request to Valve to allow prepending wrapper scripts when editing command-line arguments. When implemented, it will allow to add primusrun/optirun to games on a case-by-case basis, which is definitely better than the current situation.

There is also experimental software that aims to allow dynamic libGL switching based on user preference. It currently has a somewhat inefficient implementation based on FUSE and LD_LIBRARY_PATH ( = does not work with Steam) and a better implementation based on LD_AUDIT. However, as best laid schemes of mice and men go often awry, the LD_AUDIT implementation is unusable on most of the modern Linux distributions due to a bug in Glibc.

Given the above, at the moment libgl-switcheroo development is inactive, but I would like to take this opportunity to gauge public interest in such a feature. Please +1 the first two responses to the post to "vote".
71
8
Bubba Lichvar's profile photoJohan du Preez's profile photoNate Moore's profile photoBumblebee Project's profile photo
11 comments
 
I prefer explicit control, and implicit libGL switching is not for me. I prefer optirun/primusrun wrappers to unambiguously run applications on the discrete card.
 
Adding these optirun/primusrun wrappers is not convenient to me. I would rather prefer some kind of automatic card switching for OpenGL applications that would save me from adding "optirun" every time.
 
I think 'enabled by default, but disable able' would be best. Maybe you guys can get some bug reports filed with steam :) 
 
I think that we should be given a option;
When steam starts (or installs) and it detects Bumblebee, I should create a option in the menu that woud say;
"...start with integrated graphics"
And a option;
"...start with deticated graphics"

That way whe can choose what we want and it makes things easy... ;-) 
 
What about modifying bumblebee-ui to handle this decision for us?
Also where is this fix for not starting steam with bumblebee? I cant find it anywhere.Thanx
 
BB-UI doesn't handle it. I tried. The menu short cuts that Steam creates are all "steam" and so it just invokes the launcher, not the individual apps.
 
+Nate Moore Don't ask me why this happens, but when I install wine, then steam, then Portal 2, then Bumblebee and Bumblebee-UI, I do have a listing for Portal 2 in the "Uncatorgorized" section. If then download and install another game it will not have a listing tho. 
So it's possible that it does see all applications in the ~/.wine folder, but then doesn't update after. 
The game still doesn't run, but that's for other reasons that I'm still working on. 
 
This is a great project, wish to see primus integrated to it soon! Thank you guys!
 
+Bubba Lichvar : That is odd. In theory, the only executable listed should be the wine exec.
 
Im running steam beta under bumblebee and its a real pain to get the games running. There is constant tinkering to get results but it runs great when you get the games to run. Please add some kind of function to make it easier to launch games in steam with optimus setups. 
 
Hi +Johan du Preez What you should do is join the steam group called "Linux Nvidia Optimus Users" (http://steamcommunity.com/groups/LinuxOptimus) It has every thing you would need to know about running the 310 drivers, running Valve games, launching SS3, and how to launch all of the other games. Also if you have any questions about anything, like I have, people there tend to help.
Add a comment...