When two-finger scrolling through a web page in a Firefox, the scroll stops at random moments, requiring fingers to be lifted from the touchpad before it can continue. This can be fixed by setting the (undocumented) sysctl dev.hms.0.drift_thresh to 0.
Could you try to increase sysctl dev.hms.0.drift_thresh rather than set it to 0?
It is better with it set to eg 10, but it still occasionally gets stuck. I wonder... From what I understand it tries to detect and filter out repeating inputs. What if the problem happens because, differently from cursor movement which is kind of random: event6 POINTER_MOTION +0.536s 7.86/ 5.24 ( +6.00/ +4.00) event6 POINTER_MOTION +0.546s 7.76/ 1.29 ( +6.00/ +1.00) event6 POINTER_MOTION +0.556s 4.49/ 1.12 ( +4.00/ +1.00) event6 POINTER_MOTION +0.566s 2.00/ 0.00 ( +2.00/ +0.00) event6 POINTER_MOTION +0.576s 3.00/ -2.00 ( +3.00/ -2.00) event6 POINTER_MOTION +0.586s 2.00/ -3.00 ( +2.00/ -3.00) event6 POINTER_MOTION +0.596s 2.03/ -4.05 ( +2.00/ -4.00) event6 POINTER_MOTION +0.606s 0.00/ -6.82 ( +0.00/ -6.00) event6 POINTER_MOTION +0.616s 0.00/ -7.32 ( +0.00/ -6.00) event6 POINTER_MOTION +0.626s -5.32/ -9.31 ( -4.00/ -7.00) event6 POINTER_MOTION +0.636s -7.37/-10.32 ( -5.00/ -7.00) event6 POINTER_MOTION +0.646s -2.48/ -3.72 ( -2.00/ -3.00) event6 POINTER_MOTION +0.656s -3.01/ -3.01 ( -3.00/ -3.00) event6 POINTER_MOTION +0.666s -3.01/ -1.00 ( -3.00/ -1.00) event6 POINTER_MOTION +0.676s -2.00/ 0.00 ( -2.00/ +0.00) event6 POINTER_MOTION +0.686s -1.00/ 0.00 ( -1.00/ +0.00) event6 POINTER_MOTION +0.696s -2.00/ 0.00 ( -2.00/ +0.00) The scroll events in all direction look mostly the same: event6 POINTER_SCROLL_WHEEL +0.784s vert 15.00/120.0* horiz 0.00/0.0 (wheel) event6 POINTER_SCROLL_WHEEL +0.814s vert 15.00/120.0* horiz 0.00/0.0 (wheel) event6 POINTER_SCROLL_WHEEL +1.164s vert 15.00/120.0* horiz 0.00/0.0 (wheel) event6 POINTER_SCROLL_WHEEL +1.184s vert 15.00/120.0* horiz 0.00/0.0 (wheel) event6 POINTER_SCROLL_WHEEL +1.204s vert 15.00/120.0* horiz 0.00/0.0 (wheel) event6 POINTER_SCROLL_WHEEL +1.234s vert 15.00/120.0* horiz 0.00/0.0 (wheel) event6 POINTER_SCROLL_WHEEL +1.544s vert 15.00/120.0* horiz 0.00/0.0 (wheel) event6 POINTER_SCROLL_WHEEL +1.564s vert 15.00/120.0* horiz 0.00/0.0 (wheel) event6 POINTER_SCROLL_WHEEL +1.584s vert 15.00/120.0* horiz 0.00/0.0 (wheel) So perhaps the threshold logic is mistaking them for duplicates?
Here's a prototype patch: https://reviews.freebsd.org/D47640. I still need some advice on how to proceed: whether that's the right approach, and how to figure out which of the report variables is the wheel.