Finished the driver and installed it. Saving for archive.

This commit is contained in:
2026-07-15 11:15:33 +02:00
parent b56dd2a34e
commit e6e1e9a6d6
5 changed files with 215 additions and 32 deletions
+28 -7
View File
@@ -19,14 +19,35 @@ surface-dial-renewed --mode wheel
Normal Dial rotation emits a synthetic two-finger touchpad scroll through
`Surface Dial Renewed Touchpad`.
The driver starts a virtual two-finger contact on the first rotation event,
moves both virtual fingers vertically, and ends the touch gesture after no
rotation has arrived for 2 seconds.
The driver starts a virtual two-finger contact on the first rotation event and
moves both virtual fingers vertically. Gesture release is dynamic:
The 2 second hold is intentional. Very slow physical Dial movement can emit
sparse `REL_DIAL` events. If the virtual fingers are lifted too quickly, libinput
can treat those sparse movements as many tiny gestures and ignore them. Holding
the contact makes slow and precise movement accumulate into one gesture.
- normal and fast rotation releases after about `100ms`
- sparse precision movement can stretch release up to `1500ms`
The `100ms` minimum matches the old driver's multitouch control. The timeout is
based on the time gap between rotation events, not the raw delta size. That is
important because the Dial can emit `delta=1` even during normal fast scrolling.
If the virtual fingers are lifted too quickly during sparse movement, libinput
can treat those sparse events as many tiny gestures and ignore them. If the hold
is too long, page-edge overscroll animations can remain stretched for too long
before bouncing back.
The driver keeps the last rotation timestamp even after a virtual touch gesture
ends. This matters because sparse precision events can arrive after the 100ms
gesture has already been released. The next event still sees the previous event
gap and can stretch the new gesture timeout. A gap of `2500ms` or more is
treated as a real pause and resets back to the `100ms` minimum.
Timing is configurable:
```bash
surface-dial-renewed --mt-idle-ms 100 --mt-idle-max-ms 1500 --mt-settle-ms 80
```
`--mt-idle-ms` controls the fast-scroll minimum release timeout.
`--mt-idle-max-ms` controls the slow/precision maximum release timeout.
`--mt-settle-ms` controls the short stationary frame before the fingers lift.
## Sensitivity Selector
+19
View File
@@ -52,6 +52,25 @@ The service runs:
It restarts on failure with a 2 second delay.
To tune multitouch timing in the service, edit:
```text
~/.config/systemd/user/surface-dial-renewed.service
```
Example:
```text
ExecStart=%h/.cargo/bin/surface-dial-renewed --mode multitouch --mt-idle-ms 100 --mt-idle-max-ms 1500 --mt-settle-ms 80
```
Then reload and restart:
```bash
systemctl --user daemon-reload
systemctl --user restart surface-dial-renewed.service
```
Useful commands:
```bash