In this HOW TO we will download the source code from the Linux Wacom Project site, compile it, and then copy the driver to the correct module section. Then we will add the appropriate entries to xorg.conf to detect the tablet inputs. Next using wacomcpl we calibrate the tablet inputs to configure a .xinitrc file. This will give us a working Tablet PC.
Section 1: Download source code, compile, and install linuxwacom kernel driver/module.
Currently at Linux Wacom Project the drivers available are:
… Production: 0.8.2-2 ….. Development: 0.8.3-5
(Just substitute the driver # you want in the following commands. It is better to copy and paste the commands into a terminal rather than type them.)
1) First download the source code tar onto the desktop. In a terminal type:
cd ./Desktop wget http://prdownloads.sourceforge.net/linuxwacom/linuxwacom-0.8.2-2.tar.bz2
2) Next install the needed libraries, packages and updates using the following apt-get commands.
sudo apt-get update sudo apt-get install build-essential libx11-dev libxi-dev x11proto-input-dev xserver-xorg-dev tk8.4-dev tcl8.4-dev libncurses5-dev sudo apt-get upgrade sudo apt-get install wacom-tools xserver-xorg-input-wacom sudo apt-get purge wacom-tools xserver-xorg-input-wacom
3) Now the kernel headers for your kernel are needed. To determine your kernel version:
uname -r
If you have the generic kernel:
sudo apt-get install linux-headers-generic
If you have the rt kernel:
sudo apt-get install linux-headers-rt
(Remember if you update to a newer kernel, then the module won’t work on restart because the module is compiled for a specific kernel. You will have to recompile the module for the newer kernel.)
4) Okay now unpack the source code tar and go into the unpacked source code directory.
tar xjvf linuxwacom-0.8.2-2.tar.bz2 cd linuxwacom-0.8.2-2
5) Then we compile and install the linuxwacom kernel module.
(To see the options the linuxwacom configure script offers you type “./configure –help | less”.)
./configure --enable-wacom --prefix=/usr make
(using –prefix=/usr installs to /usr instead of the default /usr/local)
sudo make install
(Don’t worry if this returns an error saying “wacom” is not loaded. It just means you’ve never installed wacom before.)
6) Next we copy the module to the appropriate directory:
sudo cp ./src/2.6.27/wacom.ko /lib/modules/`uname -r`/kernel/drivers/input/tablet/wacom.ko
For Jaunty use:
sudo cp ./src/2.6.28/wacom.ko /lib/modules/`uname -r`/kernel/drivers/input/tablet/wacom.ko
(The driver (wacom.ko) inside the kernel translates the raw data into system data and sends that to Xinput/Xserver where XFree86’s Wacom X driver (wacom_drv.o) takes control.)
7) You now need to restart. The kernel module should then be installed. You may need to restart several times.
(If after more than a few restarts it still isn’t working try repeating step 6) again. In other words go back into the unpacked source code directory and repeat the “sudo cp etc.” command and then restart. Or try martinjochimsen’s fix in post #3 below.)
8] To verify the linuxwacom kernel module is present:
lsmod modinfo -d wacom
(The module is called “wacom”, not “linuxwacom”.)
Section 2: Configure xorg.conf
In order to tell Xserver you have a Tablet PC you need to add input sections to your xorg.conf, which is located in “/etc/X11/”. Wacom entries used to be included in the xorg.conf of previous versions of Ubuntu before Intrepid. Sample xorg.conf’s are attached below. Either add the relevant sections to your xorg.conf or replace your xorg.conf completely. If you decide to replace your xorg.conf with one of the attached ones be sure it is the one for your laptop. Please study the sample xorg.conf and compare it carefully to your xorg.conf before making any changes. And be sure to back up your xorg.conf first!
To edit xorg.conf you have to be administrator so in a terminal:
gksudo gedit /etc/X11/xorg.conf
Let’s look at an example (one that uses all of linuxwacom’s Tablet PC features). For a HP TX2000 you need to add the following InputDevice Sections.
Section "InputDevice"
Identifier "stylus"
Driver "wacom"
Option "Device" "/dev/input/by-path/pci-0000:00:0b.1-usb-0:2.3:1.0-event-mouse"
Option "Type" "stylus"
Option "USB" "on"
Option "Button2" "3" # make side-switch a right button
Option "TopX" "225"
Option "TopY" "225"
Option "BottomX" "26300"
Option "BottomY" "16375"
EndSection
Section "InputDevice"
Identifier "eraser"
Driver "wacom"
Option "Device" "/dev/input/by-path/pci-0000:00:0b.1-usb-0:2.3:1.0-event-mouse"
Option "Type" "eraser"
Option "USB" "on"
EndSection
Section "InputDevice"
Identifier "touch"
Driver "wacom"
Option "Device" "/dev/input/by-path/pci-0000:00:0b.1-usb-0:2.3:1.1-event-"
Option "Type" "touch"
Option "USB" "on"
Option "TopX" "200"
Option "TopY" "225"
Option "BottomX" "4000"
Option "BottomY" "3875"
EndSection
(The four options ( TopX to BottomY) in the stylus and touch sections are there to provide crude calibration. Once you have calibrated your tablet through wacomcpl (generating a .xinitrc) you can comment them out or remove them. When the user logs in the .xinitrc settings replace the tablet calibration settings in xorg.conf. But if you want all users to have the same calibration settings you can convert your .xinitrc settings to xorg.conf settings. Appendix 2 below explains how.)
You also need to add the following three lines:
Inputdevice "stylus" "SendCoreEvents"
Inputdevice "eraser" "SendCoreEvents"
Inputdevice "touch" "SendCoreEvents"
To the “ServerLayout” Section which should be at the bottom of xorg.conf.
Since synaptic touch pad part has the word “touch” in it, it will confuse X and be incorrectly detected. Change the name from:
Identifier "Synaptics Touchpad"
to:
Identifier "Synaptics Pad"
Also do not forget to rename it in the server layout section! (Renaming is unnecessary starting with Intrepid since HAL comments out the Synaptics Touchpad in xorg.conf and does fine handling it. But if for some reason you want to reactivate the Touchpad in xorg.conf keep this in mind.)
If you want to learn how the “Device” input paths were determined please look at appendix 1 below.
If you are trying to use “/dev/input/wacom” in your xorg.conf and it is not working then there may be a problem with your Wacom symlinks. Please check to see if you have a file called “50-xserver-xorg-input-wacom.rules” (or something similar) located in “/etc/udev/rules.d/”. If not see Appendix 3.
Hopefully this example is illustrative of what is necessary to configure a xorg.conf. Once you have the proper or properly configured xorg.conf restart the Xserver with <ctrl><alt><backspace>.
After you restart the stylus and touch should work, although probably not very calibrated. If it does not, restart again. Make sure you cover the entire screen to see if the pointer moves to the stylus.
Section 3: Calibrating your Tablet PC.
The next step is to calibrate your tablet with the Linux Wacom Project’s calibration gui, wacomcpl.
In a terminal type:
wacomcpl
In the gui click on stylus and calibrate it. Repeat for any other features present (like touch). The gui is straightforward and self-explanatory.
The wacomcpl settings are stored in a .xinitrc file. They only apply during the current session. You can also change your settings on the fly using the xsetwacom parameters in a terminal. To enable the .xinitrc file to apply to Xserver through a reboot you need to:
chmod +x ~/.xinitrc
Then go to System->Preferences->Sessions and click on add and for the command write “~/.xinitrc” (without the quotes). And title it “Wacom Tablet Calibration Settings” or whatever you like.
In Jaunty go to System->Preferences->Startup Applications and click on add and for the command write
“sh /home/yourusername/.xinitrc” (without the quotes).
Now check the file “xinitrc” in “/etc/X11/xinit/”. Everything in it should be commented out. If you see:
# invoke global X session script . /etc/X11/Xsession
comment it out like so:
# invoke global X session script #. /etc/X11/Xsession
This will prevent a “loop” or other oddities when you reboot or restart X.
You should now have functioning Wacom on your tablet pc! Congratulations!
Next to get a completely functioning Tablet PC (the ability to rotate your screen from laptop to tablet mode) please proceed to the Rotation HOW TO at: http://ubuntuforums.org/showthread.p…92#post6274392
Appendix 1: How to Determine Device Input for xorg.conf
The following steps will determine USB input for xorg.conf. First we need to query the kernel buffer for tablet input. In a terminal type:
dmesg | grep Wacom
There should be two lines similar to this.
[ 45.460644] input: Wacom ISDv4 93 as /devices/pci0000:00/0000:00:0b.1/usb2/2-2/2-2.3/2-2.3:1.0/input/input9 [ 45.478030] input: Wacom ISDv4 93 as /devices/pci0000:00/0000:00:0b.1/usb2/2-2/2-2.3/2-2.3:1.1/input/input10
Next we list the USB input files in “/dev/input/by-path” using the long listing format. Type:
Code: ls -l /dev/input/by-path
Which should give you something similar to.
lrwxrwxrwx 1 root root 9 2008-07-27 12:07 pci-0000:00:0b.1-usb-0:2.3:1.0-event-mouse -> ../event9 lrwxrwxrwx 1 root root 9 2008-07-27 12:07 pci-0000:00:0b.1-usb-0:2.3:1.0-mouse -> ../mouse1 lrwxrwxrwx 1 root root 9 2008-07-27 12:07 pci-0000:00:0b.1-usb-0:2.3:1.1- -> ../mouse2 lrwxrwxrwx 1 root root 10 2008-07-27 12:07 pci-0000:00:0b.1-usb-0:2.3:1.1-event- -> ../event10 lrwxrwxrwx 1 root root 9 2008-07-27 12:07 platform-i8042-serio-0-event-kbd -> ../event1 lrwxrwxrwx 1 root root 10 2008-07-27 12:07 platform-i8042-serio-1-event-mouse -> ../event11 lrwxrwxrwx 1 root root 9 2008-07-27 12:07 platform-i8042-serio-1-mouse -> ../mouse3 lrwxrwxrwx 1 root root 9 2008-07-27 12:07 platform-pcspkr-event-spkr -> ../event2
Now we need to find the device input file that matches the output of dmesg. Notice that input9 (from dmesg) matches with event9 (in the ls command). So the USB input file [pci-0000:00:0b.1-usb-0:2.3:1.0-event-mouse] is the one needed for the stylus. And input10 (from dmesg) matches with event10 (in the ls command). So the USB input file [pci-0000:00:0b.1-usb-0:2.3:1.1-event-] is touch.
Now you can just amend your xorg.conf with the two input files that you just determined. The one ending with “mouse” should be in the stylus and eraser sections and the one ending in “event-” should be in the touch section.
Appendix 2: To Make Calibration Available to All Users
To make the calibrations in .xinitrc system wide they can be installed in xorg.conf. Open up .xinitrc and xorg.conf:
gedit ~/.xinitrc & gksudo gedit /etc/X11/xorg.conf
And transfer the .xinitrc settings over to xorg.conf. For example if the line in .xinitrc is [xsetwacom set touch bottomy "3951"] you can use xsetwacom to figure out how to translate it for the xorg.conf. In a terminal type:
Code: xsetwacom -x get touch bottomy
Giving an output of:
Option "BottomY" "3951"
which can be put into xorg.conf under the touch section. Just repeat the “translations” as needed.
Another method would be to copy the lines starting with xsetwacom in ~/.xinitrc to /etc/X11/xinit/xinitrc. This should also make the calibration, etc. settings available to all users.
Appendix 3: Add Wacom Symlinks to “/etc/udev/rules.d”.
First we’ll download the most recent “50-xserver-xorg-input-wacom.rules” dated 3-29-09 from Ron’s Debian git repository onto your desktop. Open a terminal and type:
cd ./Desktop wget -O 50-xserver-xorg-input-wacom.rules "http://git.debian.org/?p=users/ron/wacom-tools.git;a=blob_plain;f=debian/xserver-xorg-input-wacom.udev;hb=e110b046292d6aff63b489c9b1aecec25d470cdb"
This file contains the Wacom symlinks. Then copy “50-xserver-xorg-input-wacom.rules” to “/etc/udev/rules.d/”.
sudo cp ./50-xserver-xorg-input-wacom.rules /etc/udev/rules.d/50-xserver-xorg-input-wacom.rules
In your xorg.conf for “stylus” and “eraser” “InputDevice” sections you would use:
Option "Device" "/dev/input/wacom"
In your “touch” section (if you have it) you’d use:
Option "Device" "/dev/input/wacom-touch"
If the symlink is still not working, perhaps your device is not in the symlink wacom.rules. In a terminal type:
more /proc/bus/input/devices
In the output should be at least one section labeled Wacom. Your vendor and product ID should be in it. The vendor ID for Wacom is Vendor=056a.
If your device is not in the table you may be able to construct a symlink. Using the symlinks in the large “table” as a template construct one using your vendor and product ID. Add it to the end of the table, before “# Convenience links for the common case etc.”. To edit the table use:
gksudo gedit /etc/udev/rules.d/50-xserver-xorg-input-wacom.rules
Or you may want to add a “simpler” symlink to the end of “/etc/udev/rules.d/60-symlinks.rules” (after deleting 50-xserver-xorg-input-wacom.rules?) as in post #9 below.
Related posts:
- New Intel Graphics Drivers for Ubuntu 9.04 (Jaunty)
- Install Google gears for firefox 3.5 in Jaunty Linux
- How to setup a DNS server with bind in Ubuntu linux
- Bluetooth personal area network in ubuntu
- Compiling mplayer with multi-core decoding support in ubuntu linux
- Get SSH back door in linux
- How to block websites in Ubuntu Linux
- Differences between df and du command in linux
- Control Apache with the apachectl command
- Install No Machine NX Server and client

