TC1100

The HP/Compaq TC1100 is a Tablet PC. It has quite a few devices crammed into its small form factor. Getting them all to work in Linux can be quite a task, but the situation is constantly improving.

General
Using a recently-updated distribution with a 2.6-series kernel is recommended. Ubuntu and Debian work pretty well. Wired ethernet, full-resolution graphics, sound, PCMCIA, USB and top-side buttons should work by default. Wireless networking works by default on Ubuntu 7.10, but not on Debian due to missing firmware (see below). Most of the tablet's devices can be made to work, so installing Linux on it is feasible. There are no reports of keyboard position sensor working.

The following table summarizes the level of support for the TC1100's devices, in a desktop installation of Ubuntu 8.10. The situation is similar for Debian Etch.


 * Green means that the device works by default with absolutely no configuration.
 * Yellow means that packages may need to be installed and/or configuration files will need to be edited.
 * Red means serious modifications are needed to get it to work, such as recompiling some packages.
 * Black means that no one has written software to handle it.

(*) The card reader is integrated with the PCMCIA controller, which is Texas Instruments PCI1620. Some people having the same controller in different machines have reported some success. The typical procedure involves ripping firmware from the Windows driver, decrypting it, and using unofficial drivers to load it.

(**) Non-original Chinese replacement batteries may need to be re-inserted after charging to full, otherwise they show 0% charge. It is the fault of the battery though, original batteries work normally.

(***) The wireless adapter's firmware, being non-free software, is not included by default in Debian. See below for instructions on installing it. Power management of the WiFi interface will require the WMI driver.

(****) Attaching and detaching the keyboard seems to be interpreted as Thermal Zone events. It may be possible to correct this by tweaking acpid configuration files.

NVIDIA accelerated graphics
In Ubuntu 8.10 and later, just use the Hardware Drivers utility to install the binary NVIDIA drivers which give you accelerated graphics. Note that the headers package (usually linux-headers-generic) must be installed, otherwise the automatic driver build on restart will fail. The installer will take care of setting up xorg.conf for you.

sudo m-a get,build,install nvidia should work on other Debian-based systems, provided you have the package module-assistant installed.

You can now configure X for the "nvidia" driver. For all features to work correctly, you must add two lines in the Device section of xorg.conf. Edit it using e.g. gksu gedit /etc/X11/xorg.conf and add the following two lines: Section "Device" Identifier     "Configured Video Device" Driver "nvidia" Option "NoLogo"        "True" Option "RandRRotation" "True" Option "NvAGP"         "1" EndSection

The first will enable dynamic rotation, while the second will allow your computer to suspend properly.

WMI driver
The WMI functionality (turning the wireless card on/off and regulating the screen brightness) is supported in kernels 2.6.25 and later. Kernels before 2.6.23 have another legacy interface, while kernels 2.6.23 and 2.6.24 don't have this driver at all. This means that Ubuntu 8.04 can't use the WMI functionality unless a kernel upgrade is made. Ubuntu 8.10 works without further configuration.

For power management commands, see the Appplication Tips section.

Stylus
The stylus lets you use the TC1100 as a Wacom tablet. Starting with Ubuntu 9.04, the stylus is detected and usable as a pointer out of the box. There may be an issue with the tablet right-click (with the stylus button held down) being recognized as a middle click; to correct it, put this file in /etc/hal/fdi/policy/wacom.fdi

    input 3

Stylus buttons
The stylus-activated buttons on the left side of the display are supported in Ubuntu 9.10 (Karmic Koala). With 9.04 and below, they they can made to work as mouse buttons using a small patch. The instructions below are for Ubuntu, but they should work on any Debian-based distribution - just execute the commands prefixed by sudo</tt> as root and without the sudo</tt> prefix. mkdir ~/src && cd ~/src apt-get source wacom-tools sudo apt-get build-dep wacom-tools cd wacom-tools-0.8.2.2/linuxwacom patch -p1 < ~/wacom.patch cd /usr/src/wacom-tools-0.8.2.2 dch -i debuild -uc -us -b After that, install the built packages. There are two of them built by the debuild</tt> command: One is called wacom-tools_ (version) .deb and the second one xserver-xorg-input-wacom_ (version) .deb.
 * First, download the Linux Wacom drivers source. Download the build dependencies as well
 * Apply the TC1100 stylus buttons patch (for this example it should be saved in your home directory with the filename "wacom.patch"), and build a modified Debian package. The dch -i</tt> command increments the Debian changelog and is optional.

patch</tt> should output something like "patching file src/xdrv/wcmISDV4.c</tt>" or "Hunk #1 succeeded (offset 5)</tt>". debuild</tt> will take care of configuring and building the modified packages. After installing them, restart X. In Ubuntu 9.04 the Ctrl+Alt+Backspace combination doesn't work; switch to another virtual terminal using Ctrl+Alt+F2, login and then execute sudo /etc/init.d/gdm restart</tt> - this will restart the X server. (You can enable the combination using dontzap --disable</tt>, but it still needs an X restart to take effect.)
 * In a terminal, run the event testing program xev</tt>. Position the cursor over the small window and try pressing the stylus buttons. The terminal should indicate that there are ButtonPress and ButtonRelease events. The rotate button is mouse button 30, journal - mouse button 31 and input panel - mouse button 32.

See the section "Application Tips" for an explanation on how to make these buttons do something useful.

Rotation
To support display rotation, do the following:


 * Install wacom-tools. Ubuntu Gutsy and later has the required version in its repository. For Debian Etch you have to download a more recent version from the Linux Wacom Project's website. Also see the above section if you are interesten in making the stylus buttons work.
 * Install the NVIDIA binary driver. Make sure you changed xorg.conf to enable dynamic rotation.

Once you are set up, rotation can be accomplished via these terminal commands:

xrandr -o left xsetwacom set stylus rotate ccw xsetwacom set cursor rotate ccw

To get back to normal:

xrandr -o normal xsetwacom set stylus rotate none xsetwacom set cursor rotate none

See the Application Tips section for information on how to bind these commands to the stylus-activated rotate button.

Brightness
You can turn on brightness regulation on and off with: echo 0 > /sys/devices/platform/tc1100-wmi/jogdial echo 1 > /sys/devices/platform/tc1100-wmi/jogdial (Yes, 0 turns brightess regulation on). While brightness regulation is on, you can adjust it using the jog dial at the top of the tablet. This small script pops up a message box while the brightness regulation is on, which can be closed by pressing the jog dial down. You can bind it to a button or place in some pop-up menu.
 * 1) !/usr/bin/env bash

if ! -f /sys/devices/platform/tc1100-wmi/jogdial ; then zenity --info --text="This kernel does not have TC1100 WMI support." exit 1 fi

echo 0 > /sys/devices/platform/tc1100-wmi/jogdial zenity --info --text="Use the jog dial to adjust the brightness. Press OK when done." echo 1 > /sys/devices/platform/tc1100-wmi/jogdial

exit 0

Display TwinView
The official nVidia drivers are capable of driving two monitors. One is the tablet's LCD, and the other is anything attached to the 15 pin external VGA port. By default this port is a mirror of the LCD, but it can be used to create a larger desktop.

The best way to adjust the TwinView setup is to install the package nvidia-settings</tt>, which provides an easy to use GUI to adjust TwinView and Digital Vibrance settings.

Sound
The Intel sound card works out of the box with recent Debian and Ubuntu releases. The only confusing issue you may encounter is that the built-in speakers are not turned off when a headphone jack is plugged in. This is because headphone volume is independent from master volume. To correct this in GNOME, do the following:


 * Right-click on the volume control icon in the panel and click on Open Volume Control.
 * From the menu choose Edit->Preferences.
 * Tick the checkbox Headphone Jack Sense and close the menu.
 * Go to the Switches tab and enable Headphone Jack Sense.

Now the speakers should turn off when you plug in a headphone jack.

Side buttons
There are several buttons on top of the tablet, labeled "Q", "tab", etc. The Esc and Tab buttons generate escape and tab keycodes, so their role is fixed, and it would require some tricks to remap them. The jog dial generates codes 99 (Prior, PgUp) for left, 105 (Next, PgDn) for right and 35 (Return) for press. The Q button generates the keycode 159 (0x9F). It can be assigned to run an arbitrary program or script using xbindkeys. By binding it to xvkbd invoked with the -text parameter, you can also emulate arbitrary keypresses - see the xvkbd manual for details. In GNOME, you can also use System->Preferences->Keyboard Shortcuts to assign the buttons to some common things. For an equivalent of the Q Menu on Windows, see Application Tips.

Hibernate and suspend to RAM
With Ubuntu 8.10 hibernate and suspend work out of the box. If you install the binary NVIDIA driver, you have to add the NvAGP option to xorg.conf (see the relevant section).

Other devices
The system reports temperature information from ACPI by default. To view it, use: cat /proc/acpi/thermal_zone/THRM/temperature

In addition, special steps may need to be taken for the following:


 * Infrared port - drivers are present in the stock kernel and load automatically. If it does not work, make sure you have it enabled in BIOS. Application support is rather flimsy though.
 * Secure Digital card reader - This is based on the Texas Instruments PCI1620 chipset, and is very hard to get working, because it is completely undocumented. Cheap USB-based card readers will work without problems, so they are currently a better option.
 * Modem - should probably be handled by snd_intel8x0m, not tested. There's little use for it nowadays.

Onscreen Keyboard at Login
Ubuntu users from 6.10 on can use the OnBoard virtual keyboard at the login prompt. It works better with Ubuntu 8.04 and later, because setting the keyboard's position and size at the command line is supported.
 * Make sure that you are using the "plain" or "plain with face browser" (recommended) option from the System->Administration->Login Window menu item. Themed login windows will not work!  You must also be sure that the title bar option is active.
 * Edit the /etc/X11/gdm/Init/Default or /etc/gdm/Init/Default (whichever exists) and add "onboard &" between the last "fi" and "exit 0"


 * 1) sudo gedit /etc/X11/gdm/Init/Default

fi fi onboard -s 684x200 -x 170 -y 568 & exit 0

These values will display the keyboard roughly two thirds of the screen wide at the bottom. Tweak the numbers to your liking. An alternative is to use xvkbd for this purpose. First install the package (unsurprisingly, it's named xvkbd</tt>). The relevant command to put in the gdm script is:

xvkbd -geometry 684x200+170+568 -no-keypad 2&>/dev/null &

Finally, you can enable autologin in System->Administration->Login Window in Gnome, but also put the keyboard line in the init script; otherwise you won't be able to log back in if you log out.

Allowing GNOME gksu to use onscreen keyboards
GNOME's graphical su / sudo frontend, gksu, by default grabs the focus, keyboard and mouse to prevent malicious applications from capturing and then automatically supplying the password. However, this also prevents onscreen keyboards from working at the gksu prompt. To allow this, Use the gconf-editor</tt> program (usually in Applications -> System Tools -> Configuration Editor). Find the key /apps/gksu/disable-grab</tt> and turn it on. This will prevent gksu from grabbing focus and all input. You can then input the password the normal way, using Xvkbd, GOK, OnBoard, etc. Be aware though that this is a potential security vulnerability.

Onscreen keyboard in GNOME screen unlock
GNOME screensaver locks the screen by default. However, when you want to log back in, there is no onscreen keyboard. Fortunately, gnome-screensaver supports embedding an onscreen keyboard widget into the screensaver using the XEmbed protocol. One of such keyboard widgets is the Matchbox desktop environment virtual keyboard. Here is how to set it up to display at GNOME screen unlock prompt: Now select System -> Quit... -> Lock Screen from the GNOME menu, and when you try to unlock, the keyboard will appear underneath the unlock prompt.
 * Install the package and dependencies: sudo apt-get install matchbox-keyboard</tt>
 * Open <tt>gconf-editor</tt>. Find the key directory <tt>/apps/gnome-screensaver</tt>.
 * Inside that directory, turn on the boolean key <tt>embedded_keyboard_enabled</tt>.
 * Change the value of the key <tt>embedded_keyboard_command</tt> to <tt>matchbox-keyboard --xid</tt>

Matchbox keyboard seems to default to the UK keyboard layout. If you prefer the US layout, go to <tt>/usr/share/matchbox-keyboard</tt>. Copy the file <tt>keyboard-us.xml</tt> to <tt>$HOME/.matchbox/keyboard.xml</tt>. This file will override any default ones. You can tweak the copied file - it has a simple XML syntax. There are further notes in the README: SVN version of the Matchbox Keyboard readme

Rotation control for GNOME
There is a handy GNOME panel applet, Grandr. Compile or install from the .deb then restart the GNOME Panel for it to show up in the applet selector $ killall gnome-panel It works well with TwinView setups too. Currently it does not rotate the stylus (this may be added to Grandr in future) but a small script can be run after login to periodically check the orientation and rotate the stylus accordingly. $ gedit ~/wacom-rotate.sh
 * Create the following script

IFS=$'\n' DEVS=`xsetwacom list dev | \ sed -e 's/ *$//g' -e 's/\(.*\) .*/\1/g' -e 's/ *$//g'` function rotate_devices {   for DEV in $DEVS; do       xsetwacom set $DEV rotate $1 done } while xset q >/dev/null 2>&1; do   sleep 2 # Polling Interval, 2 seconds ROTATION=`xrandr --verbose --query | \ grep 'default connected' | \ sed -e 's/^.*(.*) \(.*\) (.*).*$/\1/'` case $ROTATION in     normal)   rotate_devices none ;;      left)     rotate_devices ccw  ;; right)   rotate_devices cw   ;;      inverted) rotate_devices half ;; esac done
 * 1) !/bin/sh
 * 2) Based on work from Patrick Coke & Tim Pope
 * 3) Modified for TC1100 by Francisco Athens
 * 4) Rewritten for current xsetwacom and xrandr vesrions by Krzysztof Kosiński
 * 1) Rotate all detected wacom devices to the given direction.

$ chmod u+x ~/wacom-rotate.sh
 * Make the script executable
 * Open System->Preferences->Sessions and add the script to your startup.

Desktop-agnostic Rotation Control script
This script is a desktop-agnostic equivalent to the above. Running the script gets the current rotation status then toggles between horizontal and vertical alignment. It depends on xrandr presence, and the device strings may be distribution-specific.

user@host:~$ xsetwacom --list dev Serial Wacom Tablet eraser ERASER Serial Wacom Tablet STYLUS
 * Before making the script, check the device strings:

"ERASER" and "STYLUS" are device types, and should be left off of the strings in the script below.


 * Create a script using the editor of your choice. If the device strings above are different, fill them in below as appropriate.

xsetwacom get "Serial Wacom Tablet" rotate | grep NONE if [ $? = 0 ]; then xrandr -o left xsetwacom set "Serial Wacom Tablet" rotate ccw xsetwacom set "Serial Wacom Tablet eraser" rotate ccw else xrandr -o normal xsetwacom set "Serial Wacom Tablet" rotate none xsetwacom set "Serial Wacom Tablet eraser" rotate none fi
 * 1) !/bin/bash

user@host:~$ chmod +x manual_rotate.sh
 * Set executable

Assign your new script to a shortcut, button binding, etc, and enjoy!

Bindings for the Stylus Buttons
The stylus buttons can be made to work using a patch to the Wacom drivers. To assign them to the actions they were meant to, you need to install some programs: sudo apt-get install xbindkeys xournal xvkbd Additionally, you'll need this simple script that rotates the screen. See the Rotation section on how to configure the display for dynamic rotation.
 * 1) !/usr/bin/env bash

IFS=$'\n' DEVS=`xsetwacom list dev | \ sed -e 's/ *$//g' -e 's/\(.*\) .*/\1/g' -e 's/ *$//g'` ROTATION=`xrandr --verbose --query | \ grep 'default connected' | \ sed -e 's/^.*(.*) \(.*\) (.*).*$/\1/'`

function rotate_devices {  for DEV in $DEVS; do      xsetwacom set $DEV rotate $1 done }
 * 1) Rotate all detected wacom devices to the given direction.

if ! $ROTATION == "normal" ; then xrandr -o normal rotate_devices none else xrandr -o left rotate_devices ccw fi exit 0 Name this script rotate.sh, make it executable and put it somewhere in your path (eg. <tt>/usr/bin</tt>).

Edit the file <tt>~/.xbindkeysrc</tt> and put these lines in: "rotate.sh" b:30 "xournal" b:31 "xvkbd" b:32 To activate the new bindings, execute <tt>xbinkeys</tt> in a terminal. Also, add xbindkeys to your startup programs in GNOME (System -> Preferences -> Sessions) to activate the bindings on system startup. You can substitue <tt>xvkbd</tt> with a different onscreen keyboard of your choice (<tt>onboard</tt>, <tt>gok</tt>, etc.).

Compiz Fusion
TC1100's graphics card is capable of running Compiz Fusion with decent performance. Desktop wall, wobbly windows, animations and window switchers work very well. Transparent cube or demanding animations (Burn, Beam Up, etc.) are rather slow for everyday use.

All you need to do in Ubuntu 8.10 is to install the NVIDIA binary driver, then go to System -> Preferences -> Appearance, select the Visual Effects tab, and check the option of your choice. "Normal" works reasonably well, while "Extra" is a little slow. For more detailed configuration, install <tt>compizconfig-settings-manager</tt> - you can then access Compiz settings under the "Custom" option in the Visual Effects tab.

If you need to regularly turn off Compiz from time to time, a little program called Fusion Icon will come in handy. Search in the Ubuntu formus for a deb package.

General

 * Ubuntu 10.04 on tc1100 (setup guide)
 * Ubuntu 9.10 on tc1100 (setup guide)
 * Debian on tc1100 (debian/rules)
 * Ubuntu Nvidia Driver Suspend Guide
 * Ubuntu Nvidia ACPI Support Bugtracker
 * Debian on an HP/Compaq TC1100 tablet PC (Shyish-person)
 * HP/Compaq TC1000/TC1100 Service and Maintenance Guide - very detailed hardware info with illustrations
 * introductory description of the TC1100

Drivers and apps
The following list applies specifically to the tc1100. See Tablet PC for a more comprehensive list that applies to tablets in general.


 * NVIDIA 96.43.05 drivers on Linux 2.6.25 (nvnews.net)
 * Intel® PRO/Wireless 2100 Driver for Linux (ipw2100.sourceforge.net)