[PATCH] USB Graphire4 pad buttons stop working after pen input

Bug #782756 reported by Connor Carney
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Won't Fix
Medium
Canonical Kernel Team
Oneiric
Invalid
Medium
Canonical Kernel Team

Bug Description

When I plug in my USB Graphire4, the both the pen and the pad buttons work as expected, but after the first pen input, the buttons no longer generate X events. I can reliably trigger this problem as follows:

1. Plug in the pad
2. Use stylus (works as expected)
3. Press pad buttons (works as excpected)
4. Use stylus again (works as expected)
5. Press pad buttons again (no X events are generated until unplugging and re-connecting the pad)

This problem began on upgrade from Ubuntu 10.10 to 11.04, and it also occurs on a fresh install of 11.04.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: xserver-xorg-input-wacom 1:0.10.11-0ubuntu4
ProcVersionSignature: Ubuntu 2.6.38-9.43-generic-pae 2.6.38.4
Uname: Linux 2.6.38-9-generic-pae i686
Architecture: i386
CompizPlugins: [core,bailer,detection,composite,opengl,compiztoolbox,decor,shift,gnomecompat,vpswitch,mousepoll,imgpng,move,grid,wall,place,regex,wobbly,winrules,resize,blur,unitymtgrabhandles,scale,animation,session,expo,workarounds,ezoom,unityshell]
CompositorRunning: compiz
CurrentDmesg: Error: command ['sh', '-c', 'dmesg | comm -13 --nocheck-order /var/log/dmesg -'] failed with exit code 1: comm: /var/log/dmesg: Permission denied
DRM.card0.HDMI.A.1:
 status: disconnected
 enabled: disabled
 dpms: On
 modes:
 edid-base64:
DRM.card0.LVDS.1:
 status: connected
 enabled: enabled
 dpms: On
 modes: 1280x800 1280x720 1152x768 1024x768 800x600 848x480 720x480 640x480
 edid-base64: AP///////wBMo0JRAAAAAAASAQOAHhN4CgfFl1dTjCcgUFQAAAABAQEBAQEBAQEBAQEBAQEBFBsAiFAgEDAMQDMAL74QAAAZAAAADwAAAAAAAAAAACOHAmQAAAAA/gBTQU1TVU5HCiAgICAgAAAA/gAxNDFBVDEzLUgwMQogADk=
DRM.card0.VGA.1:
 status: disconnected
 enabled: disabled
 dpms: On
 modes:
 edid-base64:
Date: Sat May 14 13:24:12 2011
DistUpgraded: Log time: 2010-11-19 10:33:15.197765
DistroCodename: natty
DistroVariant: ubuntu
DkmsStatus:
 lirc, 0.8.7, 2.6.38-9-generic-pae, i686: installed (WARNING! Diff between built and installed module!)
 lirc, 0.8.7, 2.6.38-8-generic-pae, i686: installed (WARNING! Diff between built and installed module!)
 lirc, 0.8.7, 2.6.38-9-generic, i686: installed
GraphicsCard:
 ATI Technologies Inc M880G [Mobility Radeon HD 4200] [1002:9712] (prog-if 00 [VGA controller])
   Subsystem: Hewlett-Packard Company Device [103c:3642]
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
MachineType: Hewlett-Packard HP Pavilion dv4 Notebook PC
ProcEnviron:
 LANGUAGE=en_US:en
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.38-9-generic-pae root=UUID=0c0a8a91-bb82-456a-9ff1-9bdf26cffa6c ro quiet splash vt.handoff=7
Renderer: Unknown
SourcePackage: xf86-input-wacom
UpgradeStatus: Upgraded to natty on 2011-04-21 (23 days ago)
dmi.bios.date: 12/03/2009
dmi.bios.vendor: Insyde
dmi.bios.version: F.16
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: 3642
dmi.board.vendor: Hewlett-Packard
dmi.board.version: 40.23
dmi.chassis.type: 10
dmi.chassis.vendor: Hewlett-Packard
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnInsyde:bvrF.16:bd12/03/2009:svnHewlett-Packard:pnHPPaviliondv4NotebookPC:pvr049D210000241210000020000:rvnHewlett-Packard:rn3642:rvr40.23:cvnHewlett-Packard:ct10:cvrN/A:
dmi.product.name: HP Pavilion dv4 Notebook PC
dmi.product.version: 049D210000241210000020000
dmi.sys.vendor: Hewlett-Packard
version.compiz: compiz 1:0.9.4+bzr20110415-0ubuntu2
version.libdrm2: libdrm2 2.4.23-1ubuntu6
version.libgl1-mesa-dri: libgl1-mesa-dri 7.10.2-0ubuntu2
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 7.10.2-0ubuntu2
version.xserver-xorg: xserver-xorg 1:7.6+4ubuntu3
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.0-0ubuntu4
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.14.0-4ubuntu7.1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20110107+b795ca6e-0ubuntu7

Revision history for this message
Connor Carney (cscarney) wrote :
Revision history for this message
Favux (favux-is) wrote :

This may be a duplicate of: https://bugs.edge.launchpad.net/ubuntu/+source/xf86-input-wacom/+bug/769477 if Conner is setting the tablet's pad buttons to something other than default with xsetwacom.

Revision history for this message
Connor Carney (cscarney) wrote :

This problem occurs regardless of whether I run xsetwacom. I've tried with both the default button settings and with xsetwacom)

I also don't experience the x server crash described in lp:769477; after the steps described above, the pad buttons simply don't do anything at all.

Revision history for this message
kopiwe (kopiwe) wrote :

I have a Wacom BambooFun 6x8 and the same happens to me.

The pad buttons stop working after any button on the pad is pressed. The only way to make them work again is to re-plug the usb - but then the same happens again, one button on pad is pressed, they stop working.

Revision history for this message
Connor Carney (cscarney) wrote :

I got the pad buttons to work by uninstalling the wacom driver completely and using the USB mouse driver. That is, of course, a workaround and not a solution: it means no custom button settings, and no distinguishing between the pad/stylus/eraser, but it *does* make the pad buttons work.

Revision history for this message
Favux (favux-is) wrote :

kopwie it would help to know the model and product ID. The model is on the back of the tablet and you can get the product ID by entering 'lsusb' in a console. The Wacom line will contain the product ID, please post it.

Connor you've ruled out a hardware problem with the buttons, and since the mouse driver works for them, implicated xf86-input-wacom. In your Xorg logs I don't see an error related to the button freeze. I see a lot of activity around multiple repeats of:

[ 1044.700] (EE) Wacom Graphire4 4x5 stylus: Error reading wacom device : No such device

Which is, I assume, you hot plugging the tablet after a button freeze. If it is xf86-input-wacom let's see if we can get a trace of the error in the Xorg logs by adding debug statements to the 50-wacom.conf usb snippet. Add:

Option "CommonDBG" "12"
Option "DebugLevel" "12"

under the Driver "wacom" line. We may need to set up a dependent device snippet for "pad" and use DebugLevel in it. But let's try this first.

Revision history for this message
Connor Carney (cscarney) wrote : Re: [Bug 782756] Re: USB Graphire4 pad buttons stop working after pen input

Attached:
Xorg.0.log -- log with debug enabled
annotated.txt -- excerpt with notes about what I did to to trigger the
messages (attached pad, pressed pad buttons, moved stylus, etc.)

Revision history for this message
kopiwe (kopiwe) wrote : Re: USB Graphire4 pad buttons stop working after pen input

The wacom model and product ID are:

model:
  CTE-650
lsusb:
   Bus 002 Device 003: ID 056a:0018 Wacom Co., Ltd Bamboo Fun 6x8

Revision history for this message
Favux (favux-is) wrote :

Good news. We have a linux wacom developer willing to help us. I posted Connor's annotated Xorg.0.log and Chris Bagwell said:

"For first bug report, it does sound same issue as I looked into a while back. The kernel driver is mistakenly telling userland that the PAD device has gone out of proximity when you use pen. From that point, buttons don't work.

Something has changed in xf86-input-wacom that we must l trust kernel information more then we used to. My personal reference is to fix the kernel to give us good info instead of reverting back to old xf86-input-wacom behavior.
...
Or hopefully we can find a user that doesn't mind hacking kernel drivers. I can give tons of guidance on patch to implement (its like 3 lines for simple solution) but ultimately I can't push forward much more since I don't have the device."

Chris is saying likely minimal changes are needed to wacom_wac.c in the kernel in order to fix this issue. And getting the Ubuntu kernel source code to patch is easy, as is compiling it. If you don't know how look in Appendix 1 at this HOW TO: http://ubuntuforums.org/showthread.php?t=1038949

So if you're interested in helping with this issue and have a Graphire4 or other tablet with this issue (presumably because it also uses the Graphire logic) please join the discussion on linuxwacom-discuss: https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss Currently the thread is titled "Graphire4 Pad Button freeze with 0.10.11." In the archive: http://sourceforge.net/mailarchive/forum.php?thread_name=BANLkTin6pBx7YeMcbfX8EELZ8SZPf1v_Mw%40mail.gmail.com&forum_name=linuxwacom-discuss

Favux

Revision history for this message
Favux (favux-is) wrote :

We have a fix.

Jason Gerecke, another linux wacom developer, happened to have a Graphire4 to test with. Chris Bagwell's patch (attached) against a recent kernel git was tested by Jason and works. It should be submitted upstream to the kernel's linux-input at some point.

Connor and kopiwie, I don't know when and if Ubuntu would back port this fix into Natty. There seems little chance of regression with it. In the meantime you could use input-wacom-0.11.0 for its wacom.ko. Compiling it is also described in the HOW TO linked above. Jason said it worked for him because it already had the line:

      input_event(input, EV_MSC, MSC_SERIAL, 1);

in it. So you could try it and see if it does the job. You may not need to add the other line if it works ok for you.

tags: added: patch
Revision history for this message
Connor Carney (cscarney) wrote :

That patch fixes the problem for me.

Revision history for this message
Bryce Harrington (bryce) wrote :

As this is a patch against the linux kernel, I'm retargeting the bug to linux so the kernel team can give it consideration.

summary: - USB Graphire4 pad buttons stop working after pen input
+ [PATCH] USB Graphire4 pad buttons stop working after pen input
affects: xf86-input-wacom (Ubuntu) → linux (Ubuntu)
Revision history for this message
Bryce Harrington (bryce) wrote :

It might be worth sru'ing too, but will just target to oneiric for now.

Changed in linux (Ubuntu Oneiric):
milestone: none → oneiric-alpha-2
Revision history for this message
Martin Pitt (pitti) wrote :

Too late for alpha-2, moving to alpha-3. Kernel team, can you please review this patch? Thanks!

Changed in linux (Ubuntu Oneiric):
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
milestone: oneiric-alpha-2 → oneiric-alpha-3
Revision history for this message
Tim Gardner (timg-tpi) wrote :

Favux (favux-is) - I need provenance for the patch in #10. Better yet, a pointer to a maintainer repository from which I can pull.

Revision history for this message
Favux (favux-is) wrote :

Hi Tim,

Chris and Jason didn't submit the patch graphire.dif as originally planned. Ping took over and combined it with some other changes and submitted it. Right now Henrik Rydberg has a hold on the second patch because he wants it split up:

https://patchwork.kernel.org/patch/917862/

https://patchwork.kernel.org/patch/917872/

Both at linux-input of course: https://patchwork.kernel.org/project/linux-input/list/

Accepted patches have been usually showing up on Dmitry Torokhov's next branch: http://git.kernel.org/?p=linux/kernel/git/dtor/input.git;a=shortlog;h=refs/heads/next

Before going on the for-linus branch.

Revision history for this message
Tim Gardner (timg-tpi) wrote :

Favux (favux-is) - please send a note to <email address hidden> when a patch correcting this bug has landed in Linus' tree (likely during the merge window for 3.1). Otherwise I'm liable to miss it in the the storm of bug mail that I receive.

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in dianosing the problem. From a terminal window please run:

apport-collect 782756

and then change the status of the bug back to 'New'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Setting status to Triaged since we know patches are making their way upstream.

Changed in linux (Ubuntu Oneiric):
importance: Undecided → Medium
status: Incomplete → Triaged
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Pushing milestone out to Beta-1

Changed in linux (Ubuntu Oneiric):
milestone: oneiric-alpha-3 → ubuntu-11.10-beta-1
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Pushing to Beta 2.

Changed in linux (Ubuntu Oneiric):
milestone: ubuntu-11.10-beta-1 → ubuntu-11.10-beta-2
Changed in linux (Ubuntu Oneiric):
milestone: ubuntu-11.10-beta-2 → ubuntu-11.10
Revision history for this message
Joseph Salisbury (jsalisbury) wrote : Unsupported series, setting status to "Won't Fix".

This bug was filed against a series that is no longer supported and so is being marked as Won't Fix. If this issue still exists in a supported series, please file a new bug.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: Triaged → Won't Fix
Revision history for this message
dino99 (9d9) wrote :
Changed in linux (Ubuntu Oneiric):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.