Fixing “Steam refuses to start (without error message) under VirtualBox”

TL;DR:

  1. Disable 3D acceleration for the guest
  2. export CPU_MHZ=2000
  3. find ~/.steam/steam/ubuntu12_32/steam-runtime/ -iname '*libstdc++.so*' -execdir mv {} {}.bak \;

Since GOG has introduced GOG Connect, I decided I might as well try to turn some worse-than-worthless unredeemed Steam keys into actual GOG-owned games.

Now, given that I don’t trust the Steam client, that means quarantining it inside a VirtualBox VM that can see the public Internet, but not my LAN.

Unfortunately, whoever wrote it most definitely doesn’t code defensively (It’s like driving defensively. Assume Murphy’s Law and code accordingly.), because the /usr/bin/steam wrapper ignores common options like --help and -v and, in my VM, it exits without showing an error message and without actually starting up.

In order to track down what was going wrong, I had to rely on my skills as a developer:

  1. Run file "`which steam`" to verify that I’m dealing with a wrapper script
  2. Run bash -x "`which steam`" to get a readout of what’s actually being executed.
  3. Run bash -x /home/user/.local/share/Steam/steam.sh to see what’s happening in the actual wrapper.
  4. Finally see the “Unable to determine CPU Frequency. Try defining CPU_MHZ.” message.
  5. Run export CPU_MHZ=2000; steam and then wait for it to download its updates.
  6. Wait several minutes after it stops producing output while it appears to do nothing, then Ctrl+C out of it.
  7. Try previous steps again and discover an error message getting covered up by the outer wrapper.
  8. Search up results for said error and discover that none of the suggested commands reference paths used in this version of Steam.
  9. Manually craft a new version of them: find .steam/steam/ubuntu12_32/steam-runtime/ -iname '*libstdc++.so*' -execdir mv {} {}.bak \;
  10. Finally get a helpful error message, advising me to turn off VirtualBox’s 3D acceleration to make Steam work.
  11. Restart the VM with 3D acceleration disabled and try re-setting CPU_MHZ and re-running steam.

CC BY-SA 4.0 Fixing “Steam refuses to start (without error message) under VirtualBox” by Stephan Sokolow is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

This entry was posted in Geek Stuff. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution under the same terms as the associated post.       Also, please be aware that non-constructive comments will have their URL field erased before being approved in order to combat SEO spam.