Skip to contentSkip to conversation

Input: synaptics - disable InterTouch on ThinkPad T440p (board id 2722)

PATCH In review Raphaël Larocque 3 participants 6 messages Jun 16 – Jun 17

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: synaptics - disable InterTouch on ThinkPad T440p (board id 2722)

The Lenovo ThinkPad T440p (PNP ID LEN0036, board id 2722) has a Synaptics touchpad whose SMBus companion is not ready at boot and takes roughly 200 seconds to appear. During this window the touchpad and TrackPoint are completely unresponsive on approximately 50% of boots, making the machine unusable until the companion finally registers.

The device is in the topbuttonpad_pnp_ids[] SMBus allowlist, so the kernel attempts to use SMBus/RMI4 mode by default. When the companion is not ready, psmouse_smbus_init() leaves breadcrumbs and returns -EAGAIN, the PS/2 fallback path is taken, but the device does not function properly until the companion appears and RMI4 takes over.

Disable SMBus InterTouch for board id 2722 so the touchpad and TrackPoint work immediately via PS/2 from boot. Users can still force SMBus with psmouse.synaptics_intertouch=1 if needed.

---
 drivers/input/mouse/synaptics.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/input/mouse/synaptics.c +8 -0
index c70502e24031..8f38bc498798 100644
@@ -1837,6 +1837,14 @@ static int synaptics_setup_intertouch(struct psmouse *psmouse,
 
 			return -ENXIO;
 		}
+
+		/* Disable intertouch on known-broken board revisions */
+		if (info->board_id == 2722) {
+			psmouse_info(psmouse,
+				     "Disabling intertouch for board id %d\n",
+				     info->board_id);
+			return -ENXIO;
+		}
 	}
 
 	psmouse_info(psmouse, "Trying to set up SMBus access\n");
Signature · 1 line
2.53.0
maintainer
#1 lore raw

Hi Raphaël,

Quoted 13 lines · Raphaël Larocque

The Lenovo ThinkPad T440p (PNP ID LEN0036, board id 2722) has a Synaptics touchpad whose SMBus companion is not ready at boot and takes roughly 200 seconds to appear. During this window the touchpad and TrackPoint are completely unresponsive on approximately 50% of boots, making the machine unusable until the companion finally registers.

The device is in the topbuttonpad_pnp_ids[] SMBus allowlist, so the kernel attempts to use SMBus/RMI4 mode by default. When the companion is not ready, psmouse_smbus_init() leaves breadcrumbs and returns -EAGAIN, the PS/2 fallback path is taken, but the device does not function properly until the companion appears and RMI4 takes over.

Quoted 3 lines

Disable SMBus InterTouch for board id 2722 so the touchpad and TrackPoint work immediately via PS/2 from boot. Users can still force SMBus with psmouse.synaptics_intertouch=1 if needed.

Is this board ID unique to T440p? Or it may be used in other devices as well?

I also wonder, if you try loading psmouse later in the initialization cycle, after SMBus has been loaded, if that would help it detect the touchpad quicker? Is there anything interested in DTS regarding device interconnect/hierarchy that we might be missing?

Quoted 16 lines
---
 drivers/input/mouse/synaptics.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/input/mouse/synaptics.c +1 -0
index c70502e24031..8f38bc498798 100644
@@ -1837,6 +1837,14 @@ static int synaptics_setup_intertouch(struct psmouse *psmouse,
 
 			return -ENXIO;
 		}
+

drivers/input/mouse/synaptics.c static int synaptics_setup_intertouch(struct psmouse *psmouse, · line 1850

Quoted 10 lines
drivers/input/mouse/synaptics.c +7 -0
+		/* Disable intertouch on known-broken board revisions */
+		if (info->board_id == 2722) {
+			psmouse_info(psmouse,
+				     "Disabling intertouch for board id %d\n",
+				     info->board_id);
+			return -ENXIO;
+		}
 	}
 
 	psmouse_info(psmouse, "Trying to set up SMBus access\n");

Thanks.

Signature · 1 line
Dmitry
#2 lore raw

PATCH 1/1 Input: synaptics - disable InterTouch on ThinkPad T440p (board id 2722)

In reply to Raphaël Larocque

The Lenovo ThinkPad T440p (PNP ID LEN0036, board id 2722) has a Synaptics touchpad whose SMBus companion is not ready at boot and takes ~200 s to appear. During this window the touchpad and pointer are completely unresponsive on approximately 50% of boots, making the machine unusable until the companion finally registers.

The device is in the topbuttonpad_pnp_ids[] SMBus allowlist, so the kernel attempts to use SMBus/RMI4 mode by default. When the companion is not ready, psmouse_smbus_init() leaves breadcrumbs and returns -EAGAIN, the PS/2 fallback path is taken, but the device does not function properly until the companion appears and RMI4 takes over.

Disable SMBus InterTouch for PNP ID LEN0036 with board id 2722 so the touchpad and TrackPoint work immediately via PS/2 from boot. Users can still force SMBus with psmouse.synaptics_intertouch=1 if needed.

---
 drivers/input/mouse/synaptics.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/input/mouse/synaptics.c +10 -0
index c70502e24031..982685918459 100644
@@ -1837,6 +1837,16 @@ static int synaptics_setup_intertouch(struct psmouse *psmouse,
 
 			return -ENXIO;
 		}
+
+		/* Disable intertouch on known-broken board revisions */
+		if (psmouse_matches_pnp_id(psmouse,
+				(const char * const []){"LEN0036", NULL}) &&
+		    info->board_id == 2722) {
+			psmouse_info(psmouse,
+				     "Disabling intertouch for board id %d\n",
+				     info->board_id);
+			return -ENXIO;
+		}
 	}
 
 	psmouse_info(psmouse, "Trying to set up SMBus access\n");
Signature · 1 line
2.53.0
#3 lore raw
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Format specifier type mismatch in `psmouse_info` call. --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Format specifier type mismatch in psmouse_info call.
--

commit 0fa38fb74cf1360727ab0551657ea6c7dcbf7b75
Author: Raphaël Larocque <[email protected]>

Input: synaptics - disable InterTouch on ThinkPad T440p (board id 2722)

This commit disables SMBus InterTouch for the ThinkPad T440p (board id 2722) by matching its PNP ID and board ID. This ensures the touchpad works via PS/2 immediately at boot, bypassing a long delay caused by the SMBus companion device taking time to initialize.

Quoted 4 lines
drivers/input/mouse/synaptics.c +0 -0
@@ -1837,6 +1837,16 @@ static int synaptics_setup_intertouch(struct psmouse *psmouse,

[ ... ]

drivers/input/mouse/synaptics.c static int synaptics_setup_intertouch(struct psmouse *psmouse, · line 1847

Quoted 7 lines
drivers/input/mouse/synaptics.c +7 -0
+		/* Disable intertouch on known-broken board revisions */
+		if (psmouse_matches_pnp_id(psmouse,
+				(const char * const []){"LEN0036", NULL}) &&
+		    info->board_id == 2722) {
+			psmouse_info(psmouse,
+				     "Disabling intertouch for board id %d\n",
+				     info->board_id);

[Severity: Low]
This isn't a bug, but should the format specifier for info->board_id be %u instead of %d?

Looking at struct synaptics_device_info, board_id is declared as a u32:

struct synaptics_device_info {
	...
	u32 board_id;		/* Board-ID */
	...
};

While 2722 easily fits in a signed integer, using %u would avoid potential format string warnings under stricter warning levels.

Quoted 3 lines
drivers/input/mouse/synaptics.c +2 -0
+			return -ENXIO;
+		}
 	}
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#4 lore raw

PATCH 1/1 Input: synaptics - disable InterTouch on ThinkPad T440p (board id 2722)

In reply to Raphaël Larocque

The Lenovo ThinkPad T440p (PNP ID LEN0036, board id 2722) has a Synaptics touchpad whose SMBus companion is not ready at boot and takes ~200 s to appear. During this window the touchpad and pointer are completely unresponsive on approximately 50% of boots, making the machine unusable until the companion finally registers.

The device is in the topbuttonpad_pnp_ids[] SMBus allowlist, so the kernel attempts to use SMBus/RMI4 mode by default. When the companion is not ready, psmouse_smbus_init() leaves breadcrumbs and returns -EAGAIN, the PS/2 fallback path is taken, but the device does not function properly until the companion appears and RMI4 takes over.

Disable SMBus InterTouch for PNP ID LEN0036 with board id 2722 so the touchpad and TrackPoint work immediately via PS/2 from boot. Users can still force SMBus with psmouse.synaptics_intertouch=1 if needed.

---
 drivers/input/mouse/synaptics.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/input/mouse/synaptics.c +10 -0
index c70502e24031..dd11ffdd51ae 100644
@@ -1837,6 +1837,16 @@ static int synaptics_setup_intertouch(struct psmouse *psmouse,
 
 			return -ENXIO;
 		}
+
+		/* Disable intertouch on known-broken board revisions */
+		if (psmouse_matches_pnp_id(psmouse,
+				(const char * const []){"LEN0036", NULL}) &&
+		    info->board_id == 2722) {
+			psmouse_info(psmouse,
+				     "Disabling intertouch for board id %u\n",
+				     info->board_id);
+			return -ENXIO;
+		}
 	}
 
 	psmouse_info(psmouse, "Trying to set up SMBus access\n");
Signature · 1 line
2.53.0
#5 lore raw

PATCH v3 1/1 Input: synaptics - disable InterTouch on ThinkPad T440p (board id 2722)

In reply to Raphaël Larocque

The Lenovo ThinkPad T440p (PNP ID LEN0036, board id 2722) has a Synaptics touchpad whose SMBus companion is not ready at boot and takes ~200 s to appear. During this window the touchpad and pointer are completely unresponsive on approximately 50% of boots, making the machine unusable until the companion finally registers.

The device is in the topbuttonpad_pnp_ids[] SMBus allowlist, so the kernel attempts to use SMBus/RMI4 mode by default. When the companion is not ready, psmouse_smbus_init() leaves breadcrumbs and returns -EAGAIN, the PS/2 fallback path is taken, but the device does not function properly until the companion appears and RMI4 takes over.

Disable SMBus InterTouch for PNP ID LEN0036 with board id 2722 so the touchpad and TrackPoint work immediately via PS/2 from boot. Users can still force SMBus with psmouse.synaptics_intertouch=1 if needed.

---
 drivers/input/mouse/synaptics.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/input/mouse/synaptics.c +10 -0
index c70502e24031..dd11ffdd51ae 100644
@@ -1837,6 +1837,16 @@ static int synaptics_setup_intertouch(struct psmouse *psmouse,
 
 			return -ENXIO;
 		}
+
+		/* Disable intertouch on known-broken board revisions */
+		if (psmouse_matches_pnp_id(psmouse,
+				(const char * const []){"LEN0036", NULL}) &&
+		    info->board_id == 2722) {
+			psmouse_info(psmouse,
+				     "Disabling intertouch for board id %u\n",
+				     info->board_id);
+			return -ENXIO;
+		}
 	}
 
 	psmouse_info(psmouse, "Trying to set up SMBus access\n");
Signature · 1 line
2.53.0