You are not logged in.

#1 2018-07-08 13:30:54

uttarayan21
Member
Registered: 2018-06-14
Posts: 6

dmesg is filled with i2c_hid i2c-ELAN0501:01 Error reports

When I run dmesg it just spews endless list of errors related to my touchpad

 [15311.666439] i2c_hid i2c-ELAN0501:01: i2c_hid_get_input: incomplete report (14/65535) 

I found a kernel patch to fix this at https://patchwork.kernel.org/patch/10374383/ and compiled a custom kernel with the patch but it did not fix the issue.

I also found a similar thread https://bbs.archlinux.org/viewtopic.php?id=237288 but according to the OP it only appears at boot or shutdown

The output of my libinput list-devices related to the touchpad is

Device:           ELAN0501:01 04F3:3060 Touchpad
Kernel:           /dev/input/event12
Group:            7
Seat:             seat0, default
Size:             101x73mm
Capabilities:     pointer gesture
Tap-to-click:     disabled
Tap-and-drag:     enabled
Tap drag lock:    disabled
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      n/a
Scroll methods:   *two-finger edge 
Click methods:    *button-areas clickfinger 
Disable-w-typing: enabled
Accel profiles:   none
Rotation:         n/a

Also I am really new in compiling kernel it really takes a long time to compile the kernel so I'd appreciate if have to recompile the kernel the least number of times possible.

Offline

#2 2018-07-08 13:51:09

loqs
Member
Registered: 2014-03-06
Posts: 18,087

Re: dmesg is filled with i2c_hid i2c-ELAN0501:01 Error reports

Welcome to the arch linux forums.  Please document the process you used to apply the patch build and install the kernel.

Offline

#3 2018-07-08 14:26:01

uttarayan21
Member
Registered: 2018-06-14
Posts: 6

Re: dmesg is filled with i2c_hid i2c-ELAN0501:01 Error reports

Hello thanks for the quick reply.

I used the Arch Build System for compiling the kernel.

And I edited the PKGBUILD to apply the patch.

 patch -Np1 -i ../0002-remove-i2c_hid_get_input-incomplete-report-error.patch drivers/hid/i2c-hid/i2c-hid.c 

I added this to the prepare() section in the PKGBUILD file after the other patch commands

Offline

#4 2018-07-08 14:35:27

loqs
Member
Registered: 2014-03-06
Posts: 18,087

Re: dmesg is filled with i2c_hid i2c-ELAN0501:01 Error reports

In src/linux-4.17/drivers/hid/i2c-hid/i2c-hid.c line 489 has the patch been applied successfully?

Offline

#5 2018-07-08 14:38:26

uttarayan21
Member
Registered: 2018-06-14
Posts: 6

Re: dmesg is filled with i2c_hid i2c-ELAN0501:01 Error reports

Yes it is applied , I checked the file after completing the compilation. Also I am using linux-lts as base if that matters.

However after checking again it seems that the patch is applied at line 479 instead of 489

Last edited by uttarayan21 (2018-07-08 14:44:04)

Offline

#6 2018-07-08 14:51:51

loqs
Member
Registered: 2014-03-06
Posts: 18,087

Re: dmesg is filled with i2c_hid i2c-ELAN0501:01 Error reports

That is probably due to my assumption you would be using 4.17.3.  The message is not too short.

 [15311.666439] i2c_hid i2c-ELAN0501:01: i2c_hid_get_input: incomplete report (14/65535) 

ret_size has the value 14 and size the value 65535.  It is not failing the test size <= 2 but ret_size > size.
The message is much longer than expected.

Offline

#7 2018-07-08 15:00:01

uttarayan21
Member
Registered: 2018-06-14
Posts: 6

Re: dmesg is filled with i2c_hid i2c-ELAN0501:01 Error reports

Ah I see, so if I change

	if ((ret_size > size) || (ret_size <= 2)) { 

to

	if ((65535 >= size) || (ret_size <= 2)) { 

I think that should probably solve the issue.

But I think that's hacky way of solving that. So is there anything else I can do ?

Last edited by uttarayan21 (2018-07-08 15:00:35)

Offline

#8 2018-07-08 15:04:28

loqs
Member
Registered: 2014-03-06
Posts: 18,087

Re: dmesg is filled with i2c_hid i2c-ELAN0501:01 Error reports

If you allow such a long message through no idea what would happen during later processing.
I suggest reporting the issue to http://www.linux-usb.org/mailing.html#users including all the information the link requests especially the identifiers for the device producing the overlong reports.

Offline

#9 2018-07-08 15:09:44

uttarayan21
Member
Registered: 2018-06-14
Posts: 6

Re: dmesg is filled with i2c_hid i2c-ELAN0501:01 Error reports

Okay thank you very much. I'll report back if I make any progress.

Offline

#10 2018-07-08 15:16:03

loqs
Member
Registered: 2014-03-06
Posts: 18,087

Re: dmesg is filled with i2c_hid i2c-ELAN0501:01 Error reports

For now you could change

 		dev_err(&ihid->client->dev, "%s: incomplete report (%d/%d)\n",
 			__func__, size, ret_size);

to

 		dev_err_once(&ihid->client->dev, "%s: incomplete report (%d/%d)\n",
 			__func__, size, ret_size);

Which should only print the message once.  If you manually make the change then use `makepkg -e` that should reuse as much of the kernel build as possible.

Offline

#11 2018-07-08 15:21:02

uttarayan21
Member
Registered: 2018-06-14
Posts: 6

Re: dmesg is filled with i2c_hid i2c-ELAN0501:01 Error reports

Okay , thanks again I'll do that  for now.

Offline

Board footer

Powered by FluxBB