Index | Thread | Search

From:
Thomas Dettbarn <dettus@dettus.net>
Subject:
Re: imt touchpad scaling and acceleration
To:
tech@openbsd.org
Date:
Sun, 1 Jun 2025 02:17:03 +0200

Download raw body.

Thread
Hello!


First of all:
Yes, it is, even though it is not in sys/dev/i2c/imt.c, but rather
in sys/dev/hid/hidmt.c. This is where the capabilities of your device 
are being parsed.


In it, there is a function hidmt_get_resolution(). (Roughly line 68).

If you want to edit the kernel sources, you could add some printf() to 
see the values of
h->logical_maximum/h->logical_minimum and 
h->physical_maximum/h->physical_minimum
You might see those values 1162 and 634 somewhere.

I suppose you COULD also alter this function to see what happens, BUT I 
think that
you should look into the options provided by xinput/xrandr/xset first.


Does that help?


Thomas


P.S.: If you are feeling brave enough, maybe you can try out my
patch and tell me, if your touchpad is still working afterwards. :)

https://marc.info/?l=openbsd-tech&m=174841257723328&w=2

(The patch is currently awaiting approval/attention)

On 6/1/25 01:37, Chris Narkiewicz wrote:
> I'm running OpenBSD 7.7 on ThinkPad X1 Gen7 with imt touchad.
>
> wsconsctl | egrep 'mouse\.'
>
> mouse.type=touchpad
> mouse.rawmode=0
> mouse.scale=0,1162,0,634,0,12,12
> mouse.reverse_scrolling=0
>
> Sadly the touchpad acceleration profile makes it rather unpleasant to
> use. I tried to alter the scale using wsconsctl but it looks like
> imt driver doesn't allow it.
>
> I'm wondering how those parameters are calculated in the kernel and if
> it's possible to alter the driver in code. I browsed imt.c briefly, but
> so far I don't see an obvious way to alter the scaling.
>
> I'd be grateful for any insight or direction.
>
> Best regards,
> Chris Narkiewicz
>