My thoughts on Slackware, life and everything

Steam games in Slackware

steamValve is updating its Steam client for Linux regualarly, fixing the issues which are reported by lots of interested Linux gamers. I was a bit behind with updating my Slackware remix of the client binaries but I have overcome the flue and pushed an update, bringing the steamclient package for Slackware to the latest version, 1.0.0.22.

I did not have to change a lot to the “steam” script which is part of the original debian/ubuntu package. Basically I had to ensure that Steam and its games will be using ALSA instead of PulseAudio since we do not use PA in Slackware. I also added a ‘hack’ which causes the steam startup script to execute a file “${HOME}/.steam4slackware” if it exists. You can add extra definitions of environment variables into that file if you run into sound issues. The default definition of “export SDL_AUDIODRIVER=alsa” may not be enough for you, perhaps something like adding “export AUDIODEV=hw” is needed for your system. Using “${HOME}/.steam4slackware” allows you to leave the steam script unmodified.

Another script which is present in the debian package and which is called every time Steam starts, is “/usr/bin/steamdeps”. Originally this was a Python script which checks (using apt) if you have all required dependencies installed, and will attempt to download and install any missing packages… that was too unfriendly to my liking, so I changed that script’s content to only display a message on standard output (which means you won’t even see that text if you start steam from the desktop menu). If anyone comes up with a decent Slackware alternative for “steamdeps” I”ll consider adopting it.

Gameplay

I have only played two of the available Linux games a lot so far. The Linux Steam client allows you to play the Linux Beta of Team Fortress 2 for free (and of course TF2 will remain free even after the beta) but I found that I am no longer so fond of fast-action, multi-player shooter games playing against hordes of unknown people. I like to team up with people I know… perhaps my age shows 😉

Luckily Valve published a new Beta game last week: their very first game Half-Life is now available as a native Linux game in Steam, and if you already own Half-Life (not the Source version, but the original game) in Steam  then you will get the Linux Beta of Half-Life added to your game inventory automatically! If you bought a CD of the game in the past (before Steam existed, like I did) then you can import its CD key into Steam and it will cost you nothing. Playing Half-Life brought back fond memories. I have been in Deathmatches with my son for hours this weekend (he is a Team Fortress 2 guy but was hooked  to HL and its interesting choice of weapons immediately).

Half-Life is of course an old game which every modern computer should play effortlessly. TF2 is built around the Source engine and is newer, but still my PC’s have no issues with it. I remember that Half-Life had measurable level load times, but on my current quad-core desktop, the load times are merely fractions of a second.

Sound works, in all games so far. I verified that I could use my microphone in Steam (View > Settings > Voice) by explicitly selecting the ALSA device instead of PulsAudio, but I have not yet tried in-game if the voice functionality actually works (I don’t like it when other people talk during a deathmatch, so I hesitate using voice myself).

Caveat: For some people (as seen on Google+), sound stops working when Steam updates itself (which can happen everytime you connect the client to the Steam platform) or even segfaults on startup. A hint from Valve’s developers on their bugtracker, indicates that you could try running “steam” as follows (must be done on a commandline):

STEAM_RUNTIME=0 steam

PulseAudio

One of the dependencies of this steamclient is the pulseaudio library. Installing that is no problem of course, but it had an undesired (at least for me) side-effect: I also have Skype for Linux on my desktop and KDE will autostart it when I logon. For some reason (probably because of the desktop autostart files “/etc/xdg/autostart/pulseaudio.desktop” and “/etc/xdg/autostart/pulseaudio-kde.desktop” which are installed by the pulseaudio package), Skype will see the pulseaudio sound system and grab that instead of using the ALSA drivers. There is no way around that except stopping Skype, killing the pulseaudio processes which have been started by Skype, and then starting Skype again. You can of course delete the above two files, but I found out that the following change to “/etc/pulse/default.pa” will also give Skype back its sound. This change tells PulseAudio to use ALSA for its output:

# Following two lines explicitly enabled to make PulseAudio use ALSA - Eric Hameleers
load-module module-alsa-sink device=dmix
load-module module-alsa-source device=dsnoop

# Commented-out because of two explicit load-module lines above - Eric Hameleers
#### Automatically load driver modules depending on the hardware available
#.ifexists module-udev-detect.so
#load-module module-udev-detect
#.else
#### Use the static hardware detection module (for systems that lack udev/hal support)
#load-module module-detect
#.endif
# End commented out - Eric Hameleers

If an application (like Skype) grabs the PulseAudio sound system, it will now be able to produce sound in your desktop.

Voice in Half-Life dedicated server games

half-life-logo I also saw on-screen messages about Half-Life not being able to use my microphone when I play Deathmatch on a HLDS – Half-Life Dedicated Server. The game tells me “Unable to initialize voice codec voice_miles. Voice disabled”. The miles codec is an old codec which is not very efficient, and Steam games switched to the speex codec which uses less bandwidth and apparently has better voice quality. The issue must be fixed on the server side

Add the following line to your “server.cfg” file:

sv_voicecodec voice_speex

Clients connecting to the server should now use the speex codec instead.

I setup a HLDS dedicated server on my Slackware LAN server / build box. That was not trivial at all, dammit! There’s lots of confusing information in Steam’s own knowledge base. Ten years ago I ran a half-life dedicated server on the Internet, but that was before the Steam era, and setting up a server was painless back then.

I have been playing Half-Life with my son on that server which is a lot of fun. I would like people to discover the joy of playing this old-skool game against their friends. So in one of my next blogs I will document how I have setup that server, so that you can repeat it.

Perhaps we will see a “Slackware” server appearing in the game tracker sometime!

Cheers, Eric

 

7 Comments

  1. Ellendhel

    I’m glad you’re feeling better! Thanks for all new packages (VLC, LibreOffice and so on) and for the feedback about Steam.

    I don’t know if this will works with the Linux Client, but if you want to play a “new version” of Half-Life, take a look on Black Mesa (http://www.blackmesasource.com/). It only requires the Source SDK, avaiable for free in Steam.

  2. byteframe

    On slackware64, I found I didnt have to install pulseaudio, but only the multilib pack. The same goes for the other dependencies. So in all, I installed 8 multilib packs (flac,libogg,libvorbis,oxygen-gtk2, and pulseaudio,json-c.OpenAL, and speex) and the steam client starts fine. I have sound in tf2 and voice in tf2 and steam. I don’t know if 32 bit users adverse to pulseaudio could do something similar.

    Join a/the Slackware Steam Group!: http://steamcommunity.com/groups/slackware

  3. Wild Wizard

    How did I miss the Steam group before? Anyway joined now.

    The info about Pulse auto starting will require some more investigation as this is also a problem for X3: Reunion and Osmos both of which do not use it and will have no sound if it’s running.

  4. natharran

    Thaks for the steamclient package, Eric, you saved a lot of us much time and nerves 🙂

  5. Anže

    Thanks for the package!

  6. higuita

    Hi
    thanks for the steam client. I recommend you add the gksu to the steam dependencies, as its required to start it:

    $ steam
    /home/higuita/Steam/steam.sh: line 132: gksudo: command not found
    Installing breakpad exception handler for appid(steam)/version(1353457964_client)
    Installing breakpad exception handler for appid(steam)/version(1.0)
    unlinked 0 orphaned pipes
    Main.cpp (1799) : Assertion Failed: !”Fatal Error: VGUI_Setup failed”
    Assert( Assertion Failed: !”Fatal Error: VGUI_Setup failed” ):/home/buildbot/buildslave_steam/steam_rel_client_ubuntu12_linux/build/src/steamui/Main.cpp:1799

  7. higuita

    humm… /home/higuita/Steam ?! oops, i forgot to remove my previous attempt to install steam locally… Sorry about the noise, steam«client is working now! 🙂
    Thanks Eric

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2024 Alien Pastures

Theme by Anders NorenUp ↑