You are not logged in.

#1 2017-05-19 20:44:48

mattseaton
Member
Registered: 2017-04-17
Posts: 10

[SOLVED] Weird behavior, button on wacom pen triggering on its own

So I'm running on a Lenovo P40 thinkpad yoga and having an issue with the wacom pen that it came with.  Previously I had been running ubuntu on a very similar thinkpad yoga model that I gave to my wife, and I don't recall having this problem.  The hardware was basically identical though.  Ok here's what happens:

This behavior appears to be triggered randomly, but consistently.  In other words it doesn't happen all the time, usually not at first, but after using my pen for a few minutes it will happen eventually, every time.  Sometimes it will stop for a while also, but it always comes back.  When I take the pen away from the screen and put it at a new screen position, one of the pen buttons will get triggered even though I have not pressed it.  This button is mapped to middle click so it will, for example, paste copied text.

I'm trying to use it to control the viewport in blender and here the middle mouse button rotates the view by clicking and dragging, so what happens is when I move the pen to a new position, the button gets triggered and the pointer gets moved to the new position and it rotates the entire view away from what I'm trying to paint/sculpt, rendering it almost a useless tool.  The only way to avoid it is to keep the pen very close to the screen constantly so that it never disengages the digitizer and then re-engages at a new point, not a very natural thing for me to do while drawing, especially since the distance from the screen has to be very small with this laptop.  So I'm pretty much stuck with mouse input for the time being.

Does anyone have any idea why this is happening or what avenue I can pursue to try to find a fix?

Thanks for any help.

Last edited by mattseaton (2017-05-20 17:36:45)

Offline

#2 2017-05-19 21:11:17

Ropid
Member
Registered: 2015-03-09
Posts: 397

Re: [SOLVED] Weird behavior, button on wacom pen triggering on its own

Maybe it's a bug in libinput? I'd compare what driver is used here for you on Arch and what's used on the other laptop with Ubuntu. You can find this out through /var/log/Xorg.0.log (name can be different). It's lines like this:

[     3.930] (II) Using input driver 'evdev' for 'Logitech G Pro Gaming Mouse'

A config file to switch the driver for a device follows this scheme here:

Section "InputClass"
        Identifier "My Mouse"
        MatchIsPointer "yes"
        Driver "evdev"
EndSection

There's "MatchProduct" and "MatchIsTablet" to make a file like this target a specific device. You can find names for "MatchProduct" in /var/log/Xorg.0.log and the output of "xinput".

Offline

#3 2017-05-19 22:27:51

mattseaton
Member
Registered: 2017-04-17
Posts: 10

Re: [SOLVED] Weird behavior, button on wacom pen triggering on its own

It says I'm using driver 'wacom'

I'll have to check what ubuntu was using when I get home.  I think it was evdev.  I don't see anything about "MatchProduct" in either the X log file or the xinput output.

Last edited by mattseaton (2017-05-19 22:34:31)

Offline

#4 2017-05-19 23:26:23

Ropid
Member
Registered: 2015-03-09
Posts: 397

Re: [SOLVED] Weird behavior, button on wacom pen triggering on its own

That "MatchProduct" would be a line you would use in your config. It makes your config target a device with a certain name instead of all devices.

Last edited by Ropid (2017-05-19 23:27:33)

Offline

#5 2017-05-20 16:52:37

mattseaton
Member
Registered: 2017-04-17
Posts: 10

Re: [SOLVED] Weird behavior, button on wacom pen triggering on its own

Ok so ubuntu says it is using driver 'libinput' while arch is using driver 'wacom' by default.

I was able to resolve this issue by changing to libinput.  I made a file /etc/X11/xorg.conf.d/wacom.conf with the following:

Section "InputClass"
        Identifier "Wacom Co.,Ltd. Pen and multitouch sensor Pen stylus"
        MatchIsTablet "yes"
        Driver "libinput"
EndSection

Thanks for your help.

However, now I have a new problem.  For some reason the device name has changed when I do xinput --list.  Now it doesn't say "... Pen stylus".  It says "... Pen Pen (0)".  Doesn't really matter to me as long as it works, but now the eraser button doesn't work.  In fact xinput --list no longer even lists the eraser.  I tried adding a similar section to my conf file for the eraser but it's still not working in gimp.  It was working fine before switching to libinput.  It now does show in xinput --list though, but still doesn't work.

 Wacom Co.,Ltd. Pen and multitouch sensor Pen Eraser (0x954403c9	id=19	[slave  pointer  (2)]

Hmm.  Seems pressure opacity is not working in gimp either.  I got it working at one point in ubuntu, but I remember it being a PitA.

Last edited by mattseaton (2017-05-20 17:22:13)

Offline

#6 2017-05-20 17:35:55

mattseaton
Member
Registered: 2017-04-17
Posts: 10

Re: [SOLVED] Weird behavior, button on wacom pen triggering on its own

Ok I got everything working.  Here is my conf file in case anyone else runs into similar issues.

Section "InputClass"
        Identifier "Wacom Co.,Ltd. Pen and multitouch sensor Pen stylus"
        MatchProduct "pen"
        Driver "libinput"
EndSection

MatchProduct "pen" makes everything work.  No section for the eraser is necessary.

Offline

Board footer

Powered by FluxBB