1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-18 05:21:47 +03:00
mobile-nixos/devices/oneplus-oneplus3/kernel/0001-s3320-Workaround-libinput-claiming-kernel-bug.patch
Samuel Dionne-Riel af62d74a3b oneplus-oneplus3: workaround bug with touchscreen
libinput, which I believe, claims there is a kernel bug with the
synaptics driver touchscreen in use.

This is the recommended fix according to PostmarketOS.

 * https://wiki.postmarketos.org/wiki/Troubleshooting:touchscreen#sec_touchscreen:_kernel_bug

I have not seen any issues from using this fix.

The error:

```
synaptics: kernel bug: device has min == max on ABS_MT_WIDTH_MAJOR
```

According to the touchscreen documentation of the kernel, I don't think
that it is an issue to remove this information from touch events.
2019-10-05 01:07:55 -04:00

34 lines
1.3 KiB
Diff

From 5c5c777394cb3a0e2d5bfbe8480ae951996bb384 Mon Sep 17 00:00:00 2001
From: Samuel Dionne-Riel <samuel@dionne-riel.com>
Date: Fri, 4 Oct 2019 22:09:13 -0400
Subject: [PATCH] s3320: Workaround libinput claiming kernel bug
I'm inclined to believe libinput here.
This solves:
```
display-manager[1880]: (II) event[0-9]+ - synaptics: is tagged by udev as: Keyboard Touchscreen
display-manager[1880]: (EE) event[0-9]+ - synaptics: kernel bug: device has min == max on ABS_MT_WIDTH_MAJOR
display-manager[1880]: (II) event[0-9]+ - synaptics: was rejected
```
---
drivers/input/touchscreen/synaptics_driver_s3320.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/input/touchscreen/synaptics_driver_s3320.c b/drivers/input/touchscreen/synaptics_driver_s3320.c
index 4b07aa6f5d39..bedfae914b7b 100644
--- a/drivers/input/touchscreen/synaptics_driver_s3320.c
+++ b/drivers/input/touchscreen/synaptics_driver_s3320.c
@@ -2503,7 +2503,6 @@ static int synaptics_input_init(struct synaptics_ts_data *ts)
set_bit(EV_ABS, ts->input_dev->evbit);
set_bit(EV_KEY, ts->input_dev->evbit);
set_bit(ABS_MT_TOUCH_MAJOR, ts->input_dev->absbit);
- set_bit(ABS_MT_WIDTH_MAJOR,ts->input_dev->absbit);
set_bit(ABS_MT_POSITION_X, ts->input_dev->absbit);
set_bit(ABS_MT_POSITION_Y, ts->input_dev->absbit);
set_bit(INPUT_PROP_DIRECT, ts->input_dev->propbit);
--
2.23.0