Half-Life 2 on Fedora 19: Missing texture and no sound

on Friday, 07 February 2014. Posted in Fedora

Every 12 to 24 month I have the sudden desire to play a video game and today was one of these days. As I am back on Linux with Windows only running in a virtual machine, I fired up Google to get me up to speed regarding gaming on Linux.

Of course, I stumbled across Steam for Linux and directly installed it because I thought this will be pain free - I still remember my days running SuSE back in 2002 trying to get Jagged Alliance 2 to run.

 	cd  /etc/yum.repos.d/
	wget http://spot.fedorapeople.org/steam/steam.repo
	yum install steam

After these three commands I fired up steam and directly purchased Half Life 2 for 8 € - I have learned in life to not spend much money on games because my gaming desire normally ceases after 2 hours. Downloading 2 GB and automatic installation of Half Life 2 being successful I was able to start the game. But directly in the main menu I noticed that everything was rendered without any textures. On a side note: I can just advise to start steam from a console so that you get all the Debug / Developer output for digging around.

I figured out that the hardware decompression of the textures did not work and that I needed S3TC with DRI drives which is provided by the package libtxc_dxtn.

 

	rpm -qa | grep libtxc
	yum install libtxc_dxtn.i686 libtxc_dxtn.x86_64 

 

Line one checks if the package has already been installed and the second line installs the 32- and 64-Bit version because I am not sure if Half Life / steam is 32- or 64 Bit .

Starting Half Life 2 again proofed my theory and I had polygons with textures.

When starting the actual game, I noticed the missing sounds & music. Back to digging in the logs, gave the following hints:

 

Warning: MP3 decoder has failed to start. Most likely SELinux is disabling JITing?
SDLAUDIO: SDL_InitSubSystem(SDL_INIT_AUDIO) failed: 
maxplayers set to 1

 

Okay, line 1 maybe a good hint. Before, re-configuring SELinux and crawling through SELinux logs, I deactivated SELinux completely for test purposes by changing the line in /etc/selinux/config from

     SELINUX=enforcing

to

     SELINUX=disabled

and after a reboot I could hear music in Half Life 2. As SELinux serves an important purpose, I activated it again and reboot because there is no way of stopping and starting the SELinux subsystem on the fly.

Digging into the SELinux logs, I figure out that Half Life 2 needs execheap which is prohibited by SELinux by default. Okay, I do not like the idea of allowing execheap but

setsebool -P allow_execheap 1

did the trick and music was running.

In the end, I have not yet played one minute of Half Life 2 so far but had some fun in making it fly :)

- Dennis