This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Krita + non-wacom tablets

Tags: None
(comma "," separated)
viktoria.s
Registered Member
Posts
40
Karma
1
OS

Re: Krita + non-wacom tablets

Tue Dec 10, 2013 1:36 pm
Hi,

I tried to figure out why Krita doesn't recognise my tablet. Here is my theory (maybe I am wrong but just in case it helps I write it down)
So if I understand well the code the tablet detection happens in https://projects.kde.org/projects/calli ... rt_x11.cpp
and you are chacking for this atomnames Wacom Stylus, Wacom Cursor, Wacom Eraser, STYLUS, ERASER (stored in kis_x11_atomnames line 97). And then the following
if (devs->type == KIS_ATOM(XWacomStylus) || devs->type == KIS_ATOM(XTabletStylus)) (line 199)
is true then the device is a tablet. But when I tried to figure out what is wrong with QT I found the following:
(devs->type == XInternAtom(X11->display, XI_TABLET, False)) is true then the tablet is recognised by X as tablet (with the evdev driver)
XI_TABLET is defined in X11/extensions/XI.h and it contains "TABLET"! So if you can add the chacking for that word too in kis_x11_atomnames then the evdev tablets would be detected.
Unfortunately at the moment I connot setup a build environment for calligra so I cannot test my therory. But if you could build a test for this I can test if it's works or not.
(By the way if I have already installed krita from here: https://launchpad.net/~dimula73/+archive/krita can I still build from source or I should delete everything I have installed from that ppa?)
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS

Re: Krita + non-wacom tablets

Tue Dec 10, 2013 1:44 pm
Interesting! I guess we are getting close to a fix now. If you want to build from source, remove everything from the ppa.
dkazakov
Registered Member
Posts
64
Karma
1

Re: Krita + non-wacom tablets

Tue Dec 10, 2013 8:21 pm
Yeah, that Qt bugreport [0] sounds promising. I'll try to look at it tomorrow :)


[0] - https://bugreports.qt-project.org/brows ... l-tabpanel
User avatar
Storm
Registered Member
Posts
77
Karma
0
OS

Re: Krita + non-wacom tablets

Tue Dec 10, 2013 9:12 pm
I can build Krita from master, I already did that using this tutorial, on Arch Linux with KDE:
http://www.davidrevoy.com/article193/bu ... x-for-cats

My *nix knowledge and experience is not much, but I can understand things if explained clearly, so if someone can give me step-by-step instructions on how to patch the source to add the check Victoria was mentioning, I can do that.

Just keep in mind that my tablet (UC-LOGIC WP8060U) is different from Victoria's one, so there might be a difference.


"Sic itur ad astra per aspera."
dkazakov
Registered Member
Posts
64
Karma
1

Re: Krita + non-wacom tablets

Thu Dec 12, 2013 11:19 am
Hi, Storm and Victoria!

I have just pushed the probable fix to Krita-master, could you please update and test whether your tablets are recognized as tablets or not?

This is fixed in the commit:
http://quickgit.kde.org/?p=calligra.git ... fcbe1c4bfb
so, just check your source directory is newer than that.

I'll also request Krita Lime packages, but they will be ready not earlier than in 6-8 hours
User avatar
Storm
Registered Member
Posts
77
Karma
0
OS

Re: Krita + non-wacom tablets

Thu Dec 12, 2013 1:25 pm
Hi!

I just pulled (about an hour ago) from git and built it.

Still no pressure.

xinput is the same. Tablet event log still reports "MouseMove" and "MouseButtonPress".

Log: http://pastebin.com/NirizjCg


"Sic itur ad astra per aspera."
viktoria.s
Registered Member
Posts
40
Karma
1
OS

Re: Krita + non-wacom tablets

Thu Dec 12, 2013 1:46 pm
Hi,

I just updated the Lime PPA and still no presure with the evdev driver. Only with the wacom driver. :(
dkazakov
Registered Member
Posts
64
Karma
1

Re: Krita + non-wacom tablets

Thu Dec 12, 2013 1:56 pm
Hi, Strom!

Could you please apply the following patch to Krita, run it with the tablet connected and paste the resulting Krita log?
http://pastebin.kde.org/pxg8xk6h3

To apply the patch you need to do:
1) Download RAW version of the patch and save it to a file
2) Go to the directory with Krita sources (the one where you usually do 'git pull')
3) Type:

patch -p1 < /path/to/the/saved/patch.file

4) Then build as usual

If you have any problems with applying the patch, please join #krita IRC channel and I will help you with it.


The resulting log should contain the lines like this:

...
===
Device Name Wacom Graphire2 4x5 stylus
Device Atom 278
Device Type STYLUS
===
...
dkazakov
Registered Member
Posts
64
Karma
1

Re: Krita + non-wacom tablets

Thu Dec 12, 2013 1:59 pm
If you followed David's manual, then the sequence of commands will be like that:

cd ~/kde4/src/calligra
git pull
patch -p1 < /path/to/the/saved/patch.file

cd ~/kde4/build/
make -j8 install
viktoria.s
Registered Member
Posts
40
Karma
1
OS

Re: Krita + non-wacom tablets

Thu Dec 12, 2013 4:43 pm
Hi,

I am trying to build calligra with the path forlloving David Revoy's tutorial. But I have no success. I got the following message with cmake:
Code: Select all
-- ---------------- The following required products can NOT be built -----
-- KRITA_APP:  Full Krita (for Desktop)   [[needed by: KRITA]]  |  Xinput devel not found
Can you help me wich xinput development package is missing? (I have got xubuntu 13.10 32bit on a VM I have already installed the build dep for calligra and I have a lots of X11 development packages)
Here is the list:
Code: Select all
brltty-x11 dbus-x11 libx11-6:i386 libx11-data
libx11-dev:i386 libx11-xcb-dev libx11-xcb1:i386   
pulseaudio-module-x11   x11-apps x11-common
x11-session-utils x11-utils x11-xfs-utils
x11-xkb-utils x11-xserver-utils   x11proto-core-dev   
x11proto-damage-dev x11proto-dri2-dev x11proto-fixes-dev   
x11proto-gl-dev x11proto-input-dev x11proto-kb-dev
x11proto-xext-dev x11proto-xf86vidmode-dev
(I listed it with dpkg --get-selections | grep x11)
Thanks in advance.

EDIT: I think I have found the solution: the libxi-dev package was missing :)
dkazakov
Registered Member
Posts
64
Karma
1

Re: Krita + non-wacom tablets

Thu Dec 12, 2013 5:20 pm
Hi, Victoria!

You can check the full list of packages needed on Ubuntu in the packaging control file for Krita Lime:

http://bazaar.launchpad.net/~dimula73/+ ... d:/control

Commented out packages are not necessary, obviously :)
viktoria.s
Registered Member
Posts
40
Karma
1
OS

Re: Krita + non-wacom tablets

Thu Dec 12, 2013 6:09 pm
Hi,
Finally I have built Krita :). Here is the output you have requested for my tablet:
Code: Select all
Compiled for arch: ::Vc::SSSE3Impl
Features supported:
    "SSE2"    ---    yes
    "SSSE3"    ---    yes
    "SSE4.1"    ---    no
    "AVX "    ---    no
===
Device Name Virtual core pointer
Device Atom 0
X Error: BadAtom (invalid Atom parameter) 5
  Major opcode: 17 (X_GetAtomName)
  Resource id:  0x0
Device Type 
===
===
Device Name Virtual core keyboard
Device Atom 0
X Error: BadAtom (invalid Atom parameter) 5
  Major opcode: 17 (X_GetAtomName)
  Resource id:  0x0
Device Type 
===
===
Device Name Virtual core XTEST pointer
Device Atom 0
X Error: BadAtom (invalid Atom parameter) 5
  Major opcode: 17 (X_GetAtomName)
  Resource id:  0x0
Device Type 
===
===
Device Name Virtual core XTEST keyboard
Device Atom 0
X Error: BadAtom (invalid Atom parameter) 5
  Major opcode: 17 (X_GetAtomName)
  Resource id:  0x0
Device Type 
===
===
Device Name Power Button
Device Atom 72
Device Type KEYBOARD
===
===
Device Name Sleep Button
Device Atom 72
Device Type KEYBOARD
===
===
Device Name VirtualBox mouse integration
Device Atom 75
Device Type TOUCHSCREEN
===
===
Device Name VirtualBox USB Tablet
Device Atom 75
Device Type TOUCHSCREEN
===
===
Device Name AT Translated Set 2 keyboard
Device Atom 72
Device Type KEYBOARD
===
===
Device Name ImExPS/2 Generic Explorer Mouse
Device Atom 73
Device Type MOUSE
===
===
Device Name Genius MousePen i608X
Device Atom 74
Device Type TABLET
===
+++
Adding tablet device
device_data.deviceType = 2
device_data.eventCount = 5
device_data.device = 0x934cbb0
device_data.xinput_motion = 71
device_data.xinput_key_press = -1
device_data.xinput_key_release = -1
device_data.xinput_button_press = 69
device_data.xinput_button_release = 70
device_data.xinput_proximity_in = 74
device_data.xinput_proximity_out = 75
+++
===
Device Name Genius MousePen i608X
Device Atom 75
Device Type TOUCHSCREEN
===
QCoreApplication::postEvent: Unexpected null receiver
QCoreApplication::postEvent: Unexpected null receiver
X Error: BadAtom (invalid Atom parameter) 5
  Major opcode: 20 (X_GetProperty)
  Resource id:  0x0
X Error: BadAtom (invalid Atom parameter) 5
  Major opcode: 20 (X_GetProperty)
  Resource id:  0x0
connect failed: No such file or directory
krita(25497)/kdeui (kdelibs): No such XML file "/home/sv/.kde/share/apps/"
vvvvvvvvvvvvvvvvvvvvvvv START TABLET EVENT LOG vvvvvvvvvvvvvvvvvvvvvvv
"[       ] " "QEvent::MouseMove" "gpos: 378,358" "pos: 283,269" "button: 0" "buttons: 0"
"[       ] " "QEvent::MouseMove" "gpos: 359,359" "pos: 264,270" "button: 0" "buttons: 0"
"[       ] " "QEvent::MouseMove" "gpos: 355,360" "pos: 260,271" "button: 0" "buttons: 0"
"[       ] " "QEvent::MouseMove" "gpos: 349,362" "pos: 254,273" "button: 0" "buttons: 0"
"[       ] " "QEvent::MouseMove" "gpos: 345,362" "pos: 250,273" "button: 0" "buttons: 0"
"[       ] " "QEvent::MouseMove" "gpos: 342,363" "pos: 247,274" "button: 0" "buttons: 0"
"[       ] " "QEvent::MouseMove" "gpos: 339,364" "pos: 244,275" "button: 0" "buttons: 0"
"[       ] " "QEvent::MouseMove" "gpos: 336,365" "pos: 241,276" "button: 0" "buttons: 0"
"[       ] " "QEvent::MouseMove" "gpos: 331,367" "pos: 236,278" "button: 0" "buttons: 0"
"[       ] " "QEvent::MouseMove" "gpos: 328,367" "pos: 233,278" "button: 0" "buttons: 0"
"[       ] " "QEvent::MouseMove" "gpos: 323,369" "pos: 228,280" "button: 0" "buttons: 0"
"[       ] " "QEvent::MouseMove" "gpos: 320,369" "pos: 225,280" "button: 0" "buttons: 0"
So it seems to me that is recognised as a tablet but still mouse events are generated. Just one thing to note: Genius MousePen i608X comes with a mouse and both have the same name using the evdev driver maybe that is cousing some problems? (I don't know I didn't have time to check the code that well, but in some application like Gimp 2.8 it's an issue.)
So if you want to run some other patches please let me know :).
dkazakov
Registered Member
Posts
64
Karma
1

Re: Krita + non-wacom tablets

Fri Dec 13, 2013 5:32 am
Hi, Victoria!

Thank you for testing! I'll prepare a patch with a bit more events debugging output in the evening today, so we will get more info about your tablet :)
dkazakov
Registered Member
Posts
64
Karma
1

Re: Krita + non-wacom tablets

Fri Dec 13, 2013 2:47 pm
Hi, Victoria and Storm!

Could you apply one more patch and generate a log (with Ctrl+Shift+T logging active)?

Here is the patch that can be applied on top of the previous one:
http://pastebin.kde.org/pj8hbrilw

And if you don't have the previous patch applied, here is a cumulative version containing both patches:
http://pastebin.kde.org/pgdzvckuf

PS:
Btw, you can also ping me on IRC (#krita on FreeNode) or (if it happens you know Russian) in the VK community: http://vk.com/ilovefreeart , then we could test a bit faster :)
viktoria.s
Registered Member
Posts
40
Karma
1
OS

Re: Krita + non-wacom tablets

Sat Dec 14, 2013 8:41 am
Hi,

I finally did some testing as promissed ;) . Here are the results:
http://pastebin.com/VSXRideF
First there are the log with the tablet's mouse only: it works.
Then the stylus only: it does not draw probably because the pressure is zero or less then 1 konstantly :( (I guess the maximum was 0.7 or so)
The the stylus and the tablet's mouse: after I have used the tablet I cannot draw with the mouse because it is 'blocked'.
I did another test with the tablet and the 'normal' mouse (not the tablet's one): in this case the mouse worked properly it wasn't blocked.
http://pastebin.com/gVH3Qwd5
If I need to do some more testing please let me know.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], rockscient, Yahoo [Bot]