Whats broken with X11/Tablet support?

Id be interested in improving support for tablets in X11, so I had a look into the GHOST/X11 tablet code and I’m still not clear on what needs fixing.

Does anyone know what needs to be done exactly for better tablet support?

From talking to broken here is what I gather…

  • An input device can be verified to be a tablet (or not)
  • There is no standard way to test for a stylus vs an eraser.
  • Currently hard coded names “stylus” and “eraser” are used from blender.
  • IIRC these names can be configured in Xorg.

Since AFAIK there is no way to detect for sure the eraser and stylus to use (see http://www.xfree86.org/current/XFreeDeviceList.3.html).
Should this be ‘fixed’ by first guessing inputs but also allow the user to select the devices from a user preference dropdown?

Otherwise how might this be solved?

  • IIRC these names can be configured in Xorg.

Ubuntu Jaunty 9.04 use .fdi files by default instead of the Xorg.conf file to configure devices. If I understand correctly, this is to enable “hotplugging” of devices. It is still possible to modify the /etc/Xorg.conf file, though ( see https://help.ubuntu.com/community/Wacom. I don’t know how other linux distro’s handle this, but I am not sure if your above statement is (always) valid.

Since AFAIK there is no way yo detect for sure the eraser and stylus to use (…) Should this be ‘fixed’ by first guessing inputs but also allow the user to select the devices from a user preference dropdown?

There is a Gnome graphics tablets application (http://alexmac.cc/tablet-apps/) that enables you to view and change the device pressure of your stylus and eraser. This program is apparently able to discriminate between stylus and eraser (e.g. if your device is “stylus”, only the stylus tip is pressure-sensitive and not the “eraser” tip, and vice versa). A glance over the source shows that it is written in Python --> perhaps this can be of any help to you?

Hi there, just setup wacom support on Arch Linux (which makes no effort to make this user friendly), and it works fine.
All the example xorg.conf’s I could find use the keywords “stylus”, “eraser” or “cursor” so it seems this is the defacto naming for tablet devices.

(Need to test ubuntu but fairly sure it uses the same names else we’d hear a lot more about this!)

Now Im not sure what needs fixing at all :slight_smile: - if everyone uses “stylus” & “eraser” including blender, what are people complaining about?

Latest Ubuntu was fine with the default settings (picked up my Bamboo tablet) but changing any of those settings seemed to get hairy real quick. Probably because I am not that familiar with the inner workings of Linux in general, but the WacomCpl (insert name for GUI here) wasn’t working at all. Long story short - support for dual monitor setup (ie, choosing one monitor over another rather than using all the space) seemed much harder than it should be.

Can’t be much more help than that at this point, but I’m all for you making tablet support for Linux / X11 better / smoother / etc!

Edit - “stylus”, “eraser” or “cursor” same for Ubuntu, plus another one for some called “pad”

I am using a wacom graphire4 tablet with (k)ubuntu 9.04 64bit.

If your installing this system from scratch (fresh install) you have a system with no xorg.conf file. The whole system is configured to make use of the hal system. Input devices for the X11 system are registered with the evdev subsystem and are initialized properly during X11 startup.

In my case that leads to a working tablet in some (newer) applications (gimp, mypaint) but blender will not utilize any pressure information. Its just used as a plain mouse type input device.

Using lshal or kde-hal-devicemanager to read to hal tree you see that the wacom registers as

  • Wacom Graphire4 6x8
  • Wacom Graphire4 6x8 cursor
  • Wacom Graphire4 6x8 eraser
  • Wacom Graphire4 6x8 pad

with the first one being the stylus.

Using the extened input configuration in gimp gives you exactly these input devices to setup, so there is a way to enumerate all the extended input devices and configure them.
Mypaint doesn’t need any setup at all.

To fix this for blender, you have to introduce a minimal xorg.conf file ( which seems to go against the ubuntu philosophy) where you manually setup the tablet with the already mentioned names ‘stylus’ and ‘eraser’.

I can only guess, why there are no more complaints about this. Somewhere here on this forum are threads which recommend using the xorg.conf workaround.
Maybe when upgrading to a new ubuntu release your yorg.conf file is kept (just a wild guess).

Anyway, I would highly appreciate a more smooth tablet integration into blender.
Also editing the pressure curve ( maybe even several setups) would be really great.

I have a new Intuos 4 that I should really get working under Linux. Bit scared that I might waste weeks of my life trying to get it to work and then end up with nothing to show for it :slight_smile:

Well, I do not know what distro you are using, but the current ubuntu 9.04 distro comes with version 8.2.2 of the wacom driver/tools, which unfortunately do not support the intuos4 series.
Version 8.4.2 ( which is the current one) has support for intuos4 added.

See linuxwacom.sourceforge.net for all the information needed.
If you are a little familiar with building from source you can download and build the latest driver/tolls yourself. There is quite a comprehensive HOWTO at the site going hrough all the steps needed to setup the driver from source.

Hi ideasman42, as far as I am aware (writing from within ubuntu karmic alpha 5) the new ubuntu will not come with xorg.conf existing (making it more difficult for people to edit it probably, because you will have to create it first[unless you updated from jaunty]).
Having to create an xorg.conf ‘only’ for blender to get pressure sensitivity working (does not work without it in karmic koala) is quite a change of system configurations and can create some ugly problems if done wrong (I know that one from first hand experience :-D).

So if you could somehow make pressure sensitivity work automagically (like Gimp [with in-app-configuration] and mypaint do this, loramel already mentioned it) that would be GREAT :slight_smile:
Thanks for all efforts and best regards!

For the records, I am using a Lenove X41 tablet pc with inbuilt wacom tablet (and blender works like a charm on it (at least now with karmic again, with jaunty it was unusable - that actually was the reason for installing karmic so early :-D, I LOVE Blender))

I remember that not to long ago, QT4 switched from using the wacom names (“stylus”, “eraser” & “cursor”) and now use some other (more correct) method of detection. So I’d recommend seeing how they are handling it.

According to my colleagues, the newest linux distributions use HAL to configure all devices on xorg, since xorg is not using xorg.conf anymore. This will pose a problem in the near future, since HAL is going to be DEPRECATED and all the undergoing work is directed to replace HAL with Device-Kit. Usually they edit some files in HAL to make things work… Particularly my bamboo tablet usually works as expected (at work) with some efforts from my colleagues.

Probably if you’re using linux, is better to stick with “somewhat user friendly” distributions… (well… myself use windows in my house and i’m forced to use linux at work, so you can imagine i’m a linuxhater myself…) rather than “do everything yourself” distros… IMHO… YMMV.



Thanks for the info. Just verified that blender2.5 works in ubuntu-karmic (alpha) without adding an xorg.conf or naming the device stylus/eraser - thanks to Nicholas Bishop, r22581.
It also works in arch linux even if you don’t call it a stylus in the xorg (where it would fail before).

just backported this to 2.4x branch so stable blender works in recent ubuntu’s.

This leaves me still wondering, is anything to fix???

  • Stuff like pressure curve is useful but Ill ignore for now since getting it working first is most important.
  • If you had trouble with blender before, try a fairly recent 2.5 build (no more then 3weeks old) and see if your tablet works.

Hello ideasman42, there were some problems and topics about this in April, but there are no apparent problems now. At least here that is. I’m using Ubuntu 9.04 and intuos3 works fine in Blender 2.49b. I’m not sure what fixed this problem, perhaps some Ubuntu update?

2.5 works fine as well.

I downloaded a blender 2.5 64bit Linux build from graphicall built from rev r23303 and gave it a test on my 64bit kubuntu 9.04 system.
This build is able to utilize the pressure information when no xorg.conf entries are present (only hal/edev autoconfigured). This works like a charm now.
But the problem isn’t really solved now, but reverted. Going back to configuring the tablet via xorg.conf leaves me without pressure sensitivity in the 2.5 build.
So it seems the new system only works with xorg-conf-less setup, while the old implementation does just the opposite. At least thats the behaviour on my machine.

@loramel - thanks for the heads up. Currently using Ubuntu 8.10 but I’m looking for an excuse to upgrade. Might even try out the latest alpha like Ideasman42 did.

Does fixing tablet support include supporting the buttons you get on the tablet? I remember I used some ubuntu app a while ago to set the tablet buttons to correspond to certain keyboard keys and the tablet buttons then worked fine in Blender. They however don’t work on their own.

proper tablet support in linux would be so sweet, but please don’t forget other tablets than wacom (I have genius one, mousepen 8x6)
I have issues with it in blender on ubuntu 8.10 so I can’t use it at all with blender :frowning:
(it’s cliking with button and rotating viewport at same time)
hope it will be better when I update to ubuntu 9.10

With the tool wacomcpl (comes with wacom-tools package) you should be able to assign any arbitrary keys, functionskeys etc to any of the buttons available on a wacom tablet and pen.

To assign the function key F9 to the left button on the tablet just start wacomcpl (very simple X11 app) select ‘pad’ as input device and select ‘Tablet Controls’.
Now select for ‘Button1’ select ‘Keystroke’ from the drop down list and assign the funtion key F9 from the Funtion key drop down list.

This works of course only for wacom tablets.

@Lamoot, thats odd because nothing changed in blenders tablet support between those releases IIRC.
@psychotron, maybe the situation is better now? - see below.

Stole some functions from the wine project for detecting tablets, its supposed to work on non-wacom’s, at least it makes adding new stylus ID’s easy.

Applied to 2.4x and 2.5, commit log r23322

use functions to detect stylus and eraser from the wine project, supposed to work with non-wacom tablets too (searches for wizardpen & acecad as well as ‘stylus’).
2.4x did an exact check on the name, 2.5 does a case insensitive search on the type.

This does a case insensitive check on both the name and type.

close the devices on exit too.

I think some people are getting the wrong idea,
ideasman didn’t say hes going to be working on
linux & xorg nor wacom-tools them selves,
but on blenders side.

and yet what most peoples linux tablet problems
really stem from aren’t usually problems on
blenders side.

Here are the topics I mentioned earlier (+ some other tablet problems related ones), perhaps they can be of some use.