Saturday, December 03, 2011

Running the Minecraft demo in Linux

I always wanted to see how Minecraft would run on my machine, but unfortunately the only demo version available is this old one for Windows.

Since the game is written in java, I wanted to see if I could get it to run under Linux anyways...

First I ran the demo installer using Wine.

The game itself is packaged as a Windows executable using the Launch4J. It turns out that one can simply unpack these Launch4J exe files using file-roller.

After unpacking the exe file (in the same directory where I installed the demo), I found a bunch of obfuscated class files. I tried to start them all (ie "java a" etc.), until I found some suitable ones: hz.class and k.class (both seem to work, I don't know what the difference is).

Both of these threw an exception because LWJGL could not be found.

I downloaded the current release of LWJGL, and the game started, but got stuck on the logo screen (apparently during sound initialization?).

I then installed the liblwjgl-java package from Debian and it finally worked.

Here is the wrapper script I ended up with.

The game (or at least this old version) is playable on my Intel G31 integrated graphics machine, but only on the lowest graphics settings :-/

Thursday, October 13, 2011

Tuesday, August 02, 2011

Installing Debian on a Thinkpad Edge E325

I just got a Lenovo Thinkpad Edge E325. I deliberately chose a version without Windows installed. I chose to install Debian/squeeze instead, and here are some notes on the process.

I started with the official Debian/squeeze amd64 netinst ISO, installed on a USB stick.

With the USB stick inserted, the laptop booted right into the Debian installer. Unfortunately, the kernel (2.6.32) did not recognize the Atheros ethernet adapter.

Using a backport of a more recent Installer (with kernel 2.6.38), I could get it to work. Unlike the official ISO, just "cat-ing" the alternative ISO to the USB stick does not seem to result in a bootable USB stick.

Instead I set up the USB stick using the supplied the HD image:
zcat boot-amd64-0710.img.gz > /dev/sdc
Additionally, I had to copy the ISO image (squeeze-custom-amd64-0710.iso) onto the USB stick as well.

After the installation, the display just showed random noise. I did not install an SSH server during the initial installation, so I had to boot from the USB stick again in rescue mode.

I installed the proprietary ATI driver (fglrx), and was greeted by the GDM login screen after rebooting.

I noticed that fullscreen video and 3D support were not availabe. The Xorg log complained about missing DRM support. I found out that the DRM kernel module (fglrx.ko) was not present on the system.

I added the backports repository (/etc/apt/sources.list.d/squeeze-backports.list), and installed the headers for the 2.6.38 kernel.
deb http://backports.debian.org/debian-backports squeeze-backports main
deb-src http://backports.debian.org/debian-backports squeeze-backports main

Afterwards I un- and re-installed the ATI driver. 3D support works now and videos can be watched in full-screen.

Unfortunately some 3D applications crash on exit, but that is not a big problem for now.

The wireless adapter (RTL8188CE) did not work at fist. The logs indicated that the firmware could not be loaded. I downloaded the Linux driver package from the Realtek website and copied the "rtlwifi" folder to "/lib/firmware". After reboot, my wireless network imediately showed up in Network Manager.

I could not get sound from any applications at first. It seems the default ALSA soundcard is the HDMI output while the "regular" sound chip is recognized as card 1. I created /etc/asoundrc to let ALSA know the correct default:
defaults.ctl.card 1
defaults.pcm.card 1
defaults.timer.card 1

When closing the lid, the system went into some suspend mode and I could not bring it back to live. I changed the energy management settings to just turn off the display instead.

The built-in webcam seems to work fine out of the box.

The display brightness keys work fine out of the box. The volume keys are recognized (a volume control icon appears on screen), but they seem to be mapped the the wrong control, as they do nothing. I have not yet tried any of the other keys (microphone, camera, wireless and play/pause etc. keys).


Update:

The media player keys (play, pause etc.) also work out of the box.

The HDMI output works as well, but there seems to be no way to tell Totem (the default video player) which audio output to use.

I used mplayer instead:
mplayer -ao alsa:device=hw=0.3 ...

As previously mentioned, suspend-to-disk (S4) does not seem to work properly, but suspend-to-ram (S3) does.


Update 2:

As mentioned earlier, the volume control keys were recognized out of the box, but
they did not work properly. This seems to be a problem of the flavor of Gnome that is in Debian, which includes some changes to the sound system. The controls are not mapped to the proper mixer interface.

Setting "/desktop/gnome/sound/default_mixer_device" to "alsamixer" in gconf-editor fixed this problem.

I also ended up changing some other keyboard settings. In the BIOS I swapped the "left ctrl" and "Fn" keys - this way it is way easier to hit ctrl with my left pinky - very important for an Emacs user :-) I also set "Fn" to be on by default.

Finally, in Gnome I unmapped the "print screen" key. Since it is located next to Alt-Gr, I kept hitting it by accident, making screen shots all the time...


Update 3:

After installing some missing firmware files, ie PALM* and SUMO* available here, the graphics now also work with the open source Xorg and Mesa drivers (at least with the versions from the squeeze-backports repository, I did not try it with the stock squeeze versions).

Video playback performance seems to have greatly improved. With the proprietary fglrx driver, video playback was kind of jerky and fullscreen flash video (Youtube) was unwatchable. Now it runs okay.

Wednesday, June 08, 2011

ElsterOnline sucks ass...

ElsterOnline, the official German online tax service site, is a piece of incompatible, non-working shit.

Sunday, May 22, 2011

Lullaby for the Old One...

The announcement of Dark Souls was a reminder that I had some unfinshed business to attend to!

Well, it is finally done:


Hope I can finish "new game plus" before october ;-)

Saturday, May 14, 2011

Wednesday, May 11, 2011

Dark Souls

Today I preordered Dark Souls, sequel to the fantastic Demon's Souls. Lets hope PSN is back online by october ;-)