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

Krita + non-wacom tablets

Tags: None
(comma "," separated)
svg
Registered Member
Posts
16
Karma
0

Krita + non-wacom tablets

Mon Dec 26, 2011 1:19 pm
Hi!

I'd like to ask if there is a way to use a non-wacom pen-tablet with Krita? I have a Genius Mousepen and it fails to recognize pressure sensitivity.

While searching the web I found out that it's probably a Qt problem. And indeed GTK apps like Gimp and MyPaint have pressure sensitivity on the same system.

Is there any workaround, or a fix that's expected for this issue?

Thanks for reading!
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS

Re: Krita + non-wacom tablets

Mon Dec 26, 2011 1:24 pm
Hi!

I'm afraid that it's indeed a limitation in Qt, which only works with Wacom devices. I haven't got the time (or the knowledge or devices) to create a patch to Qt to support other tablet devices, so I am afraid that for the foreseable future, Qt and Krita will only support Wacom tablets/
svg
Registered Member
Posts
16
Karma
0

Re: Krita + non-wacom tablets

Thu Dec 29, 2011 9:18 pm
Oh well, it looks like I'll have to wait until this changes or I get another tablet.

But anyway thanks for answering my question and happy holidays!
User avatar
YAFU
Registered Member
Posts
55
Karma
0
OS

Re: Krita + non-wacom tablets

Fri Apr 13, 2012 1:54 am
Could Krita developers to contact the project DIGImend to try solve this problem?
http://sourceforge.net/apps/mediawiki/d ... e=DIGImend

Ok, maybe wacom is one of the best brands, but not the only manufacturer of graphic tablets in this universe.
I have no idea about programming, but I'm willing to work as a tester (I have a Genius EasyPen i405)
Thank you.
viktoria.s
Registered Member
Posts
40
Karma
1
OS

Re: Krita + non-wacom tablets

Sun Apr 15, 2012 4:53 pm
boudewijn wrote:Hi!

I'm afraid that it's indeed a limitation in Qt, which only works with Wacom devices. I haven't got the time (or the knowledge or devices) to create a patch to Qt to support other tablet devices, so I am afraid that for the foreseable future, Qt and Krita will only support Wacom tablets/


Yes, I can understand that, but is it possible to file a bug report in QT to make QT compatible with the evdev deriver too? (May be there are one or two QT developer who might be interested in doing the necessary coding.)

@YAFU
As far as I know the digimend project creates only the kernel drivers and does some evdev driver modifications in order to make non-wacom tablets work with Linux.
As you can see on this page http://sourceforge.net/apps/mediawiki/d ... ort_status your tablet is supported by the evdev driver >= 2.5.99 and kernel >= 2.6.36 linux distros.
All the other drawing/painting applications (like Gimp, mypaint, alchemy, synfig studio) has pressure sensitivity because gtk and jpen are compatible with the evdev driver. So if a QT developer could make QT compatible with the evdev driver you could have pressure sensitivity as well.

Actually even I can take part in testing this. Sometimes I am thinking about reporting bug in QT, but I do not know too much insight how actually Krita works according to handling tablet pressure....
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS

Re: Krita + non-wacom tablets

Sun Apr 15, 2012 5:30 pm
This is the Qt bug tracker: https://bugreports.qt-project.org/secure/Dashboard.jspa

As soon as Qt properly supports the tablet, it'll work with Krita automatically. There's nothing special at all in the Krita code for tablet support, Qt abstracts it away :-)
User avatar
YAFU
Registered Member
Posts
55
Karma
0
OS

Re: Krita + non-wacom tablets

Sun Apr 15, 2012 6:55 pm
Well, Who could start a report in Qt bug tracker?
My English and my kernel/evdev/qt/programming knowledge are not good, so I would prefer someone better prepared do a report.
Then could be paste here the report link, for all of us we add information.
If no other option, I'll try to make a report.
viktoria.s
Registered Member
Posts
40
Karma
1
OS

Re: Krita + non-wacom tablets

Mon Apr 16, 2012 8:03 am
Hi all!

I have reported a QT bug here ;) :
https://bugreports.qt-project.org/browse/QTBUG-25329

@YAFU
I guess after signig up in the QT bugtracker website you can file any bug, and I guess it would be great if you can sign up and vote for this bug, and perhaps leave some comments.

@boudewijn
It woul be great if you could review the bug report and leave some comments as necessary. I marked the Component/s: Core: Event System but I am not quite sure if this is the correct one, so it would be great if you could check that too.

Thanks.
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS

Re: Krita + non-wacom tablets

Mon Apr 16, 2012 8:06 am
Will do.
User avatar
YAFU
Registered Member
Posts
55
Karma
0
OS

Re: Krita + non-wacom tablets

Mon Apr 16, 2012 12:31 pm
Thanks viktoria.s.
I've already voted. I will be tuned following that report.
Regards.
JedTheKrampus
Registered Member
Posts
6
Karma
0
OS

Re: Krita + non-wacom tablets

Thu Apr 19, 2012 7:12 am
I wanted to try out Krita with pressure sensitivity and I had one of these tablets, so I checked out git Qt and found where the problem is. As soon as I figure out the proper way to implement the fix, I'll see if I can get it merged for the next Qt release so that you folks can use Krita with pressure sensitivity.
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS

Re: Krita + non-wacom tablets

Thu Apr 19, 2012 7:18 am
That's awesome!
viktoria.s
Registered Member
Posts
40
Karma
1
OS

Re: Krita + non-wacom tablets

Thu Apr 19, 2012 8:39 am
JedTheKrampus wrote:I wanted to try out Krita with pressure sensitivity and I had one of these tablets, so I checked out git Qt and found where the problem is. As soon as I figure out the proper way to implement the fix, I'll see if I can get it merged for the next Qt release so that you folks can use Krita with pressure sensitivity.


That's cool. :) I appreciate your efforts.
User avatar
YAFU
Registered Member
Posts
55
Karma
0
OS

Re: Krita + non-wacom tablets

Thu Apr 19, 2012 10:01 pm
JedTheKrampus wrote:s soon as I figure out the proper way to implement the fix, I'll see if I can get it merged for the next Qt release so that you folks can use Krita with pressure sensitivity.

I hope that you can do it.
Thank you very much!
JedTheKrampus
Registered Member
Posts
6
Karma
0
OS

Re: Krita + non-wacom tablets

Fri Apr 20, 2012 7:28 am
All right. I'm not sure where to take the fix from here, so I'm going to publish what I know here. I take no responsibility if following these instructions utterly breaks your system =]

Do not attempt this fix if your system is already functioning normally.

Warning: If your tablet has more than three axes (i.e. x, y, and sensitivity), it may not work and Qt doesn't have a way to configure it that I'm aware of.

Now that all that scary talk is over with, let's get your tablet supported by Qt. First, you need to grab the source code for Qt. From a terminal, run
Code: Select all
$ qtconfig
. This pulls up the Qt configuration program. In the top menu, go to Help -> About Qt. Write down or remember your version of Qt.

Next, you need to get the source code from the Qt website. Close qtconfig and issue the following command:
Code: Select all
$ wget http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.8.1.tar.gz
, replacing 4.8.1 with the appropriate version number. When this finishes downloading, untar it:
Code: Select all
$ tar xf qt-everywhere-opensource-src-4.8.1.tar.gz
and go into the resulting directory
Code: Select all
$ cd qt-everywhere-opensource-src-4.8.1
.

You need to edit the file src/gui/kernel/qapplication_x11.cpp. Here's me doing it with vim:
Code: Select all
$ vim src/gui/kernel/qapplication_x11.cpp
Use your favourite text editor!

Either way, you need to find a line that looks like this:

Code: Select all
if (devs->type == ATOM(XWacomStylus) || devs->type == ATOM(XTabletStylus)) {


In Qt release 4.8.1, it is line 2451 of this file. Change it to this:

Code: Select all
if (devs->type == 101 || devs->type == ATOM(XWacomStylus) || devs->type == ATOM(XTabletStylus)) {


I'm not sure why, but when an Xinput device is an evdev-driven tablet, its type is 101. I'm also not sure how to put this in code that the Qt project would be likely to accept. Either way, save your changes and exit the text editor. Back in your terminal, build the project. (I chose the Open Source configuration option.) The second step especially will take a very long time. I recommend you take a nap or go out for lunch before you run
Code: Select all
$ make -j8
.

Code: Select all
$ ./configure -prefix /usr
$ make -j8
$ sudo make install


Log out and log back in immediately after these commands finish executing. You should be able to have a stable system without rebooting, and pressure sensitivity should work in Krita.

Don't delete the source directory. You will need to be able to run
Code: Select all
$ sudo make uninstall
if something goes wrong. And, after you run [code]$ sudo make uninstall[code], be sure to reinstall qt from your package manager.

You should be sure to roll back your changes in this manner if you are doing a distro upgrade, or if you're upgrading qt in any way.

It may help me fix the bug if I can get verification that the above procedure gets pressure sensitivity to work in Krita. Again, I'm not sure at all of the proper way to integrate this fix into qt. I think there should be some manner of automatic configuration of evdev-enabled tablets, or at least a way to set up the axes (X, Y, pressure, X tilt, Y tilt) in qtconfig, to support more tablets through evdev. But that's really a bigger scope of project than I really want to take on right now, and I think my time would be better spent either making art or contributing to krita.

If you have any questions, please ask and I will do my best to figure out the answer!


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, sandyvee, Sogou [Bot]