ELAN touchscreen 1% battery Linux fix

I got a new Dell 5379 laptop a few months ago and immediately removed the hard drive and put an SSD with Ubuntu 18.04 on it. Almost everything works perfectly, but there were a couple problems, especially with the touchscreen. The problem was initially that when you used the stylus, a notification would pop up saying only 1% battery remained on the stylus, then the screen would dim every 10 seconds or so.

Screenshot showing the 1% notification
Screenshot showing the 1% notification

The screen dimming should be fixed soon, with a patch by Benjamin Berg already existing. The 1% battery notification isn’t exactly fixed though. I’ve written a patch to the kernel that fixes it (see below), but thus far it hasn’t been accepted. There is the possibility that my touchscreen is just defective, although I’ve tested two new styluses and they both exhibit this behaviour. I’ll keep trying to get someone on the linux-input mailing list to notice and at least give a reply about the patch. If you have the same touchscreen, I’d be interested to know if you get the 1% battery notification too. Look in the output of lsusb for this vendor/device ID:

04f3:2361 Elan Microelectronics Corp.

diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 5146ee029db4..ee4bbc8bf672 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -374,6 +374,7 @@
 #define USB_DEVICE_ID_TOSHIBA_CLICK_L9W	0x0401
 #define USB_DEVICE_ID_HP_X2		0x074d
 #define USB_DEVICE_ID_HP_X2_10_COVER	0x0755
+#define USB_DEVICE_ID_DELL_5379		0x2361
 
 #define USB_VENDOR_ID_ELECOM		0x056e
 #define USB_DEVICE_ID_ELECOM_BM084	0x0061
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index a481eaf39e88..b3236850210f 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -325,6 +325,8 @@ static const struct hid_device_id hid_battery_quirks[] = {
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM,
 		USB_DEVICE_ID_ELECOM_BM084),
 	  HID_BATTERY_QUIRK_IGNORE },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_DELL_5379),
+	  HID_BATTERY_QUIRK_IGNORE },
 	{}
 };
Leave a Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.