Sven M. Hallberg wrote (2022-12-08 14:12 CET):
> Marcus Glocker on Sat, Sep 03 2022:
> > I have an Wacom One CTL-672, never used it on OpenBSD.
> 
> This is the "Wacom One M", which I also own...
> 
> > Currently it attaches to ums(4). Works fine with that.
> 
> It seems to expose two HIDs, one which reports as a regular "mouse" and
> makes it work like a touchpad (relative mode), and a second one (with a
> nonsense report descriptor) that can be used for absolute positioning.
> 
> > It also works fine when attaching to uwacom(4), without and with your
> > diff.  It doesn't seem to require specific 'tsscale' nor
> > 'loc_tip_press' settings.
> 
> This does not match my experience; the second device (which uwacom
> attaches to) did not produce any events. It appears it needs the call to
> uhidev_set_report() of the "One S" code path to switch on.
> 
> Trivial patch below that made it produce events for me.
> 
> I did have to fiddle with xinput(1) to get the scale right. I ended up
> putting the following in its InputDevice section in /etc/X11/xorg.conf:
> 
>         Option      "TransformationMatrix" "0.09 0 0 0 0.08 0 0 0 1"
> 
> I wonder what the correct way is to avoid having to do this. Is it those
> tsscale parameters? If so, what's the best way to determine the correct
> values?

I don't think the scale values can be read from the device.
But you can get them from the linux wacom driver here:
https://github.com/linuxwacom/input-wacom/blob/master/4.5/wacom_wac.c#L11

Untested patch below.

Best Regards,
Stefan

diff --git a/sys/dev/usb/uwacom.c b/sys/dev/usb/uwacom.c
index f9af276a641..2c4e51b7522 100644
--- a/sys/dev/usb/uwacom.c
+++ b/sys/dev/usb/uwacom.c
@@ -149,6 +149,11 @@ uwacom_attach(struct device *parent, struct device *self, 
void *aux)
                ms->sc_tsscale.maxy = 9500;
        }
 
+       if (uha->uaa->product == USB_PRODUCT_WACOM_ONE_M) {
+               ms->sc_tsscale.maxx = 21600;
+               ms->sc_tsscale.maxy = 13500;
+       }
+
        if (uha->uaa->product == USB_PRODUCT_WACOM_INTUOS_DRAW) {
                sc->sc_flags = UWACOM_USE_PRESSURE | UWACOM_BIG_ENDIAN;
                sc->sc_loc_tip_press.pos = 43;

Reply via email to