Installing Ubuntu 10.10 (Maverick Meerkat) on Fujitsu U820, U2010, U2020

Here are a few notes on how to get the most important hardware of the Fujitsu U820 / U2010 / U2020 working on Ubuntu 10.10 Maverick Meerkat.
Some of the hints might also apply to the Fujistu U810 / U1010 – make sure to ignore step 1 as these devices use the GMA 950 graphics chip which is working perfectly out of the box.

1. Installing the Intel GMA 500 graphics driver

The Ubuntu Wiki has all the necessary information here.

Basically one just needs to do as follows:

sudo add-apt-repository ppa:gma500/ppa 
sudo apt-get update
sudo apt-get install poulsbo-driver-2d poulsbo-driver-3d poulsbo-config

UPDATE: The following step is no longer required.

Unfortunately the version as of this writing does not support Compiz and thus you won’t get any of the funky special effects. However, there is a workaround available as described in the Ubuntu Wiki:

wget http://dl.dropbox.com/u/1338581/poulsbo/poulsbo-config_0.1.2%7E1004um3_all.deb
sudo dpkg --install poulsbo-config_0.1.2~E1004um3_all.deb
sudo apt-get install compiz

2. Installing the Fujitsu Buttons driver (fjbtndrv)

In order to get the buttons and auto-rotation functionality working we will need to compile and install the latest version of fjbtndrv.
The most current version as of this writing is 2.2.1. Please make sure you download the latest version here.

sudo apt-get install libxrandr-dev libxtst-dev libxi-dev libhal-dev
wget http://sourceforge.net/projects/fjbtndrv/files/fjbtndrv/2.2.1/fjbtndrv-2.2.1.tar.gz/download
tar xvzf fjbtndrv-2.2.1.tar.gz
cd fjbtndrv-2.2.1
./configure
make
sudo make install

3. Installing the Fujitsu Touchscreen driver

The touchscreen is working somewhat with the included evdev driver. I could not find a way to calibrate the touch screen via xinput etc. So I went back to using zmiq2‘s touch screen driver available here.
Version 0.3.7 won’t compile because some important USB functions were renamed in kernel 2.6.35.
Straight from the kernel 2.6.35 changelog:

USB: rename usb_buffer_alloc() and usb_buffer_free() users

For more clearance what the functions actually do,

usb_buffer_alloc() is renamed to usb_alloc_coherent()
usb_buffer_free() is renamed to usb_free_coherent()

So, one either needs to patch the fujitsu_usb_touchscreen.c manually and replace every occurrence of the aforementioned function names or we just move on and use the already patched version provided by nerd65536. I mirrored the file he posted to the hosting service linked to in the comments section of zmiq’s blog post.

wget http://katastrophos.net/downloads/fujitsu-usb-touchscreen-0.3.8.tar.gz
tar xvzf fujitsu-usb-touchscreen-0.3.8.tar.gz
cd fujitsu-usb-touchscreen-0.3.8
make
sudo make install

In order to have the auto-rotation functionality of fjbtndrv working with the fujitsu-usb-touchscreen driver we need to add a new startup item: Click on System -> Preferences -> Startup Applications and click Add. Enter following

    Name: Fujitsu Touchscreen Auto-Rotation
    Command: /usr/bin/fujitsu-touchscreen-rotate.py
    Comment: 

Click Add and Close the preferences dialog.

Finally, reboot the system.
Enter the BIOS and make sure that the setting Advanced -> Miscellaneous Configurations -> Touch Panel Setting is set to Tablet, ie. the same setting that is required to use the Tablet functionality in Win XP Tablet, Vista or Seven.

3.1. Calibrating the touchscreen

Once the system has booted and you are back on the Gnome desktop, start a Terminal session and run

fujitsu_touchscreen_calibration.py

to calibrate the touchscreen. Click on any corner of the visible screen (repeat a few times) and press the S key to save the settings.

3.2. Configuring the Right-Click feature

In order to get the feature “right-click by press and hold” go to System -> Preferences -> Mouse, click the tab “Accessibility” and check the option “Trigger secondary click by holding down the primary button“.

4. Fixing the repeating sound issue

If you are experiencing the Ubuntu startup jingle repeating over and over again, the snd_hda_intel module might have problems coping with the ALC269 chip in your device. In this case run the following command:

sudo gedit /etc/modprobe.d/alsa-base.conf

and add the following line to the end of the file:

options snd-hda-intel enable_msi=0

Save and finally reboot the system.

Replacing the hinge and LCD back cover of a Fujitsu LifeBook U2010 / U820

I recently had to replace the hinge on my Fujitsu U2010, not because the hinge itself broke, but rather because I damaged the cable on one of my recent hacks. Fortunately I only damaged a part of the USB cable that connects the webcam to the mainboard. However, the cable harness is contained in the display hinge and can not be replaced separately, so I had to buy the whole part.
The replacement procedure is quite involving and delicate. While I was at it I also replaced the back cover of the display on my unit and replaced the pink back cover (my U2010 is a second hand unit) with a beautiful black cover. However, the particular cover I bought was from the US 3G version of the U820 – the one with the retractable antenna. I was not able to find the antenna assembly part so I had to brew my own…

Quasar Media Player 0.96 beta 4 available

Quasar Media Player

I am pleased to announce beta 4 of Quasar Media Player.
This new version introduces some new features and big improvements in terms of performance and memory-usage.
The previously separate last.fm Audioscrobbler QScrobbler has been integrated into Quasar as add-on.
This release also marks the introduction of the Cover Art Downloader which uses the new open-source katastrophos.net Cover Art search engine to download cover art images for the new Cover Art Flow album browser.

Quasar Media Player on Windows 7Cover Art Downloader on OS X

Binaries for the previous platforms (Sharp Qtopia and pdaXrom) along with new binaries for Windows and OS X (universal) are available on the project’s homepage.

Intel 5300 AGN WiFi in Fujitsu U2010/U820

I recently replaced the Atheros WiFi card in my Fujitsu U2010 with an Intel 5300 AGN half-sized Mini-PCIe card. The default Atheros Wifi card in the Fujitsu does not support MIMO and 802.11n on the 5 GHz band. This is a real let-down for a (draft-)N card.
Luckily the Intel 5300 AGN is one of the very few cards that are available in the half-sized Mini-PCIe form factor, so it fits into the Fujitsu U2010 and U820.

The process is quite involving and not for the faint of heart. Here are some snapshots of the process:

Some of the pictures show my 3G/HSDPA mod.
Also check out the interesting forum thread over at pocketables.

Quick-and-dirty DIY 19″ rack

Why buy an expensive 19″ rack when you can build it yourself for 8 Euro and a bit of work?

There is no magic here. The ingredients are really simple actually: A few pieces of wood, screws and glue.
The construction is rigid. No angles are required due to self-stability of the quadratic frames. Just make sure the inner length of each edge is exactly 19″ (48.26 cm). Glue and screw the pieces together and that’s it.

Retrofitting the Fujitsu LifeBook U820/U2010 with 3G/UMTS/HSDPA

So, I replaced my U810 with the newer U2010 model a few weeks back. Contrary to the U810 the U2010 has an empty and functional Mini PCI-E slot. I am using the O2 Internet-Pack L plan here in Germany a lot and tethered my Sony Ericsson K850 with the U810 before, which was quite a problem since this setup used to drain the batteries of my mobile phone quite fast due to UMTS/HSDPA + Bluetooth connectivity. I figured an internal solution would work better in my case. :)
The Novatel Expedite EU850D Mini PCI-E card seems like a good fit since it already includes a SIM card slot on board and is readily available via several retailers.
The big problem with this solution however is the fact that the U2010 is so crammed internally that it is hard to add any new conventionally available antennas. The device already has six antennas: two for Wifi, two for GPS, one for Bluetooth and one for the FM Transmitter. However I was not able to use any of these without sacrificing the functionality of these connectivity options.
Some retailers offer antennas with the module which are to be installed in the display lid and are too big to fit into the casing of the U2010. I refrained from opening up the lid and was looking for a different solution instead:
Why not use the same antenna a mobile phone uses?
As luck had it, a friend of mine had a broken Sony Ericsson K800i lying around, which I took apart and removed the antenna assembly from. You can also get the whole assembly as replacement part from several dealers at eBay. Fortunately the antenna is a film based one which can be stripped away from the plastic part it is fixed on. Due to the flexible form of the antenna you are free to place it almost anywhere in the case.
So I got an antenna cable with a Hirose U.FL / IPAX pigtail and soldered the other end of the cable onto the copper pads of the film antenna.

If you intend to do the same here is a word of warning: Be sure to use a placement inside the casing that is not covered by the silvery radiation shield coating as it will dramatically reduce the reception quality of the signal. I had to sand down some of the coating to get better signal strength. Your mileage may vary.

Nightly Builds of Quasar Media Player available

Quasar Media Player

It’s been some time since the last update. In my previous post I mentioned I was in the process of setting up a nightly build system. This system has been running silently since May.
I guess it is finally time for me to officially announce the nightly builds of Quasar Media Player:

http://www.katastrophos.net/downloads/quasar/nightly/

Along with the most current sourcecode tarball, binaries are available for 4 platforms:
Windows (win32), OS X (universal binary), Sharp Qtopia and pdaXrom Linux (both for Zaurus PDA)
The Windows version comes in two styles: a generic setup (EXE) and a self-contained portable version (7z archive)

Enjoy and please leave a comment.

Setting up the Inno Setup compiler on Debian

I’m currently setting up a nightly build system for Quasar on my Linux box which is running Debian. This system also cross-compiles Quasar for Windows.
The Windows version of Quasar is going to be available in two fashions: one self-contained, portable version and one version that can be installed.
I’m not a huge fan of installers. But when it comes to creating a setup program for a given Windows application I’m quite accustomed to Inno Setup having used it for years. Unfortunately there is no native Linux version of the Inno Setup compiler available for Linux. NSIS exists as package for Debian but I am not fond of using it, largely because I am a Delphi guy. :)
So, here is a small guide on how to get the Inno Setup compiler up and running on Debian:

First step is to install Wine either as super user or by using sudo:

sudo apt-get install wine

As normal user fire up your X server and your favourite terminal application and get the latest Inno Setup QuickStart pack:

mkdir /tmp/innosetup
cd /tmp/innosetup
wget http://files.jrsoftware.org/ispack/ispack-5.2.3.exe
wine ./ispack-5.2.3.exe

This will start the installer in Wine. Note, for the installation you will need a running X11 server since the installer obviously is graphical. If you have not set up Wine before, the default location C:\Program Files\Inno Setup 5 will install to ~/.wine/drive_c/Programme/Inno Setup 5.

Luckily the Inno Setup compiler offers a command line interface, ISCC.exe, which will run in Wine without the necessity of having a X server running. So it is ideally suited for automated runs.

Here is a simple wrapper shell script called iscc:

#!/bin/sh
unset DISPLAY
scriptname=$1
[ -f "$scriptname" ] && scriptname=$(winepath -w "$scriptname")
wine "C:\Program Files\Inno Setup 5\ISCC.exe" "$scriptname" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9"

I installed this script in my local bin directory (~/bin) and added it to the PATH environment variable.
This will allow running the Inno Setup compiler from anywhere and it also makes it very easy to integrate into a build script. You can even feed a script via stdin, e.g. something like:

iscc - < ./myscript.iss

Implementing the “Reveal In Explorer” functionality

Update: I seems like Microsoft changed the behavior of the Explorer’s command line parameters in Vista and Windows 7. Below is the fixed version of my code that addresses the problem.

So, I was wondering the other day how to implement a functionality similar to Firefox’s “Open Containing Folder” or OS X’s “Reveal In Finder”.
It turned out to be extremely simple. Here is the Pascal/Delphi-Code:

uses
  ShellAPI;

function RevealInExplorer(const Filename: string; ShowExplorerWithFoldersBar: Boolean = True): Boolean;
var
  Params: string;
begin
  if FileExists(Filename) or DirectoryExists(Filename) then
  begin
    Params := Format('/select,"%s"', [Filename]);

    if ShowExplorerWithFoldersBar then
      Params := '/e,' + Params;

    ShellExecute(0, 'open', 'explorer.exe', PChar(Params), nil, SW_SHOWNORMAL);

    Result := True;
  end
  else
    Result := False;
end;

Installing Windows 7 on Fujitsu U810, U1010, U2010, U2020

UPDATE: This also applies to Windows 7 Final/RTM (7600) and will also work for the U820/U2010/U2020 models. Check my comment for additional information on what needs to be installed on those models.

I just installed Windows 7 Business Build 7000 on my U810. It is quite nice actually and seems to run faster than Vista.

windows7capture2windows7capture1

I installed the Vista drivers from the driver CD. The Setup.exe on the driver CD will complain that the operating system is unsupported. To circumvent this problem, just start the setup in Vista compatibility mode:
Right-click on “Setup.exe”, “Properties” -> “Compatibility” -> “Run this program in compatibility mode for:” “Windows Vista”.

Install these items:

Drivers
04. Button Driver
05. Camera Driver
07. Fingerprint sensor (driver)
08. FUJ02B1 Device Driver (HotKey Driver)
09. FUJ02E3 Device Driver (System Extension Driver)
11. Pen Driver
12. Pointer device driver

Utilities/Applications
03. Button Utilities
07. Fujitsu System Extension Utilities

I could not get the Auto-Rotation feature to work. Also, you’ll probably have to calibrate the touch screen.
I also disabled the power management feature of the FCL USB Pen Tablet in Device Manager (Right-click on “Human Interface Devices/FCL USB Pen Tablet”, “Properties” -> “Power Management” -> Disable “Allow the computer to turn off this device to save power”). This improves the response of the touch-screen/tablet.

Oh, and BTW, Windows 7 “only” uses 7.5 GB of disk space, whereas Vista uses 15 GB I think.