Debian 'unstable' (as of Dec 26th 2008) seems to have everything needed and there is no longer the need to by hand compile kernels and what-not in the general case. Worth bearing in mind, is that I opted for the 64bit install and so far had no problems.
Not much to say about this. Of course the laptop does not come with any kind of DVD or CD drive which defeats the usual Windoze, Ubuntu and Gentoo weenies. Fortunately being a clever lad, having had the experience and enjoyed watching the pansies cry online “I don't know how to install an OS without a CD drive” I just smiled and PXE booted the thing.
Whining Weiners….you should all be ashamed. For those wishing to learn what real computing hardware is about, buy a secondhard Sun, or Alpha, boxen from fleabay and install Linux on that. Once you have done that you will be able to join the rest of us in our intrinsic hatred for x86….anyone want to give me a Tadpole laptop? :)
Why people still burn CD's when they could just PXE boot in 95% of situations, especially so when you can get even Windoze to bootstrap, is beyond me… I guess you could USB boot, however that really is wimping out. :)
This is actually a serial port device, and is automatically configured via ACPI's PNP.
To use it you will need a patched version of inputattach that supports baud/w8001 and to have wacom_w8001 (CONFIG_TOUCHSCREEN_WACOM_W8001) support compiled into your kernel.
# cat <<'EOF' > /lib/udev/inputattach
#!/bin/sh -e
#
# udev script for inputattach
(
. /lib/udev/hotplug.functions
wait_for_file /usr/bin/inputattach
exec /usr/bin/inputattach $@
) &
EOF
# chmod +x /lib/udev/inputattach
# cat <<'EOF' >> /etc/udev/rules.d/99-local.rules
SUBSYSTEM=="tty", KERNEL=="ttyS[0-9]*", ATTRS{id}=="FUJ02e5", ACTION=="add", RUN+="inputattach --daemon --baud 19200 --w8001 /dev/%k"
EOF
It's worth having a look at Debian Bug #616443.
N.B. the pen fails to align properly with the bottom corners of the screen and so needs some adjusting. When I find it becomes annoying, I first have to find a use for the pen, I'll post up what I did to fix the problem.
'xbacklight' works generally fine, however before it starts funtioning you will need to put the following into your '`~/.xsession`' file or you will be blinded:
xbacklight -set 30
The screen is very bright at 100% I would recommend you drop it to aroun the 30 or 40% mark.
All the hard work has been done already, it's lurking in the fjbtndrv package. To fetch it type:
$ svn co http://fjbtndrv.svn.sourceforge.net/svnroot/fjbtndrv/trunk fjbtndrv
This downloads the latest version of the whole lot, however the whole thing is pretty sucky except for '/usr/src/fjbtndrv/src/linux/' bit, go into that directory, type 'make' and then as root type 'make install'. Afterwards you can slip 'fjbtndrv' into your '/etc/modules' and xorg will start seeing keyboard events.
We need a few udev rules though, so in '`/etc/udev/rules.d/99-local.rules`' add:
# cat <<'EOF' >> /etc/udev/rules.d/99-local.rules
SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{name}=="fsc tablet buttons", SYMLINK+="input/by-path/platform-fsc_btns-event-kbd"
# as xorg does not support sw events we use evrouter which means we need global readable
# N.B. no a risk as the most people can do is read when we go into tablet mode :)
SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{name}=="fsc tablet switch", SYMLINK+="input/by-path/platform-fsc_tab-event-sw", MODE="644"
EOF
To make use of the buttons I would recommend you use 'xbindkeys' and evrouter to give you the support for the 'tablet mode' switch (the bit that tells your computer that you have tabletised the screen). I originally rolled the patch to add switch event support to evrouter as xorg does not support switch events and fortunately the author has incorporated this into his application.
Once compiled (with 'debuild') and installed you will need to create ~/.evrouterrc (similar to below) and then you should start being able to run scripts on this event:
"fsc tablet switch" "/dev/input/by-path/platform-fsc_tab-event-sw" none sw/1/1 "Shell//usr/local/bin/tabletRotateScreen normal" "fsc tablet switch" "/dev/input/by-path/platform-fsc_tab-event-sw" none sw/1/0 "Shell//usr/local/bin/tabletRotateScreen right"
Annoyingly the screen brightness hotkeys are non-functional here, they pop up as ACPI events so you will need to add to '`/etc/rc.local`' (you will need 'acpi-support' installed too but thats a good thing anyway):
# fujitsu t2010 brightness keys /usr/bin/setkeycodes e0e0 224 # brightness down /usr/bin/setkeycodes e0e1 225 # brightness up
'xbindkeys' will run a script when you press the screen rotate button and also for the volume hotkeys when you add to your '`~/.xbindkeysrc`':
alex@berk:~$ grep "^[^#].*" ~/.xbindkeysrc "tabletRotateScreen" XF86RotateWindows "amixer sset Master,0 mute" XF86AudioMute "amixer sset Master,0 unmute; amixer sset Master,0 5%-" XF86AudioLowerVolume "amixer sset Master,0 unmute; amixer sset Master,0 5%+" XF86AudioRaiseVolume "flipper" XF86Display
'flipper' is a handy script that lets you flip between the TFT and external monitor:
$ cat <<'EOF' > /usr/local/bin/flipper
#!/bin/sh -e
#set -x
SCREEN_DEF=LVDS
XRANDR=$(xrandr --query)
SCREEN_DEF=$(echo "$XRANDR" | grep "^$SCREEN_DEF" | head -n1 | cut -d' ' -f 1)
SCREENS=$(echo "$XRANDR" | grep ' connected ' | cut -d' ' -f 1)
if [ $(echo "$XRANDR" | grep '*' | wc -l) -ne 1 ]; then
xrandr --output $SCREEN_DEF --auto --preferred --primary
for SCREEN in $SCREENS
do
[ "$SCREEN" = "$SCREEN_DEF" ] && continue
xrandr --output $SCREEN --off
done
exit 0
fi
[ $(echo "$XRANDR" | grep ' connected ' | wc -l) -eq 1 ] && exit 0
SCREEN_CUR=$(echo "$XRANDR" | grep -m 1 -B 1 '*' | head -n1 | cut -d' ' -f 1)
FLAG=0
for SCREEN in $SCREENS
do
[ $FLAG -eq 1 ] && break
[ "$SCREEN" = "$SCREEN_CUR" ] && FLAG=1
done
[ "$SCREEN" = "$SCREEN_CUR" ] && SCREEN=$(echo $SCREENS | cut -d' ' -f1)
xrandr --output $SCREEN --auto --preferred --primary
xrandr --output $SCREEN_CUR --off
exit 0
EOF
$ chmod +x /usr/local/bin/flipper
'tabletRotateScreen' is a handy script to deal with screen rotation:
$ cat <<'EOF' > /usr/local/bin/tabletRotateScreen
#!/bin/sh -e
set -x
SCREEN=LVDS
STYLUS='Wacom Serial Penabled Touchscreen'
XRANDR=$(xrandr)
SCREEN=$(echo "$XRANDR" | grep "^$SCREEN" | head -n1 | cut -d' ' -f 1)
STATE=$(xrandr | grep "^$SCREEN connected" | awk '{ split($3,res,/x|\+/); print (res[1] > res[2]? "wide": "tall") }')
# we probably are in VGA with the LCD turned off so exit
[ -z "$STATE" ] && exit 0
# we munge the Fn/Alt tablet key to be more useful also
# Fn -> wayv/stuff
# Alt -> window manager
if [ "$STATE" = "wide" ]; then
# go right
xrandr --output $SCREEN --rotate right &
xinput set-prop "$STYLUS" 'Evdev Axis Inversion' 0, 1
xinput set-prop "$STYLUS" 'Evdev Axes Swap' 1
xmodmap -e 'remove Control = Control_L'
xmodmap -e 'add Mod3 = Control_L'
xmodmap -e 'remove Mod1 = Alt_L'
xmodmap -e 'add Mod4 = Alt_L'
else
# go normal
xrandr --output $SCREEN --rotate normal &
xinput set-prop "$STYLUS" 'Evdev Axis Inversion' 0, 0
xinput set-prop "$STYLUS" 'Evdev Axes Swap' 0
xmodmap -e 'remove Mod4 = Alt_L'
xmodmap -e 'add Mod1 = Alt_L'
xmodmap -e 'remove Mod3 = Control_L'
xmodmap -e 'add Control = Control_L'
fi
exit 0
EOF
$ chmod +x /usr/local/bin/tabletRotateScreen
You will need to fixup the keymap slightly to make the onscreen buttons more useful than they are by default, best to put in your '`~/.xsession`' file:
# sort out the tablet keys to be sane xmodmap -e 'keycode 161 = XF86RotateWindows' xmodmap -e 'keycode 185 = Prior' # XF86ScrollUp xmodmap -e 'keycode 186 = Next' # XF86ScrollDown
It works, but the 3D acceleration is not great, glxgears comes back with a unstunning 415fps. I feel it should be faster but others are reporting a similar value…and it seems to be linked to that the Intel driver for the chipset is not really 3D 'enabled'. Not bothered, I'm not a gamer or an eye candy kind of person.
alex@berk:~$ glxinfo name of display: :0.0 display: :0 screen: 0 direct rendering: Yes server glx vendor string: SGI server glx version string: 1.2 server glx extensions: [snipped] 72 GLX Visuals visual x bf lv rg d st colorbuffer ax dp st accumbuffer ms cav id dep cl sp sz l ci b ro r g b a bf th cl r g b a ns b eat ---------------------------------------------------------------------- 0x21 24 tc 0 32 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None 0x22 24 dc 0 32 0 r y . 8 8 8 8 0 24 8 0 0 0 0 0 0 None 0xcd 24 tc 0 24 0 r . . 8 8 8 0 0 0 0 0 0 0 0 0 0 None 0xce 24 tc 0 24 0 r . . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow 0xcf 24 tc 0 24 0 r y . 8 8 8 0 0 0 0 0 0 0 0 0 0 None 0xd0 24 tc 0 24 0 r y . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow 0xd1 24 tc 0 24 0 r y . 8 8 8 0 0 0 0 0 0 0 0 0 0 None 0xd2 24 tc 0 24 0 r y . 8 8 8 0 0 0 0 16 16 16 0 0 0 Slow 0xd3 24 tc 0 24 0 r . . 8 8 8 0 0 24 0 0 0 0 0 0 0 None 0xd4 24 tc 0 24 0 r . . 8 8 8 0 0 24 0 16 16 16 0 0 0 Slow [snipped more 'None' and 'Slow' :( ]
Nice to get to the good old British pound symbol on my keyboard :) Add to your '`~/.xsession`' file something like:
# give me sterling for Shift-Alt-3 xmodmap -e 'keycode 12 = 3 numbersign sterling' xmodmap -e 'keycode 26 = e E [[EuroSign]] cent'
The fingerprint reader is an “AuthenTec, Inc. AES2501 Fingerprint Sensor” (USB-ID: 08ff:2580) and is supported via the userspace debian tool 'aes2501-wy'. It works fine when you call it via 'su -c aes2501' creating PNM files…fingerprint readers are really just scanners anyway. Apparently if you use the Debian experimental bits then you get 'libpam-fprint' which will give you an easy way to do fingerprint authentication.
I personally think fingerprint authentication is a joke (you could use it combined with some other method though, or maybe as a quick xscreensaver unlocker…) and should be avoided, two main reasons:
One thing that I might look into using it for is as an extended keyboard. Some ideas:
The ath5x driver has worked generally fine for me since 2.6.29. With more recent kernels, if you have rfkill support enabled, your hardswitch on the front left controls both bluetooth (works with btusb) and wifi (without rfkill it simply 'unplugs' the internal USB bluetooth dongle).
The only issue I had to overcome was the braindeadness of the HAL refusing to accept my region settings, as I'm a UK dweller. To deal with this you type the following as root:
ath_info -v -g 3:0 -w 0xfc200000 regdomain 0x60
For more details on this have a read of the madwifi ticket 2156, ath_info and country codes.
Now in your '/etc/network/interfaces' file you should have something like:
#allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wlan0.conf
# if you do not rmmod the driver, the hardswitch is latched on after a 'ip link set wlan0 down'
pre-up modprobe -r ath5k
pre-up modprobe ath5k
pre-up sysctl -q -w net.ipv6.conf.wlan0.use_tempaddr=2
up ip link set dev wlan0 txqueuelen 10
post-down ip addr flush dev wlan0
iface default inet dhcp
# unfortunately ifmetric no longer works with wpa-roam
#up [ "x$IFACE" = "xwlan0" ] && ifmetric wlan0 5
Your '/etc/wpa_supplicant/wlan0.conf' file should look like:
ctrl_interface=/var/run/wpa_supplicant.wlan0
ctrl_interface_group=netdev
update_config=1
ap_scan=1
fast_reauth=1
network={
[snipped]
}
network={
[snipped]
}
You should now be able to ifup/ifdown to your hearts content, those chasing after a GUI should add themselves to the 'netdev' group and install 'wpagui'.
With older kernels you used to have to pass 'model=fujitsu' to the 'snd_hda_intel' module, however now-a-days it seems to just work fine;
if you of course overlook the fact Fujitsu put a naff tinny mono speaker on it
Works fine however there is no DMA mode, just PIO mode (not surprising though).
sdhci:slot0: Unknown controller version (2). You may experience problems. mmc0: SDHCI at 0xfc402800 irq 18 PIO mmc0: new SD card at address 1234 mmcblk0: mmc0:1234 SD02G 1992704KiB mmcblk0: p1
Some speed statistics, bear in mind the CPU becomes busy and even the mouse jerks around the screen when I do the following:
berk:/home/alex# dd if=/dev/mmcblk0 of=/dev/null bs=1M count=100 100+0 records in 100+0 records out 104857600 bytes (105 MB) copied, 42.258 s, 2.5 MB/s
I had a brief go at forcing DMA mode in the sdhci.c (using `SDHCI_QUIRK_FORCE_DMA`, `SDHCI_QUIRK_32BIT_DMA_ADDR` and `SDHCI_QUIRK_32BIT_DMA_SIZE`) source code for the controller but had no joy; let me know if anyone finds out something.
The smartcard reader works with the o2scr driver, however there are some problems with it. I spoke to the authors on the mailing list and the following patches make the thing functional:
$ svn co http://svn.gna.org/svn/o2scr/trunk o2scr
If you then patch up the code as per the following thread on the o2scr-main mailing list.
Bear in mind, that smartcards under Linux is currently not too great. Brace yourself for some work on this, once I have fully gotten a working setup into place, I will slap some instructions on my site under a seperate section.
A list on some useful smartcard related pages:
Hibernate and Suspend-to-RAM generally works fine.
N.B. the BIOS that came with my laptop (1.04) had a bug so that about 30% of the time on a resume after a Suspend-to-RAM event would fire off the LID event once every second; effectively killing any ACPI functionality afterwards. A reboot would be needed to fix it. When I upgraded to 1.08, things started to work fine.
I like to Suspend-to-RAM when I close my laptop lid, so I use the following:
# cat <<'EOF' > /etc/acpi/local/lid.sh.post
#!/bin/sh
# dependencies: acpi-support-base
. /usr/share/acpi-support/power-funcs
RUNLEVEL=$(/sbin/runlevel | awk '{ print $2 }')
if [ "$RUNLEVEL" = "0" ] | [ "$RUNLEVEL" = "5" ]; then
exit 0
fi
if [ $(cat /proc/acpi/button/lid/LID/state | awk '{ print $2 }') != "open" ]; then
pkill ^ssh$
for x in /tmp/.X11-unix/*; do
displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
getXuser;
if [ x"$XAUTHORITY" != x"" ]; then
export DISPLAY=":$displaynum"
LVDS=$(xrandr --dryrun --query | grep '^LVDS' | cut -d\ -f 1)
VGA=$(xrandr --dryrun --query | grep '^VGA' | cut -d\ -f 1)
su $user -c xrandr -- --output ${LVDS} --auto --preferred --primary
su $user -c xrandr -- --output ${VGA} --off
su $user -c xautolock -enable
fi
done
for x in `cat /proc/net/wireless | awk 'BEGIN { FS="[: ]" } /:/ { print $2 }'`; do
ifdown $x &> /dev/null | true
done
sync
echo mem > /sys/power/state
fi
exit 0
EOF
# chmod +x /etc/acpi/local/lid.sh.post
Okay, if we overlook the bouncing keyboard and the crappy tinny speaker, the only other problem with the laptop is that the ACPI bits suck:
So to fix up the DSDT, you need to compile a custom kernel (I actually could not be bothered with the Debian kernel and now have gone with the vanilla/git kernels) annoyingly as Debian refuses to add the very helpful feature of loading the DSDT from initramfs:
You will need the ACPI DSDT in initrd patch.
N.B. provide fixed up DSDT once I have finished fiddling :)
Now the DSDT playing:
# aptitude install iasl $ mkdir /usr/src/dsdt $ cd /usr/src/dsdt $ cat /sys/firmware/acpi/tables/DSDT DSDT.aml $ iasl -d DSDT.aml $ patch < fujitsu-t2010-dsdt-fixup.diff $ iasl DSDT.dsl # cp dsdt-v1.04.aml /etc/initramfs-tools/DSDT.aml
PowerTOP alas will only show me getting down to about 16 (no-X11) to 26 (with X11) wakeup's per second which is a bit naff, however to get this you need to do the following (remember to turn off bluetooth with the physical switch too when not using it).
Tweak your '`/etc/rc.local`' file to include:
/sbin/sysctl -q -w vm.dirty_writeback_centisecs=1500 /sbin/sysctl -q -w fs.xfs.xfsbufd_centisecs=3000 echo 1 > /sys/devices/system/cpu/sched_mc_power_savings echo 10 > /sys/module/snd_hda_intel/parameters/power_save
N.B. ignore the powertop usbcore autosuspend stuff, it does not know what it is talking about.
Annoying, according to PowerTOP, XFS adds a wakeup for every XFS mounted filesystem which shows up as the process xfsaild. I annoyingly have 19 LV, excluding my root filesystem, XFS filesystems so I'm annoyed, but what can I do.
I used the automounter ('autofs5') to reduce this problem so I could still abuse LVM to my liking. I added the following to my `/etc/auto.master` file:
/mnt/auto.xfs /etc/auto.xfs --timeout=300
My `/etc/auto.xfs` file looks like:
backupninja -fstype=xfs,rw,relatime,nodev,nosuid,noexec :LABEL=backupninja src -fstype=xfs,rw,relatime,nodev,nosuid :LABEL=src ts7800 -fstype=xfs,rw,relatime,nodev,nosuid :LABEL=ts7800 wag54g -fstype=xfs,rw,relatime,nodev,nosuid :LABEL=wag54g bitbucket -fstype=xfs,rw,relatime,nodev,nosuid,noexec :LABEL=bitbucket photos -fstype=xfs,rw,relatime,nodev,nosuid,noexec :LABEL=photos old -fstype=xfs,ro,relatime,nodev,nosuid,noexec :LABEL=old
You then can comment out the entries from your `/etc/fstab` file that you have added to your `/etc/auto.xfs` file and then replace all your mount points with softlinks to `/mnt/auto.xfs/<NAME>`.
All seems to work fine with the tpm_infineon module:
berk:/home/alex# dmesg | grep -i tpm pnp: the driver 'tpm_inf_pnp' has been registered tpm_inf_pnp 00:03: Found TPM with ID IFX0102 tpm_inf_pnp 00:03: TPM found: config base 0x4e, data base 0xfd00, chip version 0x000b, vendor id 0x15d1 (Infineon), product id 0x000b (SLB 9635 TT 1.2) tpm_inf_pnp 00:03: driver attached
Using the TPM is outside the scope of this page. The Infineon TPM chip series supposedly generates True RNG which means we could use it as an entropy source through rng-tools.
For the sake of completeness, the single nagging device that I'm yet to find is the accelerometer on the laptop. The last place I can think of is the I2C bus however I guess I should spend more time digging through the ACPI DSDT.
An initial nosey on the i801 smbus (SMBus I801 adapter at 18e0) gives me:
berk:/home/alex# i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- 08 09 0a 0b -- -- -- --
10: -- -- -- -- -- -- -- -- -- 19 -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- --
50: 50 51 52 -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- 69 -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
From my guess work I have found by using “i2cdump -y 0 0x??” where '??' is the address I'm probing and also noseying in '/sys/bus/i2c/devices/':
As for the rest, no idea what they are however the lm-sensors website helps fill in some of the blanks potentially: