Fedora 18 Steam install, with TF2 benchmarks
Yesterday I had one of the best OS install experiences in recent memory. You’ll never guess which distro… Fedora 18?! I know, I expected a lot of pain and awfulness after all the reviews I’d read. Maybe it was the fact that I used the LXDE spin, but for whatever reason it worked perfectly out-of-the box, and was quicker and easier than installing Windows 7 with Steam. The biggest surprise was that my game ran better in Fedora than in Windows!
Completely counter-intuitive, right? Well, I figured I had such good luck with it, that I’d share with you the fastest and easiest way yet to install Steam.
So, feel free to skip around if you’ve already got Fedora installed. But I’m going to cover it from the ground up this time, just because I was so pleased with the results.
Fedora 18 LXDE Spin install
1. Download the installer
Start by downloading the relatively small installer for Fedora 18 LXDE. This thing is great because it runs so fast on my 5 year old hand-me-down computer. Even if you have a newer computer, why waste your resources on a desktop GUI when you could be using them to play games? 😉
2. Boot up the livecd
This part requires some patience, as the livecd installer loads up from cdrom pretty slowly. When your desktop loads, you’ll see only one icon on it. Click it to start the installer.
3. Click through the keyboard & networking screens.
Choose a hostname for your machine and let it automatically figure out the rest.
4. Click ‘Storage’ to choose your disk.
Now, this part scared me because I’m used to the extra verbosity of RHEL’s anaconda installer. But don’t worry, it won’t use your whole disk, (despite making you click a giant picture of it and telling the installer, “yes, destroy this please”). You’ll be able to choose a partitioning scheme on the next page, as long as you click “customize” here.
5. Manual partition page: double-checking the installer’s work.
Here you can choose your own partitioning scheme, or have the installer generate one for you. This is useful for checking that the installer makes sane choices. On my desktop system, this screen was great at detecting other operating systems on the disk, and grouped my partitions by OS (like 3 partitions used for CentOS, 2 for Windows, etc.). It made partitioning very simple and straightforward.
Click “done”, then it’ll take you back to the installation summary. Click “begin installation” to install.
While it installs, click “Root password” to set a password. Then “finish configuration”. And then “quit” when it’s done.
You now have a working Fedora 18 LXDE install. The system should boot up in just a few seconds, letting you begin the next step… the Nvidia driver install!
Installing Nvidia drivers on Fedora 18
Before we begin the Steam install, we need to double-check that our video settings are optimal. For this install, I’m using an old Nvidia GeForce 9600GT. Since this is a fresh install, you can see from the command output below that I’m using the inferior nouveau driver. This will have to be removed.
[[email protected] ~]$ lsmod |grep nouveau nouveau 891138 2
Download the latest Nvidia driver from their website, and attempt the install.
[[email protected] ~]# wget http://us.download.nvidia.com/XFree86/Linux-x86_64/319.49/NVIDIA-Linux-x86_64-319.49.run [[email protected] ~]# init 3 [[email protected] ~]# chmod 755 ./NVIDIA* [[email protected] ~]# ./NVIDIA-Linux-x86_64-319.49.run ERROR: The Nouveau kernel driver is currently in use by your system.
This error is fine for now. Let it create the modprobe conf file we need (saves some typing). Just for reference, this is the file it creates:
# generated by nvidia-installer blacklist nouveau options nouveau modeset=0
Append the following blacklist statement to your kernel boot line. It will keep nouveau from loading up on boot. (I’m using ‘vim’ here, but you can use any text editor).
sudo vim /etc/default/grub
GRUB_CMDLINE_LINUX="leave whatever defaults here rd.driver.blacklist=nouveau"
Then re-generate the grub2 menu using the new config.
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
For good measure, let’s back up our default xorg config dir before going any further, just in case.
sudo cp -r /etc/X11 /etc/X11.orig
Reboot using the new settings. On the next boot, noveau should be completely disabled.
Now that the system is rebooted, check that noveau is really gone. If it returns nothing, we’re good to go.
lsmod |grep nouveau
Grab the nvidia installer dependencies before proceeding, and ensure that you have kernel-devel installed for the current running kernel only.
[[email protected] ~]# yum install gcc kernel-devel-`uname -r` kernel-headers-`uname -r` # after the install completes, ensure all your kernel versions match! [[email protected] ~]# rpm -qa ^kernel* kernel-3.6.10-4.fc18.x86_64 kernel-devel-3.6.10-4.fc18.x86_64 kernel-modules-extra-3.6.10-4.fc18.x86_64 kernel-headers-3.6.10-4.fc18.x86_64
Now we can install the proprietary Nvidia driver in runlevel 3. This helps to ensure that all X-server applications are shut down. (Otherwise, those will interfere with the installer).
sudo su - init 3 ./NVIDIA-Linux-x86_64-319.49.run
Allow the installer to create any compatibility libraries it needs, and to generate a new Xorg config for you. Boot into runlevel 5 again after it finishes.
Your display should come up, giving you the increased video capabilities of the latest Nvidia driver. We’re now ready to install Steam!
Start by downloading Spot’s yum repo. This will work for Fedora 17, 18, and 19 now that he’s maintaining the packages again. (Thanks, Spot! :D)
sudo wget http://spot.fedorapeople.org/steam/steam.repo -O /etc/yum.repos.d/steam.repo
Install Steam and all dependencies. (Listed here for reference).
sudo yum install steam
And then it just starts up! Nothing more to it.
Steam is now running and ready to use! The first thing I did is start up Team Fortress 2. Check out the next section to see how it performed.
TF2 Performance “Benchmarking” in Fedora 18
Steam has some built-in tools that allow Source games to be “benchmarked” in a manner of speaking. Basically, you record a ‘demo’ of gameplay, and then Steam can play it back for you as fast as your video card will allow it. This lets us get a consistent view of how the exact same gameplay renders in both Windows and Linux.
While this is in no way a proper benchmark test, it’s the best way I could find to compare performance consistently across Windows and Linux. (If you know of a more accurate method, feel free to leave a comment).
1. First, download a configuration file that can be used on both Linux and Windows.
I’m using Chris’ TF2 configs, ‘maxframes’ and ‘dx9frames’ for my tests. These configs are well-known and respected among (Windows) TF2 players. You can find his whole repo here on github.
2. Next, move the config file into your TF2 directory.
(Replace ‘dak1n1’ with your own Steam userid, of course.)
cp maxframes .local/share/Steam/SteamApps/dak1n1/Team\ Fortress\ 2/tf/cfg/autoexec.cfg
Right-click TF2 and select “properties”.
Edit install options and insert settings found in the comments section of whichever config you’re using.
-dxlevel 81 -full -w WIDTH -h HEIGHT -console -novid -useforcedmparms -noforcemaccel -noforcemspd
4. Start up TF2, then remove -dxlevel from Launch Options.
Start up TF2 for the initial configuration to take effect. Then exit out of the game, and remove the ‘-dxlevel xx’ part of the Launch Options.
5. Copy the ‘demo’ benchmark to your TF2 directory.
Now, if I had any respect for myself as a gamer, I wouldn’t post this awful footage of me playing against bots. But luckily, I don’t! Feel free to download this demo and play it on your own system to test performance for yourself.
wget http://dak1n1.com/downloads/noobdemo.dem cp noobdemo.dem .local/share/Steam/SteamApps/dak1n1/Team\ Fortress\ 2/tf/
6. Start up TF2 for real.
Hit the ‘~’ button on your keyboard to bring up the console. Then type the following:
When it finishes, you’ll see output like this in your console, telling you how many frames per second your video card was able to process without dropping any. (This is different than actual gameplay, which lets you drop frames here and there in order to run more smoothly. But it will still demonstrate the in-game graphics capabilities of both systems.)
And that’s all there is to it! Repeat this as many times as you like, find an average, and do the same on Windows. Here’s what I found by running this 3 times on both Windows and Linux, using identical ‘maxframes’ and ‘dx9frames’ configs on each system.
I used the methods stated above, and ran ‘timedemo’ 10 times for each config, on each system. “Run 1” of each timedemo is tested after a fresh reboot, and both Windows and Linux are fresh installs. The systems are fully updated, running the latest Nvidia drivers (314.07 in Windows, and 310.32 in Linux).
I found that using a reasonable middle-ground between performance and appearance, Linux came out on top. However, if it’s raw speed you’re looking for, ugly or not, Windows is still the best bet for now.
Keep in mind that the Linux distro used here is completely unsupported by Steam. And you’re likely to get better results if you run it on the system it was built for (Ubuntu).
Here are my modest system specs used for running this:
CPU: Intel(R) Core2 Quad Q9550 @ 2.83GHz RAM: 8GB DDR2 @ 800Mhz Graphics: NVIDIA GeForce 9600 GT Disk: 1x 150GB 10k RPM 16MB Cache SATA
That’s all for now. Let me know how your system compares! Grab the demo file and give it a try.