Showing posts with label apt-2. Show all posts
Showing posts with label apt-2. Show all posts

Monday, June 22, 2009

::Updated:: A guide to getting the Digipro T-8000U Tablet to work with OpenSUSE

This post supersedes my previous one. It fixes the bugs that were in that one.

This guide will get the Digipro T-8000U tablet working with OpenSUSE 11.1.

1. Install the necessary prerequisites. As root:

yast -i gcc xorg-x11-devel xorg-x11-server-sdk


2. Get the latest version of the WizardPen driver, which as of now is 0.7.0a2. It is available on a Microsoft website (don't ask me why):

http://cid-43438aff38d34c29.skydrive.live.com/self.aspx/Public/wizardpen/wizardpen-0.7.0-alpha2.tar.gz

Untar, configure, and compile it. Do not install it.

tar xvzf wizardpen-0.7.0-alpha2.tar.gz
cd wizardpen-0.7.0-alpha2
./configure && make


3. The Makefile installs the driver where Xorg won't find it, so you have to install it manually. As root:

cp src/wizardpen_drv.la /usr/lib/xorg/modules/input
cp src/.libs/wizardpen_drv.so /usr/lib/xorg/modules/input


4. You need to find the device associated with the tablet. First, do:

grep Name /proc/bus/input/devices


Look for something that looks like your tablet. Mine was "Aiptek". If nothing sticks out, you can do an:

lsusb


to find the full name of the tablet and compare that with the output from "grep Name /proc/bus/input/devices".

Then do (assuming your tablet's name is Aiptek):

lshal | grep "input.product = 'Aiptek'" -A 20 -B 20 | grep input.device


This should produce a single line with your device. Mine was /dev/input/event7. If this doesn't work, do a "lshal" and search through the output until you find the string.

5. Download and run this calibration routine. The one that is provided with the WizardPen code does not calibrate in the Z-direction, which is critical to getting the pressures to work.

wget http://www.filefactory.com/file/ag8g447/n/wizardpen-calibrate_c wizardpen-0.7.0-alpha2/calibrate/wizardpen-calibrate.c
cd wizardpen-0.7.0-alpha2/calibrate
make
sudo ./wizardpen-calibrate /dev/input/event7


6. As root, edit /etc/X11/xorg.conf. Add a section that reads:

Section "InputDevice"
Driver "wizardpen"
Identifier "WizardTablet"
Option "Device" "/dev/input/event7"
Option "TopX" "0"
Option "TopY" "0"
Option "TopZ" "54"
Option "BottomX" "3000"
Option "BottomY" "2200"
Option "BottomZ" "511"
Option "MaxX" "3000"
Option "MaxY" "2200"
Option "MaxZ" "511"
EndSection


where all of the numbers are from the calibration program in step 5. In the ServerLayout section, add a line that reads:

  InputDevice  "WizardTablet"  "AlwaysCore"


7. Reboot.

The tablet should be working now. To use it in Gimp, you need to go to Edit, Preferences, Input Devices, Configure Extended Input Devices, and for the WizardTablet device, set the Mode to Screen. Be warned, with an extended input device (the tablet) enabled in Gimp the mouse can no longer be used to draw. However, disabling the tablet re-enables the mouse. See this GTK bug for more details.

There is one lingering bug and that is that hotplugging does not work. I'll look at this sometime over the next week. Until then, you'll need to have the devices you want to use plugged in at boot.

---===Very Important===--- If you have a dynamic collection of input devices, where what you have plugged into the computer changes from boot to boot, you'll need to make a couple of small modifications to your xorg.conf. These corrections are necessary if you want to, for example, use a USB mouse occasionally. You need to replace the "/dev/input/DEVICE" lines with either the "/dev/input/by-path/DEVICE_PATH" or "/dev/input/by-id/DEVICE_ID" for your device. You can find out what this are by doing a:

find /dev/input


with and without the device plugged in and then comparing the outputs. There will be two files associated with each device. For mice, use the one without "event" on the end and for the tablet, use the one with "event" on the end.

Thursday, June 18, 2009

A *rough* guide to getting the Digipro T-8000U Tablet to work with OpenSUSE

This post has been superseded by this new one. It fixes the bugs that were in this one.

This guide will get the Digipro T-8000U tablet working with OpenSUSE 11.1. However, following this guide will break a couple of things:

-X will fail if the tablet is not plugged in.
-Gimp will not longer allow you to draw with the mouse.

I think I know how to fix both. I'll test and post fixes for both over the weekend. Also, the calibration that I give here is specific to my tablet. I had to write my own code to get the correct calibration (the calibration included with the WizardPen driver doesn't handle pressures correctly). I'll post that as well this weekend.

1. Install the necessary prerequisites. As root:

yast -i gcc xorg-x11-devel xorg-x11-server-sdk


2. Get the latest version of the WizardPen driver, which as of now is 0.7.0a2. It is available on a Microsoft website (don't ask me why):

http://cid-43438aff38d34c29.skydrive.live.com/self.aspx/Public/wizardpen/wizardpen-0.7.0-alpha2.tar.gz

Untar, configure, and compile it. Do not install it.

tar xvzf wizardpen-0.7.0-alpha2.tar.gz
cd wizardpen-0.7.0-alpha2
./configure && make


3. The Makefile installs the driver where Xorg won't find it, so you have to install it manually. As root:

cp src/wizardpen_drv.la /usr/lib/xorg/modules/input
cp src/.libs/wizardpen_drv.so /usr/lib/xorg/modules/input


4. You need to find the device associated with the tablet. First, do:

grep Name /proc/bus/input/devices


And look for something that looks like your tablet. Mine was "Aiptek". Then do:

lshal | grep "input.product = 'Aiptek'" -A 20 -B 20 | grep input.device


This should produce a single line with your device. Mine was /dev/input/event7. If this doesn't work, do a "lshal" and search through the output until you find the string.

5. As root, edit /etc/X11/xorg.conf. Add a section that reads:

Section "InputDevice"
Driver "wizardpen"
Identifier "WizardTablet"
Option "Device" "/dev/input/event7"
Option "TopX" "0"
Option "TopY" "0"
Option "TopZ" "54"
Option "BottomX" "3000"
Option "BottomY" "2200"
Option "BottomZ" "511"
Option "MaxX" "3000"
Option "MaxY" "2200"
Option "MaxZ" "511"
EndSection


And in the ServerLayout section, add a line that reads:

  InputDevice  "WizardTablet"  "AlwaysCore"


---===Very Important===--- My xorg file already had two input device sections, one for my touchpad and another where it had detected the tablet as a mouse. I had to delete that extra mouse section before the tablet would be correctly recognized. Otherwise, Xorg uses the wrong mouse driver and your tablet will only half work.

6. Reboot.


The tablet should be working now. To use it in Gimp, you need to go to Edit, Preferences, Input Devices, Configure Extended Input Devices, and for the WizardTablet device, set the Mode to Screen.

Like I said above, this is a very rough guide. I'll clean it up in a few days and repost then.