Hello, tech@ So I installed OpenBSD on old Compaq laptop and noticed that scrolling with touchpad is not working. I started investigating to see why it is the case and found out a few odd things in wscons(4) and pckbc(4) drivers.
Basically, the laptop's touchpad lacks multifinger support (see dmesg below), but nevertheless, wscons(4) sets it to two-finger mode, which doesn't work, obviously. Initially, I thought about adding something like mouse.tp.edgescroll to wsconsctl(8). I then found out that there is already undocumented mouse.tp.param option, that can be used to force the edgescroll mode by setting 67 (WSMOUSECFG_TWOFINGERSCROLL) to 0 and 68 (WSMOUSECFG_EDGESCROLL) to 1, but I don't think it is very convenient and readable. Later I continued to investigate, why wscons(4) defaults to two-finger mode and found that it does so by examining a field of a touchpad data structure called 'contacts_max' [1], which, I assumed, represents a number of maximum simultaneous touches. But when I grepped for this name to see where this value is set, I found that it is set in pckbc(4). It is done in a very simple way, so it sets it to 3 (well, actually SYNAPTICS_MAX_FINGERS, but it is defined to be 3 only there and nowhere else) if the device in question is a synaptics touchpad (!) [2], even though the touchpad has a capabilities field and it is recognized correctly (SYNAPTICS_CAP_MULTIFINGER is set to 0 in my case). So I think a solution would be at least checking SYNAPTIC_CAP_MULTIFINGER and setting contacts_max depending on that (3 if true, 1 if false). Maybe it is a bodge, but it works. Index: pms.c =================================================================== RCS file: /cvs/src/sys/dev/pckbc/pms.c,v retrieving revision 1.97 diff -u -p -r1.97 pms.c --- pms.c 23 Jul 2022 05:55:16 -0000 1.97 +++ pms.c 18 Apr 2023 21:36:10 -0000 @@ -1075,7 +1075,10 @@ synaptics_get_hwinfo(struct pms_softc *s hw->y_max = (max_coords ? SYNAPTICS_Y_LIMIT(max_coords) : SYNAPTICS_YMAX_BEZEL); - hw->contacts_max = SYNAPTICS_MAX_FINGERS; + if(syn->capabilities & SYNAPTICS_CAP_MULTIFINGER) + hw->contacts_max = SYNAPTICS_MAX_FINGERS; + else + hw->contacts_max = 1; syn->sec_buttons = 0; [1]: /sys/dev/wscons/wstpad.c:1573 [2]: /sys/dev/pckbc/psm.c:1078 Here are relevant lines from dmesg(8): pms0 at pckbc0 (aux slot) wsmouse0 at pms0 mux 0 pms0: Synaptics touchpad, firmware 6.5, 0x1c0b1 0xa00000 0x0 0xa04751 0x0 So I'm looking forward for comments on this. Has anybody experienced something similar? -- best regards, la ninpre.