OMG! I just pushed the wrong branch…

Today I’ve done a lot of rebasing with a series of patches that I needed to push to the master branch of some project. The patches originated from a branch named injector and I prepared the merge in another branch named injector-merge. When it came time to merge my branch back into master I should have written :

git merge injector-merge

But instead I wrote :

git merge injector

Damned auto completion ! Huh… That wouldn’t be so bad if only I hadn’t pushed that to upstream too… So I had to get rid of my master branch and replace it upstream as quickly as possible before anybody could clone or pull from it. By chance this is a fairly new project and I guess nobody cloned or pulled in such a short amount of time (this whole thing lasted no more than one minute or so). So I moved my master branch and replaced it with the injector-merge branch and pushed-force everything.

git checkout master
git branch -m oldmaster
git branch -m injector-merge master
git log

Hum… Everything seems to be in order! Now push it back!

git push -f origin master

No complaining so far? Right! Well from now on I will call the merge branches merge-* instead of *-merge.

Get rid of that Non-Breaking space

The non-breaking space is a variant of the space character which as the name suggests prevents automatic line breaking when using a space character. Another common use of it is to avoid collapsing of white-spaces in formats such as TeX or HTML. There are also some others specific typographic uses but nevermind.

From my point of view this character is a real pain, a annoying remain of a former era when the only editor you had was plain-text and which is now just good at invisibly polluting your work so that no compiler, interpreter or any other ASCII oriented tool would accept it anymore. For ASCII is not dead, it’s 7-bit, it’s common, it’s the neutral zone of all character set and No-Break Space shall not interfere therefore it must be eradicated from the very surface of earth or at least from my own keyboards.
There are several options to do that under Xorg. The first one would be to use the setxkbmap command to specify the nbsp:none option for your keyboard.
setxkbmap -option "nbsp:none"

However this won’t work as you might expect it especially when you have multiple keyboards with different layouts. So another solution would be to specify XkbOption directly within the Xorg configuration file, one for each input device. But this won’t work neither if you use a Bépo layout as this option will simply disable the use of underscore (AltGr Space). So the final solution is based on xmodmap to modify the list of keysyms assigned to the space keycode (0x41). You may just add the following line to ~/.xmodmap and ensure that the file is loaded when your session starts with xmodmap ~/.xmodmap.

keycode 65 = space space space space underscore underscore space space

Intel NIC connection problem

PCIe ASPM is an hardware power management protocol for PCI express devices. It allows a far better power management than what can be done with software power management at the price of an increased latency to the device. However some hardware don’t advertise it properly. And this was in fact the origin of the power regression case of 2.6.38 which was later fixed in 3.3.

It may also cause some Intel NIC (such as e1000e) to fall asleep unintentionally. So if you have an Intel NIC on Linux and it even fails to acquire an IPv4 address then you might try to add this option to your kernel command line : pcie_aspm=off. On Debian you can add this option to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub and issue an update-grub.

You may also want to change the link-state of one specific device to L0/L1 at runtime. For this I’ll point you there : http://wireless.kernel.org/en/users/Documentation/ASPM.

Raspberry Pi Ethernet speed

I’ve been a long time user of IPv6 tunnels from SixXS to provide an access to the IPv6 Internet behind my ISP. These tunnels also allow me to use static IP addresses for my home servers along with static AAAA records and this is cool !

Currently I use several Debian GNU/Linux based soft-routers with two (100 and 1000) Ethernet ports. These are often running on old recycled laptops which consumes around 40 Watts of power at peak level. Next to that the ARM Raspberry Pi platform consumes around 3 Watts of power (though I still have to measure it by myself). So I thought about replacing all my home-routers with those.

However the Raspberry Pi model B uses a SMSC LAN951x chip which includes the USB 2.0 Hub and an 10/100 Ethernet controller on top of it (which is known as smsc95xx in the Linux kernel). My  main concern was that it would not be fast enough to support the IPv6 tunnel at its peak bandwidth of 60Mbps (that is 30Mbps downstream/upstream).

I already use one RPi as an experimental home-router here. Our Internet bandwidth is a bit slow (12Mbps) so the USB-Ethernet  shouldn’t be a problem. I’ve conducted quick tests with IPerf and as you can see the results are pretty good as long as it doesn’t involve I/O on the RPi.

------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 4] local 10.0.0.1 port 5001 connected with 10.0.0.3 port 37373
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.1 sec 114 MBytes 94.4 Mbits/sec
[ 5] local 10.0.0.1 port 5001 connected with 10.0.0.3 port 37376
[ 5] 0.0-10.1 sec 114 MBytes 94.5 Mbits/sec
[ 4] local 10.0.0.1 port 5001 connected with 10.0.0.3 port 37377
[ 4] 0.0-10.1 sec 114 MBytes 94.6 Mbits/sec
[ 5] local 10.0.0.1 port 5001 connected with 10.0.0.3 port 37378
[ 5] 0.0-10.1 sec 114 MBytes 94.5 Mbits/sec

Work around broken dependencies on Debian

If you stumble upon bugs in package dependencies on Debian you may work around these using the equivs package. This package will allow you to create trivial Debian packages.
You need to create the controle file and then build the package :

equivs-control <control-file>
equivs-build <control-file>

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.

FOSDEM

Today we went to Brussels for the FOSDEM. For those who don’t know it’s one of the greatest FLOSS event in Europe with more than 5000 peoples from all over the world. We could hear German spoken, French, Dutch, Italian even Russian (or do I think so ? I never had a gift for languages) and many that we could not in fact identify. But in the end we just spoke English from one to the other with a huge medley of accents. We had a great day !

Anyway I guess we spent more than 50€ at the Debian stand. And they distributed nice RedHat gloves (actually I wasn’t there when they got one, I’m so jealous).

Little side note here: It was great to be there but I could never live in a city like Brussels. It’s so large, so cosmopolitan. I’m really not a city guy. Little side note is over.

Star Maker

Recently I stumbled across this book by Olaf Stapledon. Well this book inspired so many sf authors and it’s considered as a reference in the genre. And I feel like I should post a short review.
This book is must-read for everyone who likes hard science fiction. A marvelous journey trough the cosmos and beyond. He develops themes that you will find in other sf authors which he directly influenced. Moreover if you do like Arthur C. Clarke, which I’m a big fan of, you will certainly like Olaf Stapledon too !