Comment 22 for bug 522318

Revision history for this message
John D Lamb (j-d-lamb) wrote :

I’ve been trying to configure an antique Wacom serial tablet I got in the lower oölitic silurian. This one gets its power from the PS/2 mouse or keyboard socket and transfers data through the serial port. First:

$ udevadm info --path=/sys/class/tty/ttyS0/ --attribute-walk

Udevadm info starts with the device specified by the devpath and then

walks up the chain of parent devices. It prints for every device

found, all possible attributes in the udev rules key format.

A rule to match, can be composed by the attributes of the device

and the attributes from one single parent device.

  looking at device '/devices/pnp0/00:07/tty/ttyS0':

    KERNEL=="ttyS0"

    SUBSYSTEM=="tty"

    DRIVER==""

  looking at parent device '/devices/pnp0/00:07':

    KERNELS=="00:07"

    SUBSYSTEMS=="pnp"

    DRIVERS=="serial"

    ATTRS{id}=="PNP0501"

  looking at parent device '/devices/pnp0':

    KERNELS=="pnp0"

    SUBSYSTEMS==""

    DRIVERS==""

The only identifying attribute is PNP0501. So I adjust /etc/udev/rules.d/65-xorg-wacom.rules:
ACTION=="add|change", SUBSYSTEM=="pnp", ATTR{id}=="WACf*", ENV{NAME}="Serial Wacom Tablet"

ACTION=="add|change", SUBSYSTEM=="pnp", ATTR{id}=="FUJ*", ENV{NAME}="Serial Wacom Tablet"

ACTION=="add|change", SUBSYSTEM=="pnp", ATTR{id}=="PNP0501", ENV{NAME}="Serial Wacom Tablet"

ACTION=="add|change", SUBSYSTEMS=="pnp", ATTRS{id}=="WACf*", ENV{ID_INPUT}="1", ENV{ID_INPUT_TABLET}="1", ENV{x11_driver}="wacom"

ACTION=="add|change", SUBSYSTEMS=="pnp", ATTRS{id}=="FUJ*", ENV{ID_INPUT}="1", ENV{ID_INPUT_TABLET}="1", ENV{x11_driver}="wacom"

ACTION=="add|change", SUBSYSTEMS=="pnp", ATTRS{id}=="PNP0501", ENV{ID_INPUT}="1", ENV{ID_INPUT_TABLET}="1", ENV{x11_driver}="wacom"

Now test:
$ udevadm test /class/tty/ttyS0


parse_file: reading '/etc/udev/rules.d/65-xorg-wacom.rules' as rules file


parse_file: reading '/lib/udev/rules.d/69-xserver-xorg-input-wacom.rules' as rules file


udev_rules_new: can not read '/etc/udev/rules.d/z80_user.rules'

udev_rules_new: rules use 215040 bytes tokens (17920 * 12 bytes), 35059 bytes buffer

udev_rules_new: temporary index used 57380 bytes (2869 * 20 bytes)

udev_device_new_from_syspath: device 0x217b1800 has devpath '/devices/pnp0/00:07/tty/ttyS0'

udev_device_new_from_syspath: device 0x217bab70 has devpath '/devices/pnp0/00:07/tty/ttyS0'

udev_device_read_db: device 0x217bab70 filled with db file data

udev_device_new_from_syspath: device 0x217bac80 has devpath '/devices/pnp0/00:07'

udev_device_new_from_syspath: device 0x217baf48 has devpath '/devices/pnp0'

udev_rules_apply_to_event: LINK 'char/4:64' /lib/udev/rules.d/50-udev-default.rules:4

udev_rules_apply_to_event: GROUP 20 /lib/udev/rules.d/50-udev-default.rules:15

udev_rules_apply_to_event: RUN 'socket:@/org/freedesktop/hal/udev_event' /lib/udev/rules.d/90-hal.rules:2

udev_event_execute_rules: no node name set, will use kernel supplied name 'ttyS0'

udev_device_update_db: created db file for '/devices/pnp0/00:07/tty/ttyS0' in '/dev/.udev/db/tty:ttyS0'

udev_node_add: creating device node '/dev/ttyS0', devnum=4:64, mode=0660, uid=0, gid=20

udev_node_mknod: preserve file '/dev/ttyS0', because it has correct dev_t

node_symlink: preserve already existing symlink '/dev/char/4:64' to '../ttyS0'

udevadm_test: UDEV_LOG=6

udevadm_test: DEVPATH=/devices/pnp0/00:07/tty/ttyS0

udevadm_test: MAJOR=4

udevadm_test: MINOR=64

udevadm_test: DEVNAME=/dev/ttyS0

udevadm_test: ACTION=add

udevadm_test: SUBSYSTEM=tty

udevadm_test: DEVLINKS=/dev/char/4:64

udevadm_test: ID_INPUT=1

udevadm_test: ID_INPUT_TABLET=1

udevadm_test: x11_driver=wacom

udevadm_test: run: 'socket:@/org/freedesktop/hal/udev_event'

I think I should be expecting more than this.

Now /var/log/Xorg.0.log gives (for example):
(WW) Serial Wacom Tablet: Waited too long for answer (failed after 3 tries).

(WW) Serial Wacom Tablet: Waited too long for answer (failed after 3 tries).

(WW) Serial Wacom Tablet: Waited too long for answer (failed after 3 tries).

(II) Serial Wacom Tablet: serial tablet id 0x90.

(EE) Couldn't init device "Serial Wacom Tablet"

(II) Serial Wacom Tablet: removing automatically added devices.

(II) UnloadModule: "wacom"

Not surprisingly the tablet doesn’t work.