Ubuntu网站下报的bug中说问题解决了,不过在我这里并没有。看了以下源码虽然是改了,但问题还在。
This problem did not occur on the previous kernel version so there must have been a change to the “drivers/
hid/i2c- hid/i2c- hid.c” file. This seems to be fixed in a recent commit here: https:/ /github. com/torvalds/ linux/commit/ ef6eaf27274c035 1f7059163918f37 95da13199c
解决办法是下载当前使用的内核版本源码,直接进行修改编译生成定制内核,修改的源码部分如下:
1 2 3 |
vim drivers/hid/i2c-hid/i2c-hid-core.c |
找到下面这段代码:
1 2 3 4 5 6 7 8 |
if ((ret_size > size) || (ret_size < 2)) { #需要修改成dev_err_once dev_err(&ihid->client->dev, "%s: incomplete report (%d/%d)\n", __func__, size, ret_size); return; } |
将 dev_err修改成 dev_err_once, 这样有错误信息时只会打印一次。
接下来就是编译安装内核,参考另一篇文章:Arch Linux 从内核源码手动编译定制内核