Open qwrd opened 5 years ago
i have this problem of touchpad not working on kernel 5.4 or higher
same problem here on asusfx503vm Fedora31 kernel 5.4 +
This issue is still present in Qubes 4.1 Build20200310-4.1
at least one of the two messages looks rather similar to https://patchwork.kernel.org/patch/10869095/ , and if you search the web, there are multiple results describing problems with these multitouch touchpads. I don't think this is a qubes-related issue.
@marmarek, can you confirm whether this is not our bug
?
@andrewdavidwong , I have a laptop with ELAN1200 touchpad as well, and I can confirm that this is not a bug in Qubes OS, but rather caused by Xen.
Xen acknowledges an interrupt if a virtual machine (for example, dom0
) does not acknowledge the interrupt within 1 millisecond.
I have patched Xen and the i2c-hid driver to locally resolve this issue as follows, but in my opinion these changes are not acceptable for merging by upstream or by Qubes OS due to their nature:
After applying the aforementioned modifications, if I enable the debugging output for this touchpad's device driver via sudo modprobe -r i2c_hid; sudo modprobe -i -v i2c_hid debug=1
, and if I use the touchpad for a few seconds, I can observe that successive interrupt service routine invocations have about 16 milliseconds in between:
[ 3813.395507 < 0.016334>] i2c_hid i2c-ELAN1200:00: input: 10 00 04 03 9d 09 ae 02 1a 60 01 00 22 54 00 00
[ 3813.411770 < 0.016263>] i2c_hid i2c-ELAN1200:00: input: 10 00 04 03 69 09 b2 02 c4 60 01 00 20 55 00 00
[ 3813.428093 < 0.016323>] i2c_hid i2c-ELAN1200:00: input: 10 00 04 03 40 09 b4 02 64 61 01 00 20 55 00 00
All this to say, the touchpad's interrupt requests are acknowledged too early by Xen, which appears to confuse the touchpad device.
Thanks for the detailed reply, @m-v-b
In light of this, I'm closing this issue as "not our bug." If anyone believes this is a mistake, please leave a comment, and we'll be happy to take another look. Thank you.
Can we re-open this issue? A bunch of devices use ELAN touchpads, and this appears to be affecting me.
@dylangerdaly: Reopened, but do you have reason to believe that this is actually a Qubes OS bug (i.e., the Qubes OS Project actually develops the software that is causing this bug)? Based on the previous comments on this issue, it looks like it's not. (Related FAQ: Why don’t you fix upstream bugs that affect Qubes OS?)
Also, which Qubes release are you on?
It's likely not specially a QubesOS bug, but it's affecting me, I'll try to log this with the xen-mailing list, it's the only ticket in existence so it's good to have it open.
I'm on R4.2RC3
Also my issue is a little different, I don't get any input at all, I'm running the ELAN07A8:00
It's likely not specially a QubesOS bug, but it's affecting me, I'll try to log this with the xen-mailing list, it's the only ticket in existence so it's good to have it open.
It is our policy not to keep issues open that are not actionable for the Qubes developers. Besides, issues still remain in existence and are fully discoverable even when they are closed.
Reclosing as "not our bug" (the Qubes OS Project does not develop the software that is causing this bug). If anyone has another reason for reopening this issue, please leave a comment, and we'll be happy to take another look. Thank you.
Just added this section:
https://www.qubes-os.org/doc/issue-tracking/#understanding-open-and-closed-issues
Hope it helps to clarify the situation on open vs. closed issues.
Are the patches that @m-v-b used available anywhere?
Ooooo would be great to get this solved
Reopening as this needs to be reported to xen-devel and possibly fixed via a downstream backport.
Are the patches that @m-v-b used available anywhere?
Hi @DemiMarie,
The patches I used were written by myself, and I did not publish them at the time. @euidzero exchanged a few e-mails with me and a software engineer at AMD regarding Qubes OS issue #8734, and in that e-mail thread I shared a copy of the (first) patch that allows customization of the interrupt servicing timeout (the default for which is 1 millisecond) with a Xen command line argument.
My second patch related to cancelling the interrupt servicing timer is no longer needed, thanks to the following commit in Xen:
commit 359cf6f8a0ec ("x86/IRQ: don't keep EOI timer running without need")
(4.13.0-rc1~819 )
I did not think that my third patch (which allows customizing interrupt trigger modes such as positive edge vs. high level) would be necessary, and given the ugly debugging nature of the patch, I would rather keep it private for now, but if this patch would be helpful, please let me know.
Finally, all of my patches were written against Xen 4.8.5, so they will require porting to recent Xen versions, but this should be relatively straightforward to carry out.
I would be happy to publish the first patch and link to it from here.
Thank you,
Vefa
Just to confirm, do these patches totally fix ELAN Touchpad devices for Qubes on Ryzen 7000?
Hi @dylangerdaly,
The first Xen patch in question (that I had written to allow customizing the interrupt acknowledgement timeout from its default of 1 millisecond, with a Xen command line argument) was sufficient for me in resolving the flood of the error messages that read i2c_hid_get_input: incomplete report
, and the remaining patches were mainly intended as enhancements.
Despite this, I unfortunately cannot guarantee that the same patch will resolve your issues, because my laptop had an Intel CPU, and I am not sure if there are other variables/unknowns.
Qubes OS version Qubes R4.0.2-rc2
Affected component(s) or functionality Elan 1200 Touchpad
Brief summary The touchpad doesn't work properly.
To Reproduce
Expected behavior The touchpad should work without any errors or erratic behavior.
Actual behavior The touchpad initially works for a few seconds then it gradually breaks down completely. Mouse pointer doesn't move smoothly, phantom clicks are created, and the syslog gets spammed with errors.
Screenshots N/A
Additional context Okay, so my laptop won't let me touch its naughty place. Each time I try to use the touchpad it will initially work for a few seconds, but then the behavior will quickly worsen with continued use until it becomes completely unusable (I'm talking about like 10 seconds or so after first use). The symptoms include jumping cursor (dropped frames), phantom left button clicks, random scrolls, click & drag events as the text gets selected, etc. All this happens when using a single finger to move the cursor without pressing any buttons or using the mouse.
When happening, the syslog will get spammed with messages like these:
Notice that there are two types of errors. The 16/82 lines only rarely happen when I am touching the touchpad with a single finger and moving it around a bit. But as soon as I remove my finger, the 16/16466 lines will be printed out with very high frequency until I put my finger back or until some time later after a very large number of them are printed out - I'm assuming this is when the touchpad goes to sleep due to inactivity. I've done some searching and it seems like these bugs should already be patched some recent kernels. As usual, I've tested the hardware in Debian Buster 10 Live LXQt and Ubuntu Mate 19.10 Live, and the touchpad appears to work fine in both cases. Doing a "rmmod i2c-hid" stops the syslog errors, but also disables the touchpad.
Some more info:
Output for dmesg is almost identical in debian/ubuntu live so I won't post those.
Solutions you've tried
Relevant documentation you've consulted https://www.qubes-os.org/doc/newer-hardware-troubleshooting/
Related, non-duplicate issues none