Bug 262282 - Framework laptop touchpad latency
Summary: Framework laptop touchpad latency
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks: frameworklaptop
  Show dependency treegraph
 
Reported: 2022-03-01 20:09 UTC by Ed Maste
Modified: 2024-06-22 22:35 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2022-03-01 20:09:19 UTC
There is observable latency between certain touchpad actions and mouse movement.

In the vt(4) console with moused running if I start without touching the touchpad, then touch and immediately move my finger there seems to be a delay of about 3/4 of a second before the cursor starts moving. If I place my finger on the touchpad but wait at least a second before moving there is a short (just barely perceptible) delay before the cursor moves.

There is little delay while in X - seems to be barely perceptible if starting without touching the touchpad, and imperceptible if starting with a finger on the touchpad.

FreeBSD main and drm-kmod master as of Feb 24 2022.
Comment 1 Vincent Milum Jr 2022-03-01 22:11:40 UTC
In my particular case, the latency even in xorg is still very noticeable. It isn't the full ~1s delay as seen on the console, but it is probably somewhere in the neighborhood of 100ms. This delay is NOT seen when using Windows on the same laptop, and makes it a little frustrating to actually use with FreeBSD, as a user who is extremely sensitive to latency. The latency on FreeBSD isn't just the initial movement, it is continual throughout the entirety of moving the cursor on the screen, the feedback is always ~100ms behind the actual input being given. This same latency is NOT seen when using an external USB mouse on the same machine.
Comment 2 Ed Maste freebsd_committer freebsd_triage 2024-05-01 19:59:01 UTC
In BIOS PS/2 Emulation was set to "Auto". Changing it to "Disabled" addresses vt(4) latency (because the trackpad no longer moves the cursor at all). In X the trackpad seems fine.

Vince, can you check the state of the BIOS setting, and if currently set to Auto retry with it set to Disabled?
Comment 3 Daniel Schaefer 2024-06-21 02:17:04 UTC
Hi, I'd like to provide some explanation from Framework engineering.

The Framework EC detects if there is any I2C communication with the touchpad, and if there isn't it'll enable PS2 emulation.
This was added because the Windows Installer does not have an I2C driver for Intel systems.

Anything else (Installed Windows, Linux and as it seems FreeBSD) does not need this. So it is safe to disable PS2 emulation in BIOS settings to avoid it triggering on accident.
Maybe on FreeBSD it triggers because of some timing differences.
The code for Intel 11th to 13th Generation is here, for reference: https://github.com/FrameworkComputer/EmbeddedController/blob/hx20-hx30/baseboard/fwk/ps2mouse.c
Comment 4 Daniel Schaefer 2024-06-21 02:17:04 UTC
Hi, I'd like to provide some explanation from Framework engineering.

The Framework EC detects if there is any I2C communication with the touchpad, and if there isn't it'll enable PS2 emulation.
This was added because the Windows Installer does not have an I2C driver for Intel systems.

Anything else (Installed Windows, Linux and as it seems FreeBSD) does not need this. So it is safe to disable PS2 emulation in BIOS settings to avoid it triggering on accident.
Maybe on FreeBSD it triggers because of some timing differences.
The code for Intel 11th to 13th Generation is here, for reference: https://github.com/FrameworkComputer/EmbeddedController/blob/hx20-hx30/baseboard/fwk/ps2mouse.c
Comment 5 Daniel Schaefer 2024-06-21 02:17:44 UTC
Hi, I'd like to provide some explanation from Framework engineering.

The Framework EC detects if there is any I2C communication with the touchpad, and if there isn't it'll enable PS2 emulation.
This was added because the Windows Installer does not have an I2C driver for Intel systems.

Anything else (Installed Windows, Linux and as it seems FreeBSD) does not need this. So it is safe to disable PS2 emulation in BIOS settings to avoid it triggering on accident.
Maybe on FreeBSD it triggers because of some timing differences.
The code for Intel 11th to 13th Generation is here, for reference: https://github.com/FrameworkComputer/EmbeddedController/blob/hx20-hx30/baseboard/fwk/ps2mouse.c
Comment 6 Vincent Milum Jr 2024-06-22 22:35:45 UTC
I've recently replaced my FrameWork laptop motherboard going from 11th Gen Intel to 13th Gen Intel.

At the same time, I replaced FreeBSD 14-CURRENT with 15-CURRENT.

With or without the PS/2 emulation enabled, there is still touchpad latency. The latency feels the same either way.

The 100ms-ish latency is still there.

And again, this latency isn't there when using Windows.

This is most certainly something with the FreeBSD touchpad implementation.

Using a wired USB mouse does not have similar latency.