#24 Unable to get proper input accuracy (bad magic)

closed
Ping Cheng
5
2014-08-28
2008-09-02
ojb
No

Not really sure if this is a problem with wacom. Anyway:

When using xournal I don't get proper input resolution. It seems to be equivalent to mouse accuracy. I don't think it's a xournal problem, as it worked in debian (testing) but broke after a uppgrade (that did not include xournal). I will try to figure out exacly what was upgraded.

I get lots of these in my Xorg.0.log:
xf86WcmSerialValidate: bad magic at 0 v=6 l=9
xf86WcmSerialValidate: bad magic at 0 v=0 l=9
xf86WcmSerialValidate: bad magic at 3 v=9e l=9
xf86WcmSerialValidate: bad magic at 0 v=6 l=9
xf86WcmSerialValidate: bad magic at 0 v=6 l=9
xf86WcmSerialValidate: bad magic at 2 v=98 l=9
xf86WcmSerialValidate: bad magic at 0 v=6 l=9
xf86WcmSerialValidate: bad magic at 0 v=6 l=9
xf86WcmSerialValidate: bad magic at 0 v=60 l=9
xf86WcmSerialValidate: bad magic at 2 v=fe l=9
xf86WcmSerialValidate: bad magic at 0 v=0 l=9
xf86WcmSerialValidate: bad magic at 0 v=0 l=9
xf86WcmSerialValidate: bad magic at 2 v=80 l=9
xf86WcmSerialValidate: bad magic at 6 v=86 l=9
xf86WcmSerialValidate: bad magic at 4 v=98 l=9
xf86WcmSerialValidate: bad magic at 0 v=6 l=9
xf86WcmSerialValidate: bad magic at 3 v=86 l=9
xf86WcmSerialValidate: bad magic at 4 v=98 l=9

When I run wacdump -f tpc /dev/ttyS0 I get various warnings/errors like: "Bad high bit, discarding 1 bytes", "LOBIT FAIL", and "Resetting tablet due to bit errors"

Also when I'm running wacdump, I can get the machine to hang (at least X) untill I move the stylus again.

I get this bahvior on two distroes: Arch linux, and debian testing. As I mentioned everything has worked properly on debian. I think it's been like this on arch as long as I've used it. (not very long)

This is a toshiba M7 tablet pc.

Info for arch: (I have not tried compiling directly, maybe I should?)
linuxwacom: 0.8.1
kernel: 2.6.26
xorg: 1.4.2

From lshal:
udi = '/org/freedesktop/Hal/devices/pnp_WACf004'
info.capabilities = {'input', 'input.tablet', 'input.tablet.tabletPC'} (string
list)
info.linux.driver = 'serial' (string)
info.parent = '/org/freedesktop/Hal/devices/computer' (string)
info.product = 'Wacom Serial Tablet PC Pen Tablet/Digitizer' (string)
info.subsystem = 'pnp' (string)
info.udi = '/org/freedesktop/Hal/devices/pnp_WACf004' (string)
linux.hotplug_type = 2 (0x2) (int)
linux.subsystem = 'pnp' (string)
linux.sysfs_path = '/sys/devices/pnp0/00:0c' (string)
pnp.description = 'Wacom Serial Tablet PC Pen Tablet/Digitizer' (string)
pnp.id = 'WACf004' (string)
pnp.serial.irq = 4 (0x4) (int)
pnp.serial.port = '0x338' (string)

I can post the debian specific info after I reboot.

xorg.conf (from arch) attached.

https://bugs.launchpad.net/ubuntu/+source/wacom-tools/+bug/259659 may be related/same issue

Ask if I've forgotten some important information.

Discussion

  • ojb
    ojb
    2008-09-02

    archlinux xorg.conf

     
    Attachments
  • Ping Cheng
    Ping Cheng
    2008-09-02

    Logged In: YES
    user_id=754442
    Originator: NO

    Please compile and install 0.8.1-4 on your system. In fact, you only need to compile and install wacom_drv.so (the X driver) since your serial Tablet PC doesn't need the Wacom kernel driver (wacom.ko).

     
  • Logged In: NO

    Done, still same issues. (Although I couldn't reproduce the temporal locking, but this was kinda hard to provoke anyway)

    I assume this means that the driver was installed correctly:
    (II) Loading /usr/lib/xorg/modules/input//wacom_drv.so
    (II) Module wacom: vendor="X.Org Foundation"
    compiled for 4.3.99.902, module version = 1.0.0
    Module class: X.Org XInput Driver
    ABI class: X.Org XInput driver, version 2.0
    (II) Wacom driver level: 47-0.8.1-4 $

    Is there some kind of debugging I could do? Eg. some other utilities than wacdump?

    I'll try debian later today

     
  • ojb
    ojb
    2008-09-03

    Logged In: YES
    user_id=1671964
    Originator: YES

    Update: I tried compiling some old versions. I get proper accuracy in xournal, and no bad magics with version 0.7.6-4. wacdump still spews warnings and errors though, and when running it in parallell, the input gets really choppy.

    I also tried 0.8.0-3 but there the problems where still present.

     
  • Ping Cheng
    Ping Cheng
    2008-09-04

    Logged In: YES
    user_id=754442
    Originator: NO

    issue: xsetwacom set stylus debuglevel 12
    xsetwacom set stylus commondbg 12

    then move your pen on the tablet a little bit and email /var/log/Xorg.0.log to me.

     
  • ojb
    ojb
    2008-09-05

    Logged In: YES
    user_id=1671964
    Originator: YES

    Uploaded the file here as an attachment as the sourceforge email system doesn't allow attachments (?)

    Taken from debian testing. (Kernel: 2.6.26)

     
  • ojb
    ojb
    2008-09-05

    Logged In: YES
    user_id=1671964
    Originator: YES

    File Added: Xorg.0.log

     
  • ojb
    ojb
    2008-09-05

    xorg log (debian) with debuglevel, sommondbg = 12

     
    Attachments
  • ojb
    ojb
    2008-09-05

    Logged In: YES
    user_id=1671964
    Originator: YES

    Had remove the last part of the file to upload it

     
  • Ping Cheng
    Ping Cheng
    2008-09-05

    Logged In: YES
    user_id=754442
    Originator: NO

    I don't see any issue in your Xorg.0.log. I feel the problem may be in the communication between XInput and xournal due to the recent change we (linuxwacom project) made to support Xorg 1.4 or later. We used to report tablet coordinates to Xinput (through valuators). But the new Xorg does not support this. It only takes screen coordiantes. You may have to stay with 0.7.6 to get the higher accuracy.

     
  • ojb
    ojb
    2008-09-05

    Logged In: YES
    user_id=1671964
    Originator: YES

    Hm... So you are saying that it's not longer possible to get high resolution input? Or is there another method?

    I am running xorg version 1.4.2 though, so it's strange that 0.7.6 works?

    A weird thing is that xmodmap refuses to work (and even crashes X with certain commands) when I use 0.7.6. For now I'm starting a new X server when I need to use xournal :)

    What about the wacdump errors/warnings? Is that normal?

     
  • Denis Auroux
    Denis Auroux
    2008-09-06

    Logged In: YES
    user_id=1482965
    Originator: NO

    It's very sad if high resolution input can't be reported any more because of a change in the X.org architecture... though I am confused, if it still works with 0.7.6 then it should still be possible, no ?

    Anyway: Ping, have you tried talking to the X.org development team and pointing out to them that not having a way for devices to report XInput events with a higher accuracy than screen resolution is a major loss of functionality as far as wacom tablets are concerned?

    Actually, I don't know the status of this document (it looks a bit tentative), but the XInput specifications at http://xorg.freedesktop.org/wiki/XInputSpec seem to recommend that the drivers should send absolute events in device coordinates, not screen coordinates (see under "XSetDeviceMode()"). So I would find it surprising that they would willfully remove the possibility to do so.

    Best,
    Denis

    Thanks,
    Denis

     
  • Denis Auroux
    Denis Auroux
    2008-09-06

    Logged In: YES
    user_id=1482965
    Originator: NO

    Actually, I looked into the code of linuxwacom 0.8.1-4, and if I understand correctly the scaling down of device events to screen resolution is controlled by the WCM_TABLET_SCALING compile-time define. If I read the configure script correctly, this rescaling is enabled when compiling against versions 1.4.0.0 to 1.4.99.1 of X.org, and not for older or more recent versions. You can force disabling it by passing --disable-quirk-tablet-rescale to the configure script. So it looks like there's only a range of versions of X.org that have the problem.

    Denis

     
  • ojb
    ojb
    2008-09-06

    Logged In: YES
    user_id=1671964
    Originator: YES

    Thanks Denis, compiling with that switch fixes it. (xmodmap works too)

     
  • Ping Cheng
    Ping Cheng
    2008-09-08

    Logged In: YES
    user_id=754442
    Originator: NO

    Then, does your Wacom tool still move the system cusor proper on the screen? The scaling was to make sure your tablet can be mapped onto your whole screen for X.org 1.4 or later. Ping

     
  • ojb
    ojb
    2008-09-08

    Yes. That I've never had a problem with.
    But if this is correct ("when compiling
    against versions 1.4.0.0 to 1.4.99.1") I don't really have an offending xorg version.

     
  • As far as I know, you are running 1.4.2, which is between 1.4.0.0 and 1.4.99.1. Maybe the check should stop at 1.4.2.0, i.e., it should be 1.4.0.0 to 1.4.2.0? Ping

     
  • ojb
    ojb
    2008-09-10

    Ah, sorry. Brain shortcut. For my case it works at least. I guess it should be tested with more machines and a stock xorg too. (Could be debian applies some patches) -- ojb

     
  • Ping Cheng
    Ping Cheng
    2008-09-11

    • labels: --> Build Problem
    • assigned_to: nobody --> pingc
    • status: open --> closed
     
  • Ping Cheng
    Ping Cheng
    2008-09-11

    Updated configure.in will be in 0.8.1-5. The new parameter only applies to Xorg 1.4.0 tp 1.4.2.