Thread: [DIGImend-devel] Genius PenSketch 12x9 in Ubuntu Precise (12.04)
Brought to you by:
spb_nick
|
From: Favux ... <fav...@gm...> - 2012-07-23 19:10:27
|
Hi Nick, I have a Genius PenSketch 12x9 user on Ubuntu forums. Originally he was using Natty (11.04) and wanted to modify his tablet's aspect ratio. We figured that out. Then he upgraded to Precise (12.04) because he wanted to install the new Gimp 2.8 over the default Gimp 2.6. After he did that all was well. Then he added the custom .conf file to modify the aspect ratio and the tablet stopped drawing. Removal of the custom .conf didn't fix things. Also since installing Gimp 2.8 was about the first thing he did a bunch of updates for Precise were installed, maybe at about the same time as the .conf file. He can't remember quite when or what they were. Bus 003 Device 003: ID 5543:0042 UC-Logic Technology Corp. Tablet PF1209 xinput list: ⎜ ↳ 9x12 Tablet id=10 [slave pointer (2)] ⎜ ↳ 9x12 Tablet id=11 [slave pointer (2)] ⎜ ↳ 9x12 Tablet id=12 [slave pointer (2)] In Xorg.0.log we see the the 3 event nodes. The first and third have the identifier "evdev tablet catchall" while the second has "evdev pointer catchall". Are there suppose to be two event nodes matching MatchIsTablet? It appears the pen may be on the third event which may be why the pen isn't working in Gimp 2.8. It still has the issue/bug Viktoria.S described where it is showing one input device, namely "9x12 Tablet" in its Configure Extended Input Devices dropdown. Because by happy chance the pen was the first device Vicktoria.S reported things were OK for drawing even so. I can't explain how the pen event changed from the first to third for the PenSketch if that is what happened. Maybe the updates? So <device names> that are different would be good. I was wondering if maybe that could be done through udev rules. That would be one step up from the linux wacom X driver appending the different input tool types but still not require kernel driver changes. So far in udevadm info I do not see a difference. In other words I cannot find whatever MatchIsTablet, MatchIsPointer, or MatchIsKeyboard is matching to in udev. In the PF1209's case is it the HID report descriptor's "Usage (Stylus)" that triggers MatchIsTablet? And "Usage (Mouse)" for MatchIsPointer? Do you know if that shows up in udev and if it does how does it show up? Favux |
|
From: Viktoria S. <vik...@fr...> - 2012-07-24 04:47:55
|
Hi! I have couple of suggestions. See bellow: "Favux ..." <fav...@gm...> írta: >Hi Nick,> > I have a Genius PenSketch 12x9 user on Ubuntu forums. Originally he> was using Natty (11.04) and wanted to modify his tablet's aspect> ratio. We figured that out. Then he upgraded to Precise (12.04)> because he wanted to install the new Gimp 2.8 over the default Gimp> 2.6. As far as I know the default gimp in precise is 2.6, how did he installed gimp 2.8? He compiled it or installed from a custom repository? (2.8 Gimp default in Quantal 12.10 which is in alpha state.) It appears the pen may be on the third event which may be why the pen> isn't working in Gimp 2.8. It still has the issue/bug Viktoria.S> described where it is showing one input device, namely "9x12 Tablet"> in its Configure Extended Input Devices dropdown. Because by happy> chance the pen was the first device Vicktoria.S reported things were> OK for drawing even so. I can't explain how the pen event changed> from the first to third for the PenSketch if that is what happened.> Maybe the updates?> Well. I could not figured this out (I mean the device list.). I have got a "specially" compiled gimp 2.8 and on that the pen is the 2nd mousepen on the list, but if I start gimp 2.6 or mypaint the pen is the 1st mousepen on the device list (I am using 12.04 64bit digimended kernel). (Actually the pen got device id 17, and the mouse got 18......) I can suggest couple of things: 1. Install mypaint from the repositories. Configure the pen in mypaint and see if he can draw with the pen there. (At least in this way we can check if there is everything ok with the pen or not.) 2. Compile gimp 2.8 on the way I have suggested and on the device list enable only the pen. 3. Maybe he can try to use the wacom driver. As far as I know the wacom driver ads the word stylus to the name of the pen so in this way everything or almost everything gets a unique name. So there could not be a problem with gimp 2.8. (I am thinking about trying to use the wacom driver on 12.10 too, but only after the kernel has been update to 3.5 stable and I can configure the Oracle VM perfectly with that kernel. Later I can give feedback if I was successfull with it or not.) Good luck guys! Viktoria |
|
From: Favux ... <fav...@gm...> - 2012-07-24 20:10:55
|
On Mon, Jul 23, 2012 at 11:47 PM, Viktoria S. <vik...@fr...> wrote: > Hi! > > I have couple of suggestions. See bellow: > > "Favux ..." <fav...@gm...> írta: >>Hi Nick,> >> > I have a Genius PenSketch 12x9 user on Ubuntu forums. Originally he> > was using Natty (11.04) and wanted to modify his tablet's aspect> > ratio. We figured that out. Then he upgraded to Precise (12.04)> > because he wanted to install the new Gimp 2.8 over the default Gimp> > 2.6. > > As far as I know the default gimp in precise is 2.6, how did he installed gimp 2.8? He compiled it or installed from a custom repository? (2.8 Gimp default in Quantal 12.10 which is in alpha state.) > > It appears the pen may be on the third event which may be why the pen> > isn't working in Gimp 2.8. It still has the issue/bug Viktoria.S> > described where it is showing one input device, namely "9x12 Tablet"> > in its Configure Extended Input Devices dropdown. Because by happy> > chance the pen was the first device Vicktoria.S reported things were> > OK for drawing even so. I can't explain how the pen event changed> > from the first to third for the PenSketch if that is what happened.> > Maybe the updates?> > > Well. I could not figured this out (I mean the device list.). I have got a "specially" compiled gimp 2.8 and on that the pen is the 2nd mousepen on the list, but if I start gimp 2.6 or mypaint the pen is the 1st mousepen on the device list (I am using 12.04 64bit digimended kernel). (Actually the pen got device id 17, and the mouse got 18......) > > I can suggest couple of things: > 1. Install mypaint from the repositories. Configure the pen in mypaint and see if he can draw with the pen there. (At least in this way we can check if there is everything ok with the pen or not.) > 2. Compile gimp 2.8 on the way I have suggested and on the device list enable only the pen. > 3. Maybe he can try to use the wacom driver. As far as I know the wacom driver ads the word stylus to the name of the pen so in this way everything or almost everything gets a unique name. So there could not be a problem with gimp 2.8. (I am thinking about trying to use the wacom driver on 12.10 too, but only after the kernel has been update to 3.5 stable and I can configure the Oracle VM perfectly with that kernel. Later I can give feedback if I was successfull with it or not.) > > Good luck guys! Thanks Viktoria S., We did MyPaint and his pen does work in it. I'm pretty sure he installed from this PPA: https://launchpad.net/~otto-kesselgulasch/+archive/gimp So likely he (we) would need to be talked through the Gimp compile after making the fixes you suggest in the bug report. We could try xf86-input-wacom but that doesn't excite me at this time. What I would like to do is to come up with a way to differentiate the input devices through udev so Gimp lists them all. Favux |
|
From: Viktoria S. <vik...@fr...> - 2012-07-25 07:32:41
|
Hi! "Favux ..." <fav...@gm...> wrote: > So likely he (we) would need to be talked through the Gimp compile> after making the fixes you suggest in the bug report.> For compiling gimp the instructions are here:http://www.gimpusers.com/tutorials/compiling-gimp-for-ubuntu And of course if any help needed let me know. > What I would like to do is to come up with a way to differentiate the> input devices through udev so Gimp lists them all.> Is that could be done? That would be great! If you have some idea where to start, let me know I will give this solution a go too... Viktoria |
|
From: Nikolai K. <sp...@gm...> - 2012-07-25 17:42:25
|
Hi Viktoria, David, On 07/25/2012 10:32 AM, Viktoria S. wrote: > "Favux ..."<fav...@gm...> wrote: >> What I would like to do is to come up with a way to differentiate the >> input devices through udev so Gimp lists them all. > > Is that could be done? That would be great! If you have some idea where to > start, let me know I will give this solution a go too... I did a preliminary research on this and didn't find a way. Maybe there is a way, but not an easy one. I wouldn't hold my breath though. You can start with this article: http://www.reactivated.net/writing_udev_rules.html Then read udevadm(8) manpage, especially section on "monitor". Then maybe look at what is available in sysfs for input devices. More direct way would be to just read the kernel source, but it isn't for the faint of heart. Sincerely, Nick |
|
From: Favux ... <fav...@gm...> - 2012-07-25 18:22:02
|
On Wed, Jul 25, 2012 at 12:42 PM, Nikolai Kondrashov <sp...@gm...> wrote: > Hi Viktoria, David, > > On 07/25/2012 10:32 AM, Viktoria S. wrote: >> >> "Favux ..."<fav...@gm...> wrote: >> >>> What I would like to do is to come up with a way to differentiate the >>> input devices through udev so Gimp lists them all. >> >> >> Is that could be done? That would be great! If you have some idea where to >> start, let me know I will give this solution a go too... > > > I did a preliminary research on this and didn't find a way. > Maybe there is a way, but not an easy one. > I wouldn't hold my breath though. > > You can start with this article: > http://www.reactivated.net/writing_udev_rules.html > > Then read udevadm(8) manpage, especially section on "monitor". > > Then maybe look at what is available in sysfs for input devices. > > More direct way would be to just read the kernel source, but it isn't for > the faint of heart. > > Sincerely, > Nick Thanks Nick. Daniel Drake's tutorial is what I use also. I had hoped for better news. :) Oh well. Without something known to match to in udev I think the only way reasonable way to make progress would be to actually get a UC-Logic tablet and run tests on it. Favux |
|
From: Nikolai K. <sp...@gm...> - 2012-07-25 18:39:26
|
On 07/25/2012 09:21 PM, Favux ... wrote: > Thanks Nick. Daniel Drake's tutorial is what I use also. > > I had hoped for better news. :) Oh well. > > Without something known to match to in udev I think the only way > reasonable way to make progress would be to actually get a UC-Logic > tablet and run tests on it. There is a way to match event device type. There is just no way to rename input devices, I think. We can disable the interfering/unneeded ones, though. I think we can match an event device type, then attach a tag using TAG+="tag" in the udev rules. Then use MatchTag and Option "Ignore" in input class configuration in /etc/X11/xorg.conf.d. Look into corresponding /sys/class/input/input*/uevent files for capability bitmasks to match against. Sincerely, Nick |
|
From: Favux ... <fav...@gm...> - 2012-07-25 18:59:24
|
On Wed, Jul 25, 2012 at 1:39 PM, Nikolai Kondrashov <sp...@gm...> wrote:
> On 07/25/2012 09:21 PM, Favux ... wrote:
>>
>> Without something known to match to in udev I think the only way
>> reasonable way to make progress would be to actually get a UC-Logic
>> tablet and run tests on it.
>
>
> There is a way to match event device type. There is just no way to rename
> input devices, I think. We can disable the interfering/unneeded ones,
> though.
>
> I think we can match an event device type, then attach a tag using
> TAG+="tag" in the udev rules. Then use MatchTag and Option "Ignore" in input
> class configuration in /etc/X11/xorg.conf.d.
>
> Look into corresponding /sys/class/input/input*/uevent files for capability
> bitmasks to match against.
>
> Sincerely,
> Nick
Oh, now that is a different story. If we can match capability
bitmasks for pen, mouse, keyboard, etc. then what I was thinking of
was trying something on this order:
ENV{NAME}="Serial Wacom Tablet $attr{id}"
Using ENV{NAME} to change the name to what we want with device type
appended. Should show up in xinput list and Gimp etc. The thing I
was wondering about was how to number them if needed, e.g. pen1, pen2
and so on.
From: http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Fixed_device_files_with_udev#Serial_Wacom_tablet_rules
Favux
|
|
From: Nikolai K. <sp...@gm...> - 2012-07-25 19:05:51
|
On 07/25/2012 09:59 PM, Favux ... wrote:
> Oh, now that is a different story. If we can match capability
> bitmasks for pen, mouse, keyboard, etc. then what I was thinking of
> was trying something on this order:
>
> ENV{NAME}="Serial Wacom Tablet $attr{id}"
>
> Using ENV{NAME} to change the name to what we want with device type
> appended. Should show up in xinput list and Gimp etc.
That would be just great! Somehow I either didn't notice this or didn't test
it properly.
> The thing I was wondering about was how to number them if needed, e.g.
> pen1, pen2 and so on.
All generic tablets I've seen so far have only one input of one type each,
so there shouldn't be a need to number them. Although that could be arranged
somehow, I'm sure.
So we just need to classify the devices and name them appropriately. Like
"pen", "mouse", "frame buttons", "frame dials", etc.
Sincerely,
Nick
|
|
From: Favux ... <fav...@gm...> - 2012-07-25 19:32:17
|
On Wed, Jul 25, 2012 at 2:05 PM, Nikolai Kondrashov <sp...@gm...> wrote:
> On 07/25/2012 09:59 PM, Favux ... wrote:
>>
>> Oh, now that is a different story. If we can match capability
>> bitmasks for pen, mouse, keyboard, etc. then what I was thinking of
>> was trying something on this order:
>>
>> ENV{NAME}="Serial Wacom Tablet $attr{id}"
>>
>> Using ENV{NAME} to change the name to what we want with device type
>> appended. Should show up in xinput list and Gimp etc.
>
>
> That would be just great! Somehow I either didn't notice this or didn't test
> it properly.
>
>
>> The thing I was wondering about was how to number them if needed, e.g.
>> pen1, pen2 and so on.
>
>
> All generic tablets I've seen so far have only one input of one type each,
> so there shouldn't be a need to number them. Although that could be arranged
> somehow, I'm sure.
>
> So we just need to classify the devices and name them appropriately. Like
> "pen", "mouse", "frame buttons", "frame dials", etc.
>
> Sincerely,
> Nick
Right, and no reason for the names to be the same as Wacom's. If we
use pen then the Waltop's will end up with -pen stylus and -pen eraser
as the Wacom X driver appends it. A little clumsy but not terrible.
Sure hope we can get it working.
Favux
|
|
From: Viktoria S. <vik...@fr...> - 2012-07-26 05:54:02
Attachments:
udev.txt
|
Hi! I have a look at this too. Based on this: http://www.reactivated.net/writing_udev_rules.html#basic You can name devices like this too: KERNEL=="hdb", NAME="my_spare_disk" But my question is how you want to identify the pen? To me there are no diferences from the udev perspective between the mouse and the pen. I query the xinput for the devices pen=id 11 mouse id=12. (Based on xinput list --long 11) xinput list-props 11 gives me the node: Device Node (264): "/dev/input/event14" udevadm info --name=/dev/input/event14 --attribute-walk gives me all the properties which I can use for creating rules. (or at least according to my understading....) For the mouse: xinput list-props 12 gives the node Device Node (264): "/dev/input/event15" udevadm info --name=/dev/input/event15 --attribute-walk gives the properties for the mouse But if I see things well the mouse data the same as the pen's data. (See the attached txt.) So the main question is still there: how do you make a deference between the mouse and the pen? Viktoria "Favux ..." <fav...@gm...> írta: >On Wed, Jul 25, 2012 at 2:05 PM, Nikolai Kondrashov <sp...@gm...> wrote:> > On 07/25/2012 09:59 PM, Favux ... wrote:> >>> >> Oh, now that is a different story. If we can match capability> >> bitmasks for pen, mouse, keyboard, etc. then what I was thinking of> >> was trying something on this order:> >>> >> ENV{NAME}="Serial Wacom Tablet $attr{id}"> >>> >> Using ENV{NAME} to change the name to what we want with device type> >> appended. Should show up in xinput list and Gimp etc.> >> >> > That would be just great! Somehow I either didn't notice this or didn't test> > it properly.> >> >> >> The thing I was wondering about was how to number them if needed, e.g.> >> pen1, pen2 and so on.> >> >> > All generic tablets I've seen so far have only one input of one type each,> > so there shouldn't be a need to number them. Although that could be arranged> > somehow, I'm sure.> >> > So we just need to classify the devices and name them appropriately. Like> > "pen", "mouse", "frame buttons", "frame dials", etc.> >> > Sincerely,> > Nick> > Right, and no reason for the names to be the same as Wacom's. If we> use pen then the Waltop's will end up with -pen stylus and -pen eraser> as the Wacom X driver appends it. A little clumsy but not terrible.> > Sure hope we can get it working.> > Favux> |
|
From: Nikolai K. <sp...@gm...> - 2012-07-26 06:27:59
|
Hi Viktoria, On 07/26/2012 08:53 AM, Viktoria S. wrote: > I have a look at this too. Based on this: http://www.reactivated.net/writing_udev_rules.html#basic > You can name devices like this too: > KERNEL=="hdb", NAME="my_spare_disk" This would name the device node. We need to change the event device name, which is retrieved with EVIOCGNAME ioctl. > But my question is how you want to identify the pen? > To me there are no diferences from the udev perspective between the mouse > and the pen. Take a look at the output of "sudo udevadm monitor --property" while plugging-in the tablet. Here is an excerpt from the output for Waltop Media Tablet 10.6" pen: KERNEL[519.062576] add /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1:1.0/input/input18 (input) ABS=1000003 ACTION=add DEVPATH=/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1:1.0/input/input18 EV=1b KEY=1c01 0 0 0 0 0 0 0 0 0 0 MODALIAS=input:b0003v172Fp0501e0110-e0,1,3,4,k140,14A,14B,14C,ra0,1,18,m4,lsfw MSC=10 NAME="WALTOP International Corp. Media Tablet" PHYS="usb-0000:00:1d.0-1/input0" PRODUCT=3/172f/501/110 PROP=0 SEQNUM=1444 SUBSYSTEM=input UDEV_LOG=3 UNIQ="" Evtest outputs this for the corresponding event device: Input driver version is 1.0.1 Input device ID: bus 0x3 vendor 0x172f product 0x501 version 0x110 Input device name: "WALTOP International Corp. Media Tablet" Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 320 (BTN_TOOL_PEN) Event code 330 (BTN_TOUCH) Event code 331 (BTN_STYLUS) Event code 332 (BTN_STYLUS2) Event type 3 (EV_ABS) Event code 0 (ABS_X) Value 0 Min 0 Max 18000 Resolution 78 Event code 1 (ABS_Y) Value 0 Min 0 Max 11000 Resolution 78 Event code 24 (ABS_PRESSURE) Value 0 Min 0 Max 1023 Event type 4 (EV_MSC) Event code 4 (MSC_SCAN) The udev properties include EV, KEY, ABS and MSC - these are values retrievable with the EVIOCGBIT ioctl (which is what evtest and evdev driver do). EV is the bitmask of supported event types, which are EV_SYN, EV_KEY, EV_ABS and EV_MSC. EV_KEY is the bitmask for supported keys, EV_ABS - absolute axes, EV_MSC - miscellaneous events. Take a look at "Using the Input Subsystem, Part II" from the Linux Journal: http://www.linuxjournal.com/node/6429/print, especially "Listing 6. Finding a Unique Identifier" My theory is that you can match against these properties in an udev rule. Sincerely, Nick |
|
From: Viktoria S. <vik...@fr...> - 2012-07-26 11:10:20
Attachments:
mon.txt
|
Hi Nick!
Thank you for the tips!
I have created 99-geniousmousepen.rules and I have putted into /lib/udev/rules.d directory. It's contents:
ACTION=="add|change", ENV{ID_INPUT_TABLET}=="?*", ENV{NAME}="Genius MousePen i608X Pen", ENV{ID_MODEL}="MousePen_i608XE", ENV{ID_MODEL_ENC}="MousePen\x20i608XE", ENV{ID_SERIAL}="Genius_MousePen_i608XS", ENV{HID_NAME}="Genius MousePen i608X H"
And it runs succesfuly. The udev rule gets applied, because the pen properties get changed. See the attached mod.txt (output of udevadm monitor --property while I was plug in the mousepen).
But unfortunately the xinput still lists 2 Genius MousePen i608X instead of any of the changed names. I am confused. The xinput gets applied earlier than the udev rule? Or what can be the problem?
Thank you for your help.
Viktoria
|
|
From: Nikolai K. <sp...@gm...> - 2012-07-26 12:09:13
|
Hi Viktoria,
On Thu, Jul 26, 2012 at 2:09 PM, Viktoria S. <vik...@fr...> wrote:
> I have created 99-geniousmousepen.rules and I have putted into /lib/udev/rules.d directory. It's contents:
> ACTION=="add|change", ENV{ID_INPUT_TABLET}=="?*", ENV{NAME}="Genius
> MousePen i608X Pen", ENV{ID_MODEL}="MousePen_i608XE",
> ENV{ID_MODEL_ENC}="MousePen\x20i608XE",
> ENV{ID_SERIAL}="Genius_MousePen_i608XS", ENV{HID_NAME}="Genius MousePen
> i608X H"
>
> And it runs succesfuly. The udev rule gets applied, because the pen
> properties get changed. See the attached mod.txt (output of udevadm
> monitor --property while I was plug in the mousepen).
> But unfortunately the xinput still lists 2 Genius MousePen i608X instead
> of any of the changed names. I am confused. The xinput gets applied
> earlier than the udev rule? Or what can be the problem?
I should've thought of this earlier, but I think ENV variables are only for
use within udev and, maybe, programs that use libudev. Assigning them
doesn't change anything in the kernel. "Writing udev rules" says:
udev provides an ENV key for environment variables which can be used for
both matching and assignment.
The evdev driver doesn work with udev, but instead queries kernel directly
using EVIOCGNAME ioctl.
Maybe there is a way to change that name, but I haven't found it.
You still have the option of disabling the mouse event device if you don't
use it.
Sincerely,
Nick
|
|
From: Viktoria S. <vik...@fr...> - 2012-10-04 13:55:44
|
Hi! I am experiencing with Ubuntu 12.10 Beta 2. As you may know this version of Ubuntu comes with Gimp 2.8. I would like to try out if I can disable the mouse so there won't be a need to give the device names a unique name. Do you have any advice how can I do that? (Earlier you mentioned that this is possible.) Thanks in advance. Kind regards: Viktoria Nikolai Kondrashov <sp...@gm...> wrote: The evdev driver doesn work with udev, but instead queries kernel directly> using EVIOCGNAME ioctl.> > Maybe there is a way to change that name, but I haven't found it.> > You still have the option of disabling the mouse event device if you don't> use it.> > Sincerely,> Nick> |
|
From: Nikolai K. <sp...@gm...> - 2012-10-06 12:12:50
|
Hi Viktoria, On 10/04/2012 04:28 PM, Viktoria S. wrote: > I am experiencing with Ubuntu 12.10 Beta 2. As you may know this version of > Ubuntu comes with Gimp 2.8. I would like to try out if I can disable the > mouse so there won't be a need to give the device names a unique name. > Do you have any advice how can I do that? (Earlier you mentioned that this > is possible.) Basically, you need to match against device description in an udev rule, tag matched device, then match against that tag in an X.org InputClass and disable it. Udev provides EV_*, ABS_*, REL_*, etc bits in the environment to match against. Use "udevadm monitor" when plugging the tablet in and you'll see them. See also /usr/include/linux/input.h for specific bit values. Consult "Writing udev rules" and man xorg.conf. Contact me, if there is anything you can't find out. Sincerely, Nick |