Steam on Debian x86_64 (part 3)

Back again with news from Steam and Valve! So it seems that Valve plan to support other distributions after all. Anyway there has already been a lot of job done by the community to get Steam running on Debian (in particular). I used the following script to install Steam on Debian x86_64 with Awesome WM, Intel i7 and 8Go RAM (funny I got this script from an article of someone who did this with a similar configuration here):

http://kanotix.com/files/fix/install-steam-wheezy.sh

You need to launch this as root to install all dependencies and then again with a regular user to fetch the last version of glibc from the Ubuntu repositories. You could also use the experimental glibc from Debian but believe me experimental versions are somewhat… well… experimental.

Once everything is installed you may start Steam directly with the steam command. It will update itself and start again. It will also probably ask to install the jockey-common package. It’s an user interface and desktop integration driver management tool. But I didn’t installed it since there is no such package in the Debian repositories and even if I could I wouldn’t and Steam seems to launch cleanly without this anyway (notwithstanding a complaining message at each start). If you are using a tiling window manager be sure to put either Steam or your tag in float since some components don’t like it so much.

I did a first try with Team Fortress 2 (which is now no more listed as a beta) with a GeForce GTX 560 Ti. The games files will be installed by default in your home directory (~/.local/share/Steam/SteamApps) but you may change that easily. Once installed you may start the game from the Steam interface and believe what… It works !

Team Fortress 2 (Single-Player) on Linux

So the game runs very smoothly. I didn’t check the FPS against the Windows version but beside that the game loads faster. The same applies for Steam as well, actually everything loads a lot faster thanks to Linux. The first difference I noticed in the interface from the Windows version are the fonts. Also if you don’t have any sound while playing you might check this environment variable:

export SDL_AUDIODRIVER=pulseaudio

There are fewer sounds options than on Windows, only “2 Speakers” was available. The mouse seemed (perhaps it’s just an impression) less sensitive too. Although I’m sure you can tune Linux for a better gameplay. You may also easily change tag while playing which allows you to do a lot of other things at the same time.¬†

Spy among us

The two previous screenshot were games with bots. After that I also checked a game on Internet. No problem here either but a lot more fun. Again the game did run smoothly with no glitch and a network latency around 30 ms.

Ka-Boom!
Steady… Steady…
Apart from Team Fortress 2 other games are also available with Steam on Linux. For example here is a screenshot from X3 Reunion. What about Albion Prelude and X-Rebirth on Linux too ?
X3-Reunion on Linux (again)

A newcomer in the Linux Steam catalog is the beta for Half-Life (the first one). Although still marked as a beta the game is playable too. With the particularity that it also works on an Intel GMA card. That’s it no nvidia proprietary driver anymore !

Prepare for unforeseen consequences
System crash back in ’98

What more is the clients for other classic modifications of Half-Life are available but not listed in Steam. Some of them are somewhat playable. Opposing Force for example lack some models but CS:CZ instead did run perfectly. Blue Shift, DoD, Ricochet and TFC did not work at all. You should start those games directly with the hl_linux command as they are not listed in Steam:

$STEAM_LOCATION/SteamApps/common/Half-Life/hl_linux -game $GAME

 

You have spotted a friend
Opposing Force
Speaking of Half-Life modification I’d love to see Sven Co-op ported to Linux too. This was one of the best multiplayer mod for Half-Life. It had something we don’t find anymore in multiplayer games nowadays, too squared, adjusted, balanced and polished. Instead this game was raw and we had raw fun playing it! However I’d still love to hear about Half-Life 2, Garry’s Mod and Black Mesa Source on Linux too. Finally here is a video of Half-Life Beta on Linux with an Intel GMA card.

Steam on Debian x86_64 (part 2)

It seems that Valve games are on bad terms with Intel cards on Linux (which I fully understand), all I got when I first launched TF2 on my Thinkpad was a full black screen. But that black screen was nevertheless promising so I repeated the expriment on another machine with a GeForce GTX 560 Ti.

Running Team Fortress 2 on Linux

I managed to launch the game manually but it lacks some authentification mechanisms so I wasn’t able to start any game for now. Launching the game directly through steam doesn’t work probably due to an error in the launcher script which I have to dig into when I’ll have time.

Team Fortress 2 (fullscreen)
I wonder if I’d buy L4D2 to give it a try native games on Linux are neato ! Something else that did really amaze me was the relatively high CPU usage from the Steam client when idle. I may not yet be used to this waste of ressources we see in many (often proprietary) clients nowadays  and this is why I avoid them (I should post about this someday).

CD Key authentification invalid for internet servers.

There’s one thing I’d like to investigate is it possible to work on a free implementation of the Steam chat protocol ? I didn’t look into this at all but a Pidgin plugin would be very cool. Talking about Steam something that scares me though is the idea that only one well known distribution would actually be supported, a stance that we increasingly tend see in the matter of porting prorietary software to Linux but again Ubuntu is not Linux, far from it (I should post about this someday too) ! 

Steam on Debian x86_64

The Steam Linux beta is out ! Good news !
However it seems like it didn’t work well on Debian and even less on Debian x86_64. But I finally managed to get it running with some little hacks.
Here a screenshot of what is going on a 64bits sid with an integrated intel graphic card.
I’m not enrolled for the closed beta though… Valve do you here me ?

Ext4 on root filesystem

Since a few days the last version of squeeze’s debian installer (which runs sid I think) is able to install on an ext4 filesystem. Which means that the ext4 filesystem could now easily be used as root filesystem.
When the installation is completed a problem might appear at the first boot. The kernel will simply panic complaining that he cannot mount the root filesystem. Actually the squeeze’s default kernel is currently 2.6.26 and this version does not fully support ext4.
The quick fix is to use the rescue part of the debian installer which will chroot you in your root partition and let you temporarily change your apt’s sources from squeeze to unstable so that you can install the last unstable kernel (>= 2.6.28) wich is ext4 capable.
If you try to install with the stable debian installer or any GNU/Linux distribution which is not ext4 capable here is a trick to use ext4 as your root filesystem.
First install your system with an ext3 filesystem and let /dev/sda1 be that partition. Then install grub2 and make sure it works perfectly. Then boot on a live system which is ext4 capable, backup all files so you can create an ext4 filesystem on /dev/sda1, put your backup back in it. Then change fstab in /dev/sda1 and replace ext3 with ext4 for the root filesystem. Check that grub.cfg in /dev/sda1 doesn’t use UUID to pass the root parameter to the kernel (actually they’ll change since you made a new filesystem) and use root=/dev/sda1 instead. Now reboot and your system should be running ext4 on the root filesystem.

About ext4

The ext4 is a journaled file-system, the successor to ext3. In summary the ext4fs greatly improve overall performance, efficiently reduce fragmentation and is fscked much more faster than his predecessor. Actually it has many features which follow :

  • Large file system with now 16TB files and up to 1EB volume size.
  • Extents which reduce fragmentation and improve large file performance.
  • Compatibility with ext2 and ext3.
  • Preallocation.
  • Delayed allocation which improve block allocation decisions.
  • Break 32 000 subdirectory limit with now 64 000 and improved performance using htree by default.
  • Journal checksumming which improve reliability.
  • Online defragmentation (didn’t try yet).
  • Multiblock allocator which reduce fragmentation.
  • More precise timestamp and fix the 2038 bug.

If you want to create an ext4 file-system first get the linux kernel (>= 2.6.28) which contains the first stable version of the filesystem. Then enable CONFIG_EXT4_FS as module or built-in. If you want to try the large files and volume feature add CONFIG_LBD actually I didn’t try it since the largest I’ve got here is about 2TB so in what follows I’ll assume you won’t enable this feature. Then install e2fsprogs (>= 1.41) and check in /etc/mke2fs.conf for a line looking like this :

ext4 = {
features = has_journal, extents, huge_file, flex_bg, uninit_bg, dir_nlink, extra_isize
inode_size = 256
}

Checks the features and inode size (should be at least 256) and remove the huge_file feature since we won’t use it. Now reboot on your new kernel, create the partition with fdisk or any other tools and let /dev/sdb2 be that partition. Just do as root :

# mkfs.ext4 -I 256 -m 0 -L HOME /dev/sdb2

This will create an ext4fs on /dev/sdb2 with 0% of reserved blocks for root labelled as HOME (always label your file-systems it makes it easier to manage your partitions) and enable every features found in /etc/mke2fs.conf on it. Give it a try and mount it on /mnt try putting some file on it :

# mount -t ext4 /dev/sdb2 /mnt

Now in order to transfer your files to the newly created file-system just do :

# mount -t ext4 /dev/sdb2 /mnt && cp -aRv /home/* /mnt/ && rm -rf /home/* && umount /mnt && mount -t ext4 /dev/sdb2 /home

Your home directories should now be mounted on the new ext4 file-system. Be sure you didn’t misstyped the last command since it will delete files on the old file-system. Then just add a line for it in /etc/fstab in order to mount it automatically on each boot :

/dev/sdb2 /home ext4 noatime 0 2

Now your home directory will be mounted automatically. Repeat that step for each partition and it’s done.

The ext4 file-system is not shown in the squeeze’s debian installer so there are three solutions to take advantages of ext4 on the current stable :

  1. Using an ext3 partition and then mount it as ext4 using backward compatibility. I don’t use it since I heard that some features won’t be enabled that way especially the extents feature won’t if the inode size of the ext3 file-system is not at least 256.
  2. Using multiple ext4 partitions on top of an ext3 root instead of a single partition. This is the simplest solution which I’m using on my laptop right now.
  3. Tweaking the debian installer to install the system on a manually created ext4 file-system. This is the most boring solution since if it fails somewhere you have to restart the installation process from the beginning.

I’ll just describe briefly the second solution here since I don’t like the first one neither do I remember every step of the third one. When installing debian create two partition one for /boot (~200MB) and another for the root, I mean “/” (~1GB) flagged for use as ext3 or reiserfs (actually I’m using reiserfs). Then install only the base-system. Rebuild a new kernel with ext4 enabled in it, create partitions for /var, /usr, /tmp, /home and transfer documents as described above. Now continue the installation using aptitude and that’s it.