Como configurar uma tablet Genius no Linux?

Ahoy!!!

Bom, após chegar do trabalho, resolvi ver como poderia resolver o meu dilema (diga-se de passagem, eu tinha tentado ontem!).

Resolvi! A minha tablet Genius está funcionando. Não sei se perfeitamente, pois ainda não testei o suficiente, mas consegui utilizá-la no The Gimp.

Seguem os passos que fiz para colocá-la funcionando:

Primeiramente, baixei o driver wizardpen_drv do site: http://code.google.com/p/linuxgenius/

Bom, eu baixei o código fonte e compilei, uma vez que o .deb está para a arquitetura i386.

Obs.: Você deve instalar os seguintes pacotes no Debian:

sudo apt-get install xutils libx11-dev libxext-dev build-essential xautomation xinput xserver-xorg-dev

Carregue os seguintes módulos:

# modprobe acecad
# modprobe evdev

Após todo o procedimento, coloque esses módulos em /etc/modules para que os mesmos sejam carregados na inicialização.

Para saber para qual evento a sua tablet está enviando os sinais, dê um cat /proc/bus/input/devices e procure pela linha da sua tablet, por exemplo:

I: Bus=0003 Vendor=5543 Product=0005 Version=0100
N: Name=”UC-LOGIC Tablet WP8060U”
P: Phys=usb-0000:00:04.0-5/input0
S: Sysfs=/class/input/input9
U: Uniq=
H: Handlers=mouse1 event5
B: EV=1f
B: KEY=c01 3f0001 0 0 0 0
B: REL=303
B: ABS=100000f
B: MSC=10

No meu caso, event 5.

Use o comando wizardpen-calibrate, dentro de wizardpen-xx/calibrate da seguinte forma, para obter os valores das opções de calibragem:

# wizardpen-calibrate /dev/input/eventX

Edite o seu /etc/X11/xorg.conf e acrescente as seguintes linhas:

Section “InputDevice”
Identifier      “Tablet Genius”
Option          “SendCoreEvents”        “true”
Driver          “wizardpen”
Option          “Device”        “/dev/input/eventX” <– Onde X é o número do evento da sua tablet
Option          “TopX”          “298″
Option          “TopY”          “1504″
Option          “BottomX”       “32598″
Option          “BottomY”       “32356″
Option          “MaxX”          “32598″
Option          “MaxY”          “32356″
EndSection

Section “ServerLayout”
Identifier      “Default Layout”
Screen          “Default Screen”
InputDevice     “Generic Keyboard”
InputDevice     “Configured Mouse”
InputDevice     “Tablet Genius” “AlwaysCore”
EndSection

Para o Xorg, versão maior que 7.3, após instalar o driver, use o comando:

# grep -i name /proc/bus/input/devices

N: Name=”Power Button (FF)”
N: Name=”Power Button (CM)”
N: Name=”AT Translated Set 2 keyboard”
N: Name=”PC Speaker”
N: Name=”A4Tech PS/2+USB Mouse”
N: Name=”saa7134 IR (Encore ENLTV-FM)”
N: Name=”UC-LOGIC Tablet WP8060U”

Crie o arquivo /etc/hal/fdi/policy/99-x11-wizardpen.fdi e coloque as seguintes linhas:

<?xml version=”1.0″ encoding=”ISO-8859-1″ ?>
<deviceinfo version=”0.2″>
<device>
<!– This MUST match with the name of your tablet –>
<match key=”info.product” contains=”Nome da tablet obtida como manda acima“>
<merge key=”input.x11_driver” type=”string”>wizardpen</merge>
<merge key=”input.x11_options.SendCoreEvents” type=”string”>true</merge>
<merge key=”input.x11_options.TopX” type=”string”>5619</merge>
<merge key=”input.x11_options.TopY” type=”string”>6554</merge>
<merge key=”input.x11_options.BottomX” type=”string”>29405</merge>
<merge key=”input.x11_options.BottomY” type=”string”>29671</merge>
<merge key=”input.x11_options.MaxX” type=”string”>29405</merge>
<merge key=”input.x11_options.MaxY” type=”string”>29671</merge>
</match>
</device>
</deviceinfo>

Reinicie o computador e faça os testes.

Ja ne!!!

Atualização:

Recentemente eu atualizei o Xorg e o tablet parou de funcionar. Após algumas pesquisas, encontrei o seguinte patch para compilar os drivers com o Xorg 1.7:

<Código do patch>

diff –git a/src/wizardpen.c b/src/wizardpen.c
index 44205fe..8cbad09 100755
— a/src/wizardpen.c
+++ b/src/wizardpen.c
@@ -57,6 +57,7 @@
#include <xf86Xinput.h>
#include <exevents.h>
#include <xf86Module.h>
+#include <xserver-properties.h>

#include <string.h>
#include <stdio.h>
@@ -216,7 +217,7 @@ static char wizardpen_name_default[10] = “  TABL”;

#ifdef LINUX_SYSFS
static char usb_bus_name[4] = “usb”;
-static char acecad_driver_name[11] = “usb_wizardpen”;
+static char acecad_driver_name[14] = “usb_wizardpen”;
#endif

static Bool
@@ -623,6 +624,10 @@ static Bool
DeviceInit (DeviceIntPtr dev)
{
int rx, ry;
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+       Atom *buttonLabels = NULL;
+       Atom *axisLabels = NULL;
+#endif
LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate;
WizardPenPrivatePtr priv = (WizardPenPrivatePtr) (local->private);
priv->wizardpenOldX = 0;
@@ -633,19 +638,46 @@ DeviceInit (DeviceIntPtr dev)
xf86MsgVerb(X_INFO, 4, “%s Init\n”, local->name);

/* 3 buttons changed to SIX */
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+       axisLabels = (Atom *) xcalloc(3, sizeof(Atom));
+       axisLabels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X);
+       axisLabels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y);
+       axisLabels[2] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Z);
+       buttonLabels = (Atom *) xcalloc(6, sizeof(Atom));
+       buttonLabels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT);
+       buttonLabels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT);
+       buttonLabels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE);
+       buttonLabels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_3);
+       buttonLabels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_4);
+       buttonLabels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_5);
+    if (InitButtonClassDeviceStruct (dev, 6, buttonLabels, map) == FALSE)
+#else
if (InitButtonClassDeviceStruct (dev, 6, map) == FALSE)
+#endif
{
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+               xfree(axisLabels);
+               xfree(buttonLabels);
+#endif
xf86Msg(X_ERROR, “%s: unable to allocate ButtonClassDeviceStruct\n”, local->name);
return !Success;
}

if (InitFocusClassDeviceStruct (dev) == FALSE)
{
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+               xfree(axisLabels);
+               xfree(buttonLabels);
+#endif
xf86Msg(X_ERROR, “%s: unable to allocate FocusClassDeviceStruct\n”, local->name);
return !Success;
}

if (InitPtrFeedbackClassDeviceStruct(dev, ControlProc) == FALSE) {
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+               xfree(axisLabels);
+               xfree(buttonLabels);
+#endif
xf86Msg(X_ERROR, “%s: unable to init ptr feedback\n”, local->name);
return !Success;
}
@@ -655,12 +687,19 @@ DeviceInit (DeviceIntPtr dev)
if (InitValuatorClassDeviceStruct (
dev,
3,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+                               axisLabels,
+#endif
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
xf86GetMotionEvents,
#endif
local->history_size,
((priv->flags & ABSOLUTE_FLAG)? Absolute: Relative)|OutOfProximity) == FALSE)
{
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+               xfree(axisLabels);
+               xfree(buttonLabels);
+#endif
xf86Msg(X_ERROR, “%s: unable to allocate ValuatorClassDeviceStruct\n”, local->name);
return !Success;
}
@@ -669,6 +708,9 @@ DeviceInit (DeviceIntPtr dev)

InitValuatorAxisStruct(dev,
0,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+                               axisLabels[0],
+#endif
0,                     /* min val */
/*screenInfo.screens[0]->width,*/      /* max val */
screenmaxx,                    /* max val */
@@ -677,6 +719,9 @@ DeviceInit (DeviceIntPtr dev)
1000);                 /* max_res */
InitValuatorAxisStruct(dev,
1,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+                               axisLabels[1],
+#endif
0,                     /* min val */
/*screenInfo.screens[0]->height,*/     /* max val */
screenmaxy,    /* max val */
@@ -685,6 +730,9 @@ DeviceInit (DeviceIntPtr dev)
1000);                 /* max_res */
InitValuatorAxisStruct(dev,
2,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+                               axisLabels[2],
+#endif
0,                     /* min val */
/*priv->bottomZ,*/     /* max val */
1023,
@@ -703,6 +751,10 @@ DeviceInit (DeviceIntPtr dev)

if (InitProximityClassDeviceStruct (dev) == FALSE)
{
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7
+               xfree(axisLabels);
+               xfree(buttonLabels);
+#endif
xf86Msg(X_ERROR, “%s: unable to allocate ProximityClassDeviceStruct\n”, local->name);
return !Success;
}

4 comentários

Newreason_04610193137615737882outubro 23rd, 2009 at 8:19

Maravilha, mal posso esperar para ver os primeiros desenhos.

Stilloutubro 23rd, 2009 at 12:41

Muita calma nessa hora!!! :)
Ainda estou brincando com ela para saber como utilizar e qual o melhor programa a utilizar. Até agora, o MyPaint está dando show.
Assim que eu fizer alguma coisa que preste, eu coloco aqui no blog.

[]‘s,

Still

billjaneiro 9th, 2010 at 17:25

alguma noticia sobre oi telecom no parana e qual empreiteira assume dia 01/02/2010

Stilljaneiro 10th, 2010 at 16:52

Oi Bill;

Até então, a Alcatel-Lucent continua na Região II. Não sei se o contrato fechado com a Oi autoriza a “quarteirização” do serviço como era feita antigamente.

[]‘s,

Still

Deixe um comentário

Your comment