Wednesday, December 18, 2013

steam on gentoo

Since over one year now we have steam for linux and even though i have a really great working xen machine i played around with steam on linux. I was quite happy to got beta-access an so i've started to test from nearly the beginning of the beta-tests.

Steam:
In the beginning the client had some graphical glitches and minor issues but overall it was stable. After a year the client seems to be in a really good shape now. I hadn't any issues for a long time and since the open source drivers (r600g) also got huge improvements i played mainly on linux recently.


So far i've 53 games on steam which supports linux, that's about half of what i've own. I didn't test all of them but most of them work out of the box (with steamruntime - more on that later). Especially valve's linux support is excellent. Portal, Half-Life Series, Left 4 Dead 2 are perfectly playable with the open source drivers. Others like Serious Sam 3 or Painkiller do work too but they're not so enjoyable like valve's games.


Gentoo and Steam:
Gentoo's support for steam is rather bad actually. There is an open bug but not yet an ebuild in tree. However on gentoo's wiki is an nice article about steam. I made my own research about steam and found out that it's actually pretty simple to get it run.

Basically there are two possibilities how to run steam which are with or without "steamruntime". steamruntime is a switch which tells steam to use internal libraries or system libraries. However steamruntime not just comes with libraries which are needed for steam itself but also by many games. While most gentoo user's would immediately choose to use system libraries (myself too) there are really good reason not to do it for steam. I'll gonna explain them here in detail.


Steamruntime:
Steam is a 32bit program and thus you need either a x86 system or a amd64 multilib system. Many users (including me) are already on 64bit and thus would need a multilib system or emul packages. Steam with steamruntime would come with all it's dependencies (even on amd64) which means there are actually no other dependencies needed for steam.
But those so called "bundled libs" are usually bad because they are often old and outdated, vulnerable and shouldn't be used anymore. True! - so far. However:
  • steam's bundled libraries reside in ~, making them only available for steam itself (not for the whole system)
  • steam has many huge dependencies like cups, pulseaudio, networkmanager which you would need to install, even if you don't need them (steam works without a running pulseaudio, cups, networkmanager)
  • you need 32bit version's of those libraries/programs, which means you need emul packages, which means installing even more old, vulnerable software - but in this case to the whole system.
  • steamruntime not only installs steam's dependencies but also many game dependencies. So if a game doesn't work you have manually check which dependencies are missing.
  • valve only supports "steamruntime".
However, many will think now using system libraries would mean using the latest and greatest software, but that's not completely true. In fact, you would need many emul packages which are outdated by design. And with opengl emul package (not the multilibed version) you would even use outdated graphic drivers - and this makes, especially on games, a huge difference.
Please note this is mainly only true on amd64. Steam on x86 looks a bit different.


Conclusion:
What i think is the best solution so far is following:
Use steam with steamruntime and make sure using only the multilib version's of needed dependencies [eg. abi_x86_32]. Steam basically has only one dependencies which must be available on any system, which is mesa, or in our case 32bit mesa. (I didn't count 32bit glibc/gcc since they come with an multilib system anyway.) Anything else comes with steamruntime.
I highly recommend using the new multilib versions of mesa instead of the emul package since you won't get the latest drivers with them and you also would install other useless dependencies.

If you're using the steam-overlay it's pretty easy by setting the "steamruntime" use-flag (which should be set as default anyway). However you might need to mask other emul-packages since they are still the default on stable systems.

No comments:

Post a Comment