Set up Ubuntu 9.04 Jaunty on the HP TC1100

With this tutorial you will be able to make better use of the tablet's features than you would on an out-of-the-box Ubuntu installation.

This guide is for Ubuntu/Kubuntu/Xubuntu 9,04 "Jaunty Jackalope" and other ubuntu derivatives. If you are not using gnome, replace gedit with kate, mousepad, or whatever text editor your distribution uses.

Click here for the Ubuntu 9.10 guide!

Before we begin

  1. I am not responsible for anything you do with your computer, including following this tutorial.
  2. Keep an eye out for errors. If one step in a process fails, it is likely the next one will not work.
  3. You can copy text on this page by highlighting it and hitting ctrl+c then paste it into a terminal with ctrl+shift+v.
  4. If you need help or have comments, use this forum thread.

comments look like this

terminal commands look like this

configuration file text looks like this

First things first

Apply all updates through the update manager


You can set Ubuntu to log in automatically. If you did not do this during installation and wish to, just follow the instructions below:

Installing NVIDIA graphics driver

The proprietary NVIDIA driver is required for screen rotation, special effects, etc.

Fixing the stylus and graphics

The following xorg.conf will fix the right click button on the stylus, allow for screen rotation, and let ctrl+alt+backspace restart x.

sudo gedit /etc/X11/xorg.conf

# xorg.conf (X.Org X Window System server configuration file)
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Monitor"
	Identifier	"Configured Monitor"
EndSection

Section "Screen"
	Identifier	"Default Screen"
	Monitor		"Configured Monitor"
	Device		"Configured Video Device"
	DefaultDepth	24
	Option		"AddARGBGLXVisuals"	"True"
EndSection

Section "Module"
	Load	"glx"
EndSection

Section "Device"
	Identifier	"Configured Video Device"
	Driver	"nvidia"
	Option	"NoLogo"	"True"
	Option  "RandRRotation"	"True"
	Option  "NvAGP"		"1"
	Option	"RenderAccel"	"False"
EndSection

Section "InputDevice"
	Identifier	"stylus"
	Driver		"wacom"
	Option		"Type"		"stylus"
	Option		"Device"	"/dev/input/wacom"
	Option		"ForceDevice"	"ISDV4" # special communication protocol
	Option		"Button2"	"3" # stylus button right click
EndSection

Section "ServerLayout"
	Identifier	"Default Layout"
	Screen		"Default Screen"
	InputDevice	"stylus"	"SendCoreEvents"
EndSection

Section "ServerFlags"
	Option	"DontZap"		"false"
	Option	"AutoAddDevices"	"false"
EndSection

You must restart X for changes to take effect. You can reboot or log out.

Installing useful applications

Cellwriter is a handwriting application used for entering text using the stylus.
Xournal is a note-taking application.
Xbindkeys, dpkg-dev, and devscripts are used for making the stylus buttons work later on in this tutorial.


Install them with this command:

sudo aptitude install cellwriter xournal xbindkeys dpkg-dev devscripts

Make cellwriter and xbindkeys startup automatically.

Configure xbindkeys for custom key mapping

gedit .xbindkeysrc

"rotate"
b:30
"xournal"
b:31
"cellwriter"
b:32
#"customcommand1"
#c:159
#"customcommand2"
#c:151

c:159 and c:151 are the Q and screen-switching buttons respectively. If you want to map them to a command, just remove the #s and enter your command in the appropriate spot.

Other tweaks and fixes

**IMPORTANT** Switch to root so we can enter the following commands without worrying about "sudo" on each one.

sudo su


Load the tc1100 module needed for controlling the jogdial and wireless card status.

modprobe tc1100-wmi
echo "tc1100-wmi" >> /etc/modules


Allow the jogdial to control screen brightness.

This is the only way you can control screen brightness, so this is how I prefer to use the jogdial. If you don't do this step you can keep using it as page up and page down.

gedit /etc/rc.local

echo 0 > /sys/devices/platform/tc1100-wmi/jogdial

Turn the wireless card (and bluetooth) back on after resuming from suspend.

gedit /etc/pm/sleep.d/15-WiFi

sleep 1
echo 1 > /sys/devices/platform/tc1100-wmi/wireless

chmod +x /etc/pm/sleep.d/15-WiFi


Fix stylus calibration after resuming from suspend.

gedit 03calibrate.sh

#!/usr/bin/env bash

IFS=$'\n'
FILE=/tmp/calibration.tmp
USER=
DISPLAY=:0.0
DEVS=`su $USER -c "xsetwacom --display $DISPLAY list dev | \
   sed -e 's/ *$//g' -e 's/\(.*\) .*/\1/g' -e 's/ *$//g'"`
XSETWACOM=/usr/bin/xsetwacom

function store_value()
{
    value=`su $USER -c "$XSETWACOM --display $DISPLAY get $1 $2"`
    echo "$XSETWACOM --display $DISPLAY set $1 $2 $value" >> $FILE
}

# Store calibration of all devices
function store_devices_calibration()
{
    >$FILE
    for DEV in $DEVS; do
	store_value $DEV "TopX"
	store_value $DEV "TopY"
	store_value $DEV "BottomX"
	store_value $DEV "BottomY"
    done
}

# Store calibration of all devices
function restore_devices_calibration()
{
    if [[ -e $FILE ]]
    then
	( sleep 2; su $USER -c "source $FILE")&
    fi
}

MODE=$1

case "$MODE" in
    hibernate|suspend)
	store_devices_calibration
	;;
    thaw|resume) 
	restore_devices_calibration
	;;
    *) exit $NA
        ;;
esac

chmod +x 03calibrate.sh
mv 03calibrate.sh /etc/pm/sleep.d/03calibrate.sh


Make a screen rotation script.

gedit rotate

#!/bin/sh
if [ -n "$(xrandr | grep 768x1024)" ]; then
        xrandr -o normal
        xsetwacom set "stylus" Rotate NONE
else
        xrandr -o left
        xsetwacom set "stylus" Rotate CCW
fi

chmod +x rotate
mv rotate /usr/bin/rotate

This will be used later on after we patch the drivers for the stylus buttons. You must have applied the above xorg.conf and installed the nvidia driver for it to work properly.


Prevent the screen from locking.

It sucks when the screen becomes locked, you don't have a keyboard attached, and you can't access cellwriter.

**NOTE: These commands must be run as your normal login user, not as root/sudo. So if you are in the terminal as root, just type "exit" or open a new terminal to run these.

gconftool -s /apps/gksu/disable-grab -t bool true
gconftool -s /apps/gnome-power-manager/lock/suspend -t bool false
gconftool -s /apps/gnome-power-manager/lock/hibernate -t bool false


Change fsck frequency.

By default Linux checks your file system for errors every 30 boots. If you reboot frequently this can become bothersome. The following command will change the frequency of checks to every 50 boots.

tune2fs -c 50 /dev/sda1


Fix the headphone jack.

In the Sound preferences, make sure "jack sense" is enabled. Otherwise sound will still play from the speakers if you have headphones plugged in.

Patch the drivers to enable the stylus buttons

**Make sure you previously installed dpkg-dev and devscripts and that you switched your terminal to root user

cd /usr/src

adduser your-user-name src
chown -R root:src /usr/src
apt-get source wacom-tools
apt-get build-dep wacom-tools
gedit wacom.patch

diff -rN -c linuxwacom-0.7.8-3/src/xdrv/wcmISDV4.c linuxwacom-0.7.8-3-patched/src/xdrv/wcmISDV4.c
*** linuxwacom-0.7.8-3/src/xdrv/wcmISDV4.c	2007-08-15 01:12:39.000000000 +0200
--- linuxwacom-0.7.8-3-patched/src/xdrv/wcmISDV4.c	2008-01-09 02:54:11.000000000 +0100
***************
*** 231,236 ****
--- 231,263 ----
  		return n;
  	else
  	{
+ 	
+ 	   /* handle TC1100 stylus buttons */
+ 		if ((data[0] == 0xC1) && ((data[1] & 0xF0) == 0))
+ 		{
+ 		   DBG(2, priv->debugLevel, ErrorF("isdv4Parse Tablet Button %s\n",
+ 		      data[1] == 0x1 ? "rotate" : data[1] == 0x2 ? "journal"
+ 	         : data[1] == 0x4 ? "keyboard" : "unknown" ));
+ 	      
+ 	      /* do not reset relative values here */
+ 	      ds = &common->wcmChannel[0].work;
+ 	      
+ 	      /* first send the tablet button press event */
+ 	      ds->proximity = 1;
+ 	      ds->buttons = ((int)data[1]) << 29;
+ 	      ds->pressure = common->wcmMaxZ;
+ 	      ds->device_id = STYLUS_DEVICE_ID;
+ 	      ds->device_type = STYLUS_ID;
+ 	      xf86WcmEvent(common, 0, ds);
+ 	      
+ 	      /* then immediately after send the release event */
+ 	      ds->buttons = 0;
+ 	      ds->pressure = 0;
+ 	      ds->proximity = 0;
+ 			xf86WcmEvent(common, 0, ds);
+ 	      return common->wcmPktLength;
+ 		}
+ 	
  		/* Coordinate data bit check */
  		if (data[0] & 0x40)
  			return common->wcmPktLength;

cd wacom-tools-0.8.2.2/linuxwacom/
patch -p1 < /usr/src/wacom.patch
cd ..
debuild -uc -us -b
cd ..
dpkg -i *.deb
aptitude remove dpkg-dev devscripts
apt-get clean

If update manager asks you to update your wacom-tools, don't do it; it will erase your custom wacom-tools.

Make sure you installed xbindkeys and had it automatically start, as well as installing cellwriter and xournal. Reboot and everything should be working perfectly!

Other notes

Thanks to everyone who made this tutorial possible!

I installed a single ext4 partition (no swap) and everything works great. However this means I can't hibernate it, thus nothing in the guide refers to hibernation.

The LinuxQuestions wiki has a slightly different method of patching the wacom drivers. You can try that one instead if you like.

I do not know how to get the card-reader working. If you find a way, please post it on the thread mentioned at the top. Bug report here.


Was this guide helpful to you? Please see how you can help us.
Posted: Mar 28th, 2011
The Linux Aisle LLC © 2013