|
Candidate for Deletion |
Tablets der virker med Wizardpen driveren
Opsætningen er testet med følgende tablets.
Mærker
- Genius Wizardpen
- Genius Mousepen
- iBall
- QWare
- UC-LOGIC
Tablets
- "/sys/bus/usb/devices/*/product" (Output from lsusb)
- Tablet WP4030U
Tablet WP5540U (lsusb: UC-Logic Technology Corp. Genius MousePen 5x4 Tablet)
Tablet WP8060U (Genius MousePen 8x6 Tablet)
If your tablet is not listed here, please ADD it! (If you don't have an account, then email me: danielklejnstrup@gmail.com)
Kendte problemer
Der er nogle problemer der endnu ikke er løst:
* Hotplugging - Driveren understøtter ikke hotplugging - Men denne guide beskriver en delvis workaround.
* HOTSPOTS - Driveren understøtter ikke genvejene på tableten! - Jeg arbejder på det!
Opsætningen af din tablet
Systemkrav
Denne guide er baseret på den nyeste udgave af ubuntu: *ubuntu 6.10 (Edgy Eft)
For en *ubuntu 6.06 (Dapper Drake)-version, se: TabletSetupWizardpenDapper (Engelsk)
USB tablet (Jeg har ikke en seriel tablet, og har derfor ikke mulighed for at teste disse.)
Installér nødvendige pakker
Åbn en terminal.
Installér de nødvendige pakker - Kør denne kommando::
sudo apt-get install xutils libx11-dev libxext-dev x-dev build-essential xautomation xinput
Download og installér driveren
Download wizardpen driveren, og pak den ud - Kør denne kommando:
wget http://www.stud.fit.vutbr.cz/~xhorak28/wizardpen-driver-0.5.0.tar.gz
tar -xvzf wizardpen-driver-0.5.0.tar.gz
cd wizardpen-driver-0.5.0
Fix problemet med kompileringen af driveren under Edgy
Der opstår et problem med kompileringen under Edgy!
For at løse dette, har jeg kompileret driveren selv, og gjort den tilgængelig i binær form.
For at installere "min" driver, kør denne kommando:
wget http://www.dallerweb.dk/dl.php?file=wizardpen_drv.so -O wizardpen_drv.so
sudo cp wizardpen_drv.so /usr/lib/xorg/modules/input/
Hvis du har problemer med at downloade driveren, så skriv: danielklejnstrup@gmail.com
Hvis du hellere vil bruge en browser til at downloade driveren, brug da denne kommando:
http://www.dallerweb.dk/dl.php?file=wizardpen_drv.so
Opsætning af udev (Med en USB tablet)
Tilslut din tablet! (Hvis den da ikke allerede er tilsluttet!)
Tjek hvad enheden bliver kaldt: (product)
Kør denne kommando:
cat /sys/bus/usb/devices/*/product
Outputtet vil se nogenlunde således ud: (afhængigt af dit system!)
Tablet WP8060U UHCI Host Controller UHCI Host Controller UHCI Host Controller EHCI Host Controller
Det vigtige i det ovenstående output, er navnet på din tablet (I mit tilfælde: Tablet WP8060U)
Tilføj en UDEV regel: (BEMÆRK AT SYSFS{product} ER TABLET-SPECIFIK! - Se outputtet fra ovenstående kommando!!!)
Kør disse kommandoer:
sudo bash
echo 'BUS=="usb", KERNEL=="event*", SYSFS{product}=="Tablet WP8060U", NAME="input/%k", SYMLINK+="tablet-event", MODE="0666"' >> /etc/udev/rules.d/010_local.rules
exit
Genstart UDEV, kør denne kommando:
sudo /etc/init.d/udev restart
Tjek om der er blevet oprettet et symlink - Kør denne kommando:
ls -la /dev/tablet-event
Hvis den outputter én linje, betyder det at det virker!
Kalibrering
Bemærk: I undergruppen til dette punkt, har jeg vedlagt output fra forskellige tablets - I tilfælde af at du ikke kan køre "calibrate" kan du bruge dette output.
- Hvis din tablet ikke er listet i denne undergruppe vil jeg meget gerne modtage outputtet via min email.
Hvis du selv vil kalibrere, så fortsæt i dette punkt.
Gå ind i "calibrate"-mappen - Kør denne kommando:
cd calibrate
Byg kalibrerings værktøjet - Kør denne kommando:
make
Kalibrér for at finde det aktive felt på din tablet - Kør denne kommando:
sudo ./wizardpen-calibrate /dev/tablet-event
Gem outputtet (De sidste 8 linjer!) - Du får brug for dette senere!
Kalibrerings output (Hvis calibrate ikke virker!)
Skip denne sektion hvis calibrate virkede for dig!
Tablet W5540U (UC-Logic):
Driver "wizardpen" Option "Device" "/dev/tablet-event" Option "TopX" "2199" Option "TopY" "3598" Option "BottomX" "30325" Option "BottomY" "29278" Option "MaxX" "30325" Option "MaxY" "29278"
Tablet W8060U (UC-Logic):
Driver "wizardpen" Option "Device" "/dev/tablet-event" Option "TopX" "826" Option "TopY" "2626" Option "BottomX" "32747" Option "BottomY" "32762" Option "MaxX" "32747" Option "MaxY" "32762"
Opsætningen af X
Nu er vi klar til at redigere xorg.conf filen!
Tag en backup - Kør denne kommando:
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
Redigér filen - Kør denne kommando:
sudo vi /etc/X11/xorg.conf
Tryk "I" - Så "-- INSERT --" fremkommer i bunden!
Indsæt den følgende section i din xorg.conf fil: (Placér den under "generic mouse"!)
Section "InputDevice" Identifier "WizardPen Tablet" Option "SendCoreEvents" "true" (the output from calibrate) EndSection
Add the following line in the "ServerLayout" section:
InputDevice "WizardPen Tablet" "AlwaysCore"
Save the file, and exit the editor! (Press "ESC" and write ":wq" and press "Enter")
Making X start without a tablet connected
Now, the driver should NOT be initialized, if the tablet is NOT found!
The wizardpen-driver does not support hotplugging, so we should run a script on startup, to define whether or not the tablet is present.
Open /etc/rc.local - Run this command:
sudo vi /etc/rc.local
Press "I" - So that "-- INSERT --" appears!
...and insert some code: (insert it JUST above "exit 0")
XORG_CONF=/etc/X11/xorg.conf if [ -e /dev/tablet-event ]; then sed -ie 's/^\(\s*\)\#\(\s*InputDevice\s\s*\"WizardPen\ Tablet\"\s\s*\"AlwaysCore\"\)\s*$/\1\2/' "$XORG_CONF" echo "Udev created /dev/tablet-event, which means that the tablet is present! - Tablet-driver enabled" else sed -ie 's/\(^\s*InputDevice\s\s*\"WizardPen\ Tablet\"\s\s*\"AlwaysCore\"\)\s*$/\#&/' "$XORG_CONF" echo "Udev did NOT create /dev/tablet-event, which means that the tablet is NOT present! - Tablet-driver disabled" fi
...so that the file looks something like this: (in case you haven't added anything else to the file!)
# # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. XORG_CONF=/etc/X11/xorg.conf if [ -e /dev/tablet-event ]; then sed -ie 's/^\(\s*\)\#\(\s*InputDevice\s\s*\"WizardPen\ Tablet\"\s\s*\"AlwaysCore\"\)\s*$/\1\2/' "$XORG_CONF" echo "Udev created /dev/tablet-event, which means that the tablet is present! - Tablet-driver enabled" else sed -ie 's/\(^\s*InputDevice\s\s*\"WizardPen\ Tablet\"\s\s*\"AlwaysCore\"\)\s*$/\#&/' "$XORG_CONF" echo "Udev did NOT create /dev/tablet-event, which means that the tablet is NOT present! - Tablet-driver disabled" fi exit 0
Save the file, and exit the editor! (Press "ESC" and write ":wq" and press "Enter")
Now you can test udev's ability to detect the tablet - Run this command:
sudo /etc/init.d/rc.local start
The output will tell you if it is present or not! - And it should match reality! (try to disconnect it, and try again! - connect, and then again! - etc...)
You should now be able to restart X and have the tablet working as a mouse.
I'm still working on a way to support hotplugging, but the above code-example will make X start without a present tablet.
Fix the X-freeze problem
This is not possible, if you are running edgy, and not able to compile the driver correctly!
This is a workaround to avoid an X-freeze if you unplug your tablet while X is running.
Open the file wizardpen.c, go to line 632, and remove these 4 lines:
if ((local) && (local->fd)) xf86CloseSerial(local->fd); if (local) xf86DeleteInput(local, 0);
These 4 lines deactivate the driver after an unplug, which is a good thing in itself. The sad thing is that xorg doesn't understand such a deactivation.
After removing the lines, you should compile the driver again - Run this command:
xmkmf && make
Copy the newly-compiled driver to the driver directory - Run this command:
sudo cp wizardpen_drv.so /usr/lib/xorg/modules/input/
Configuring the buttons on the pen
I'm working on a wizard for this task!
In the meantime, look into the package "xinput" which is installed first in this guide.
Here is a list of numbers with their corresponding function:
Number |
Function |
0 |
No action (only movement) |
1 |
Left button click |
2 |
Middle Button click |
3 |
Right Button click |
4 |
Scroll up (one click equals one step of scroll wheel in my logitech mouse) |
5 |
Scroll down |
Configuring the tablet HOTSPOTS
I'm working on a daemon for this task!
It's working almost well so far, just need a little tweaking, and making it start automatically.
The biggest problem is to execute the commands as child-processes (so that a failure, doesn't cause the daemon to die!)
Configuring different applications to work with the tablet
For "The GIMP" - See: TabletSetupGIMP
For "Inkscape" - See: TabletSetupInkscape
Troubleshooting - See this if you have any problems
I have followed the guide without getting errors, but it still doesn't work!
On edgy you will get no errors if you compile the driver yourself.
But for some reason, the compilation is flawed! (because of the new GCC version)
You can see these errors by running this command:
cat /var/log/Xorg.0.log | grep "wizardpen"
See this for a fix:
https://help.ubuntu.com/community/TabletSetupWizardpen#head-2b7a38de2ee5f77258591f0f1e7984a761bed268
The Xserver is not starting after playing with the xorg.conf file
Wow - That's bad! - First of all, check that you set everything right!
Well, I suggest that you drop me an email, telling me what went wrong!
And then just restore the backup we created - run this command:
sudo cp /etc/X11/xorg.conf.backup /etc/X11/xorg.conf
Everything seems to work, except pressure sensitivity
All the tablets mentioned in "known tablets" has pressure sensitivity support in Linux!
Please make sure that your favourite application supports pressure sensitivity.
Application |
Support for pressure sensitivity |
Krita |
No support |
Inkscape |
Full support |
Gimp |
Full support |
Please tell me about other applications!
I have problems not solved by the above troubleshooting
Please mail me on: danielklejnstrup@gmail.com
Did it work?
Please mail (danielklejnstrup@gmail.com) me your experiences with this guide!
If you have any suggestions, also let me know!
Thank you!