Okay, this even survives three consecutive reboots. With this my Bamboo Fun CTH-661 (0xd8) works just fine with Ubuntu 10.04. (Otherwise I'd get a segfault at startup when the pen was on the surface.)
Signed-off-by: Gottfried "gohai" Haider <[email protected]> diff -u -r orig/src/wcmCommon.c mod/src/wcmCommon.c --- orig/src/wcmCommon.c 2011-01-18 02:30:57.129687761 +0100 +++ mod/src/wcmCommon.c 2011-01-18 02:55:24.352257854 +0100 @@ -1094,7 +1094,7 @@ /* Tool on the tablet when driver starts. This sometime causes * access errors to the device */ - if (pDev && !miPointerGetScreen(pDev->dev)) + if (pDev && (!pDev->dev || !miPointerGetScreen(pDev->dev))) { xf86Msg(X_ERROR, "wcmEvent: Wacom driver can not get Current Screen ID\n"); xf86Msg(X_ERROR, "Please remove Wacom tool from the tablet and bring it back again.\n"); (send as a copy to -devel because CC triggered a ban ;) cheers, Gottfried On Tue, Jan 18, 2011 at 2:40 AM, Gottfried Haider <[email protected]> wrote: > Okay, that's probably the wrong fix for it (haven't tested it yet > either), but I've established that pDev->dev is indeed NULL when this > piece of code is first called during startup and I am holding my newly > acquired pen to the tablet surface. > > miPointerGetScreen doesn't check for pDev being NULL but uses the > MIPOINTER macro - which then does things like > (!IsMaster(dev) && !dev->u.master) > > Totally-untested-by: Gottfried Haider <[email protected]> > > diff -r -u orig/src/wcmCommon.c mod/src/wcmCommon.c > --- orig/src/wcmCommon.c 2011-01-18 02:30:57.129687761 +0100 > +++ mod/src/wcmCommon.c 2011-01-18 02:33:34.265724211 +0100 > @@ -1094,7 +1094,7 @@ > > /* Tool on the tablet when driver starts. This sometime causes > * access errors to the device */ > - if (pDev && !miPointerGetScreen(pDev->dev)) > + if (pDev && pDev->dev && !miPointerGetScreen(pDev->dev)) > { > xf86Msg(X_ERROR, "wcmEvent: Wacom driver can not get Current > Screen ID\n"); > xf86Msg(X_ERROR, "Please remove Wacom tool from the tablet and > bring it back again.\n"); > > > On Tue, Jan 18, 2011 at 2:21 AM, Gottfried Haider > <[email protected]> wrote: >> Replying to myself: >> >> I figured out that it only happens when the pen is on the tablet. And >> from looking at the objdump it seems indeed as there is something >> wrong with the call to miPointerGetScreen() in wcmCommon.c. >> >> On Tue, Jan 18, 2011 at 12:26 AM, Gottfried Haider >> <[email protected]> wrote: >>> Hello all, >>> >>> I recently got hold of a Bamboo Fun tablet (CTH-661 aka 0xd8), and >>> trying to get it going with the latest Ubuntu LTS release, which is >>> 10.04 (x.org 1.7.6). >>> >>> Following a quite detailed guide on Ubuntu's Forum [1] I compiled and >>> installed xf86-input-wacom from git [2]. While this appeared to have >>> worked, after restarting I now get the following segfault: >>> >>> (II) config/udev: Adding input device Wacom Bamboo Comic 2FG Pen >>> (/dev/input/event7) >>> (**) Wacom Bamboo Comic 2FG Pen: Applying InputClass "evdev tablet catchall" >>> (**) Wacom Bamboo Comic 2FG Pen: Applying InputClass "Wacom class" >>> (II) LoadModule: "wacom" >>> (II) Loading /usr/lib/xorg/modules/input/wacom_drv.so >>> (II) Module wacom: vendor="X.Org Foundation" >>> compiled for 1.7.6, module version = 0.10.10 >>> Module class: X.Org XInput Driver >>> ABI class: X.Org XInput driver, version 7.0 >>> (**) Option "Device" "/dev/input/event7" >>> (II) Wacom Bamboo Comic 2FG Pen: type not specified, assuming 'stylus'. >>> (II) Wacom Bamboo Comic 2FG Pen: other types will be automatically added. >>> (**) Wacom Bamboo Comic 2FG Pen stylus: always reports core events >>> (--) Wacom Bamboo Comic 2FG Pen stylus: using pressure threshold of 27 >>> for button 1 >>> (--) Wacom Bamboo Comic 2FG Pen stylus: Wacom USB Bamboo tablet >>> maxX=21648 maxY=13530 maxZ=1023 resX=2540 resY=2540 tilt=disabled >>> (II) Wacom Bamboo Comic 2FG Pen stylus: hotplugging dependent devices. >>> (**) Option "Device" "/dev/input/event7" >>> (**) Wacom Bamboo Comic 2FG Pen eraser: always reports core events >>> (--) Wacom Bamboo Comic 2FG Pen eraser: Wacom USB Bamboo tablet >>> maxX=21648 maxY=13530 maxZ=1023 resX=2540 resY=2540 tilt=disabled >>> (II) XINPUT: Adding extended input device "Wacom Bamboo Comic 2FG Pen >>> eraser" (type: ERASER) >>> (--) Wacom Bamboo Comic 2FG Pen eraser: top X=0 top Y=0 bottom X=21648 >>> bottom Y=13530 resol X=2540 resol Y=2540 >>> (II) Wacom Bamboo Comic 2FG Pen stylus: hotplugging completed. >>> >>> Backtrace: >>> 0: /usr/bin/X (xorg_backtrace+0x3b) [0x80eaadb] >>> 1: /usr/bin/X (0x8048000+0x610fd) [0x80a90fd] >>> 2: (vdso) (__kernel_rt_sigreturn+0x0) [0xe43410] >>> 3: /usr/lib/xorg/modules/input/wacom_drv.so (0x2e4000+0x6fbd) [0x2eafbd] >>> 4: /usr/lib/xorg/modules/input/wacom_drv.so (0x2e4000+0xc332) [0x2f0332] >>> 5: /usr/lib/xorg/modules/input/wacom_drv.so (0x2e4000+0x4089) [0x2e8089] >>> 6: /usr/lib/xorg/modules/input/wacom_drv.so (0x2e4000+0x4305) [0x2e8305] >>> 7: /usr/bin/X (0x8048000+0x66f9f) [0x80aef9f] >>> 8: /usr/bin/X (0x8048000+0x118794) [0x8160794] >>> 9: (vdso) (__kernel_sigreturn+0x0) [0xe43400] >>> 10: /usr/bin/X (0x8048000+0x76648) [0x80be648] >>> 11: /usr/bin/X (0x8048000+0x76c59) [0x80bec59] >>> 12: /usr/bin/X (0x8048000+0x11171d) [0x815971d] >>> 13: /usr/bin/X (0x8048000+0x111a86) [0x8159a86] >>> 14: /usr/bin/X (config_init+0x17) [0x809ce37] >>> 15: /usr/bin/X (0x8048000+0x1ed34) [0x8066d34] >>> 16: /lib/tls/i686/cmov/libc.so.6 (__libc_start_main+0xe6) [0x4dcbd6] >>> 17: /usr/bin/X (0x8048000+0x1e961) [0x8066961] >>> Segmentation fault at address 0x11c >>> >>> >>> Since I thought that HEAD might simply be unstable as of now, I did a >>> "sudo make uninstall" and compiled and installed version 0.10.10. >>> Using this release version I seem, however to get the same backtrace >>> as before (albeit with different offsets). Am I doing something wrong >>> here? >>> >>> This is on an Intel Atom N270 (hence 32-bit OS) with Ubuntu 10.04 and >>> their standard kernel (except for patched and compiled wacom.ko of >>> course) and x.org. The header of the Xorg.log file looks like the >>> following: >>> >>> X.Org X Server 1.7.6 >>> Release Date: 2010-03-17 >>> X Protocol Version 11, Revision 0 >>> Build Operating System: Linux 2.6.24-28-server i686 Ubuntu >>> Current Operating System: Linux g 2.6.32-27-generic #49-Ubuntu SMP Wed >>> Dec 1 23:52:12 UTC 2010 i686 >>> Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.32-27-generic >>> root=UUID=c55d71d9-0e9b-4caf-985c-cc8706b80b0d ro quiet splash >>> Build Date: 10 November 2010 11:25:26AM >>> xorg-server 2:1.7.6-2ubuntu7.4 (For technical support please see >>> http://www.ubuntu.com/support) >>> >>> >>> Any ideas? >>> >>> cheers, >>> Gottfried >>> >>> PS: Please CC me as I might no longer be subscribed to this list. >>> >>> [1] http://ubuntuforums.org/showthread.php?t=1515562 >>> [2] eafa237b16edc3e52f2652de8ab208af2bf2acac >>> >> > ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Linuxwacom-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
