Create a gist now

Instantly share code, notes, and snippets.

@ursm / len0073.patch
Last active Aug 14, 2017

What would you like to do?
Fix TrackPoint / touchpad issue on ThinkPad X1 Carbon 5th (Linux 4.12)
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 16c3046..ca912ce 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -173,6 +173,7 @@ static const char * const smbus_pnp_ids[] = {
"LEN0046", /* X250 */
"LEN004a", /* W541 */
"LEN200f", /* T450s */
+ "LEN0073", /* X1 Carbon 5 (Elantech) */
NULL
};
diff --git a/drivers/input/rmi4/rmi_smbus.c b/drivers/input/rmi4/rmi_smbus.c
index 225025a..2939a2f 100644
--- a/drivers/input/rmi4/rmi_smbus.c
+++ b/drivers/input/rmi4/rmi_smbus.c
@@ -322,7 +322,7 @@ static int rmi_smb_probe(struct i2c_client *client,
rmi_dbg(RMI_DEBUG_XPORT, &client->dev, "Smbus version is %d",
smbus_version);
- if (smbus_version != 2) {
+ if (smbus_version != 2 && smbus_version != 3) {
dev_err(&client->dev, "Unrecognized SMB version %d\n",
smbus_version);
return -ENODEV;
$ grep -E 'HID_RMI|RMI4_SMB' .config
CONFIG_RMI4_SMB=m
CONFIG_HID_RMI=m
$ dmesg | grep -E 'psmouse|rmi4'
[ 1.537742] psmouse serio1: synaptics: queried max coordinates: x [..5678], y [..4758]
[ 1.572729] psmouse serio1: synaptics: queried min coordinates: x [1266..], y [1094..]
[ 1.574280] psmouse serio1: synaptics: Trying to set up SMBus access
[ 1.578731] psmouse serio1: synaptics: SMbus companion is not ready yet
[ 1.645578] psmouse serio1: synaptics: Touchpad model: 1, fw: 8.2, id: 0x1e2a1, caps: 0xf003a3/0x940300/0x12e800/0x0, board id: 3288, fw id: 2538625
[ 1.647134] psmouse serio1: synaptics: serio: Synaptics pass-through port at isa0060/serio1/input0
[ 2.056868] psmouse serio2: Failed to reset mouse on synaptics-pt/serio0
[ 7.696884] psmouse serio2: Failed to enable mouse on synaptics-pt/serio0
[ 8.997307] psmouse serio1: synaptics: queried max coordinates: x [..5678], y [..4758]
[ 9.032026] psmouse serio1: synaptics: queried min coordinates: x [1266..], y [1094..]
[ 9.032037] psmouse serio1: synaptics: Trying to set up SMBus access
[ 9.045519] rmi4_smbus 6-002c: registering SMbus-connected sensor
[ 9.108224] rmi4_f01 rmi4-00.fn01: found RMI device, manufacturer: Synaptics, product: TM3288-003, fw id: 2538625
[ 9.178951] input: Synaptics TM3288-003 as /devices/rmi4-00/input/input9
[ 10.541603] input: PS/2 Generic Mouse as /devices/rmi4-00/rmi4-00.fn03/serio3/input/input18
$ xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Synaptics TM3288-003 id=11 [slave pointer (2)]
⎜ ↳ PS/2 Generic Mouse id=12 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Sleep Button id=8 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=9 [slave keyboard (3)]
↳ ThinkPad Extra Buttons id=10 [slave keyboard (3)]

t8ch commented Jul 27, 2017

hey,
thanks for providing this solution. It looks like something I could really need. However, I am not familiar with kernel config. How can I apply the kernel patch? And where exactly is the .config I have to change?
thanks and regards

tomoyat1 commented Aug 1, 2017 edited

Hi,
Thank you for the patch.
Do you have any plans to upstream this patch?

badmd5 commented Aug 5, 2017

This patch works great! Suggest posting this on LKML or somewhere so it gets added to the kernel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment