<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:gdr3941@me.com" title="Greg Reichow <gdr3941@me.com>"> <span class="fn">Greg Reichow</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Acceleration still too slow with medium finger movements"
href="https://bugs.freedesktop.org/show_bug.cgi?id=101139">bug 101139</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>gdr3941@me.com
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Acceleration still too slow with medium finger movements"
href="https://bugs.freedesktop.org/show_bug.cgi?id=101139#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Acceleration still too slow with medium finger movements"
href="https://bugs.freedesktop.org/show_bug.cgi?id=101139">bug 101139</a>
from <span class="vcard"><a class="email" href="mailto:gdr3941@me.com" title="Greg Reichow <gdr3941@me.com>"> <span class="fn">Greg Reichow</span></a>
</span></b>
<pre>Peter-
First off thanks for all your work with libinput. Really appreciate your
contribution to the community.
I also had a pretty bad experience with libinput on a Macbook Pro 8,2 using
1.8.4 and also in 1.9. Pointer acceleration felt really different from what I
was used to on the machine under MacOS. Slow movements were two "jerky",
medium were not fast enough, etc. (I had previously been using mtrack under
xorg with mediocre results)
I spent some time and created a mac app to profile the touchpad acceleration
profiles used in MacOS. It was a course view, but provided some insight into
what felt right for this machine. I then took a crack at modifying the
acceleration code in libinput to best match this profile curve. After some
tuning, it seems to be working really great for me on this machine. The basic
acceleration is a power function. Copied below is the new
touchpad_accel_profile function I am using. It is pretty sensitive (my desired
speed setting is right in the middle), yet gives me a lot of room to adjust
from slow to really fast using the normal speed slider.
My apologies if this is not the right way to help share this information. This
below plus a couple other small improvements has made libinput (and therefore
Wayland) very enjoyable for me with an old macbook pro touchpad. The pointer
acceleration has a really nice balance of slow speed accuracy and high speed
capability. FWIW.
Code below
----------
double
touchpad_apple_accel_profile(struct motion_filter *filter,
void *data,
double speed_in, /* in device units/µs */
uint64_t time)
{
struct pointer_accelerator *accel_filter =
(struct pointer_accelerator *)filter;
const double max_accel = accel_filter->accel; /* unitless factor */
double factor; /* unitless */
/* Convert to mm/s because that's something one can understand */
speed_in = v_us2s(speed_in) * 25.4/accel_filter->dpi;
// Convert into speed that my formula used which assumed 1 = distance
of trackpad in X (103mm for my pad); should fix the formulas below to make this
a function of the trackpad distance in mm instead.
double norm_in = speed_in / 103.0;
// X adjustment; range on Apple was .07 to .7 (fastest)
double x_factor = 0.385 + 0.315 * filter->speed_adjustment;
// Power adjustment; range on Apple was 1.1 to 1.5 (fastest)
double power = 1.3 + 0.2 * filter->speed_adjustment;
// first number is a magic number to get into the scale that is
appropriate
factor = 3.5 * pow(norm_in * x_factor, power);
// Minimum factor for slow speeds
if (factor < 0.20) {
factor = 0.20;
}
/* Cap at the maximum acceleration factor */
factor = min(max_accel, factor);
return factor;
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>