1

I'm having this issue on Acer aspire v3 572g, any distro and any "new" release (on ubuntu 10.04lts no issues occur). The touchpad works perfectly after boot but after some use (if not/barely used it keeps working) seems like the touchpad goes into some energy saving mode: if not used for a couple seconds it'll have a half-a-second delay on the first input it detects. The issue persists whether using nvidia proprietary or open-source drivers, with or without synaptics drivers and even uninstalling xserver-xorg-input-libinput and using synaptics (keyboard stops working but issue persists). I'm pasting some xinput and synclient outputs from Ubuntu 19.10 here but I'm not sure those have anything to do with the issue:

xinput list

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SYN1B7E:01 06CB:2970 Touchpad             id=12   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Sleep Button                              id=9    [slave  keyboard (3)]
    ↳ Video Bus                                 id=10   [slave  keyboard (3)]
    ↳ HD WebCam: HD WebCam                      id=11   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=13   [slave  keyboard (3)]
    ↳ Acer WMI hotkeys                          id=14   [slave  keyboard (3)]

xinput --list-props "12"

Device 'SYN1B7E:01 06CB:2970 Touchpad':
    Device Enabled (197):   1
    Coordinate Transformation Matrix (199): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (326): 1
    Device Accel Constant Deceleration (327):   2.500000
    Device Accel Adaptive Deceleration (328):   1.000000
    Device Accel Velocity Scaling (329):    12.640978
    Synaptics Edges (330):  49, 1187, 48, 850
    Synaptics Finger (331): 25, 30, 0
    Synaptics Tap Time (332):   180
    Synaptics Tap Move (333):   67
    Synaptics Tap Durations (334):  180, 180, 100
    Synaptics ClickPad (335):   1
    Synaptics Middle Button Timeout (336):  0
    Synaptics Two-Finger Pressure (337):    282
    Synaptics Two-Finger Width (338):   7
    Synaptics Scrolling Distance (339): 30, 30
    Synaptics Edge Scrolling (340): 0, 0, 0
    Synaptics Two-Finger Scrolling (341):   1, 1
    Synaptics Move Speed (342): 1.000000, 1.750000, 0.130976, 0.000000
    Synaptics Off (343):    0
    Synaptics Locked Drags (344):   0
    Synaptics Locked Drags Timeout (345):   5000
    Synaptics Tap Action (346): 2, 3, 0, 0, 1, 3, 0
    Synaptics Click Action (347):   1, 3, 0
    Synaptics Circular Scrolling (348): 0
    Synaptics Circular Scrolling Distance (349):    0.100000
    Synaptics Circular Scrolling Trigger (350): 0
    Synaptics Circular Pad (351):   0
    Synaptics Palm Detection (352): 0
    Synaptics Palm Dimensions (353):    10, 200
    Synaptics Coasting Speed (354): 20.000000, 50.000000
    Synaptics Pressure Motion (355):    30, 160
    Synaptics Pressure Motion Factor (356): 1.000000, 1.000000
    Synaptics Resolution Detect (357):  1
    Synaptics Grab Event Device (358):  0
    Synaptics Gestures (359):   1
    Synaptics Capabilities (360):   1, 0, 0, 1, 1, 0, 0
    Synaptics Pad Resolution (361): 12, 12
    Synaptics Area (362):   0, 0, 0, 0
    Synaptics Soft Button Areas (363):  618, 0, 736, 0, 0, 0, 0, 0
    Synaptics Noise Cancellation (364): 7, 7
    Device Product ID (322):    1739, 10608
    Device Node (321):  "/dev/input/event6"

synclient -l

Parameter settings:
    LeftEdge                = 49
    RightEdge               = 1187
    TopEdge                 = 48
    BottomEdge              = 850
    FingerLow               = 25
    FingerHigh              = 30
    MaxTapTime              = 180
    MaxTapMove              = 67
    MaxDoubleTapTime        = 180
    SingleTapTimeout        = 180
    ClickTime               = 100
    EmulateMidButtonTime    = 0
    EmulateTwoFingerMinZ    = 282
    EmulateTwoFingerMinW    = 7
    VertScrollDelta         = 30
    HorizScrollDelta        = 30
    VertEdgeScroll          = 0
    HorizEdgeScroll         = 0
    CornerCoasting          = 0
    VertTwoFingerScroll     = 1
    HorizTwoFingerScroll    = 1
    MinSpeed                = 1
    MaxSpeed                = 1.75
    AccelFactor             = 0.130976
    TouchpadOff             = 0
    LockedDrags             = 0
    LockedDragTimeout       = 5000
    RTCornerButton          = 2
    RBCornerButton          = 3
    LTCornerButton          = 0
    LBCornerButton          = 0
    TapButton1              = 1
    TapButton2              = 3
    TapButton3              = 0
    ClickFinger1            = 1
    ClickFinger2            = 3
    ClickFinger3            = 0
    CircularScrolling       = 0
    CircScrollDelta         = 0.1
    CircScrollTrigger       = 0
    CircularPad             = 0
    PalmDetect              = 0
    PalmMinWidth            = 10
    PalmMinZ                = 200
    CoastingSpeed           = 20
    CoastingFriction        = 50
    PressureMotionMinZ      = 30
    PressureMotionMaxZ      = 160
    PressureMotionMinFactor = 1
    PressureMotionMaxFactor = 1
    ResolutionDetect        = 1
    GrabEventDevice         = 0
    TapAndDragGesture       = 1
    AreaLeftEdge            = 0
    AreaRightEdge           = 0
    AreaTopEdge             = 0
    AreaBottomEdge          = 0
    HorizHysteresis         = 7
    VertHysteresis          = 7
    ClickPad                = 1
    RightButtonAreaLeft     = 618
    RightButtonAreaRight    = 0
    RightButtonAreaTop      = 736
    RightButtonAreaBottom   = 0
    MiddleButtonAreaLeft    = 0
    MiddleButtonAreaRight   = 0
    MiddleButtonAreaTop     = 0
    MiddleButtonAreaBottom  = 0

It could be a power management issue, I was trying to follow the steps on this link but I don't really know what I'm doing here: https://wiki.ubuntu.com/DebuggingTouchpadDetection

Thx in advance for any suggestion.

Pilot6
  • 90,100
  • 91
  • 213
  • 324
Killdashnein TV
  • 403
  • 1
  • 3
  • 10
  • 1
    The question I guess is whether it's a libinput problem, or a kernel driver, or even the touchpad itself. When the problem appears run evemu-record (which prints input events as kernel sends them to userspace) then compare whether you see anything odd in events while you move a finger over the touchpad. Like, is there delays in events, or anything similar. If everything looks fine, you may repeat that with libinput debug-events (which prints events post-processed by libinput). All of that should give you a hint where the problem might be and perhaps where to report a bug. – Hi-Angel Apr 26 '20 at 15:18
  • libinput event debug records a touch jump, as after that short input delay the cursor actually jumps a bit, but not because I used two fingers, it says: event5 - SYN1B7E:01 06CB:2970 Touchpad: kernel bug: Touch jump detected and discarded. See https://wayland.freedesktop.org/libinput/doc/1.14.1/touchpad-jumping-cursors.html for details. About evemu I noticed this line in the output, I think it's the delay I'm experiencing: E: 0.928704 0000 0000 0000 # ------------ SYN_REPORT (0) ---------- +657ms does this confirm it's a kernel driver issue? Should I paste full evemu output? – Killdashnein TV Apr 27 '20 at 00:48
  • Yeah, it confirms the issue is either in the driver or the touchpad itself. In this case I'd also suggest to test latest kernel just to see if it makes any difference. Acc. to this page, latest released one as of writing the words is 5.6.7. – Hi-Angel Apr 27 '20 at 06:17
  • Latest kernel didn't fix so I had to install windows 10 and check there too. I don't really understand why but the issue occurred even on windows so, as it's not a Linux problem anymore, I'll just delete the question and apologize for wasting your time :c – Killdashnein TV Apr 27 '20 at 13:32
  • No worries, and we had that assumption. Remember I said: it may be a touchpad issue. It is pretty typical to see broken hardware, just look at the "quirks" directory of libinput. Also, I'm pretty sure there's no reason to remove that question it may be useful to smeone coming from google searching for the touchpad name/laptop that you have, so they will find your question, and will know the reason of their problem. In fact, I encourage you to write an answer on this. Ping me up, I will upvote it. – Hi-Angel Apr 27 '20 at 13:45
  • And FYI, that does not mean there's no software-based workaround for your problem. I don't know one, but really there might well be. Like, I don't know, some kind of pinging the touchpad so it doesn't go into that "low-power" mode, or something else… Perhaps is there some property changes over at /sys/… directory that belongs to that touchpad when this happens… I didn't look for it, but it may well be that this problem was already solved by someone, just with a different touchpad ¯\(ツ) – Hi-Angel Apr 27 '20 at 14:02
  • 1
    Also, try playing with these values to see if they change anything, try disabling power control for touchpad. Here is a nice example how to figure out what directories correspond to your touchpad. – Hi-Angel Apr 27 '20 at 15:25
  • I still don't think it's an hardware problem indeed. By playing with Windows' drivers and device properties power-management, I got the problem to occur immediately after boot (not a great achievement but it shows the issue is affected by software), also, on Windows it takes a couple more seconds for the touchpad to become "idle" when not used, and then suffer from the issue when touched again (looks like autosuspend_delay_ms could have something to do with this). So I will now play with those values a bit as I was already trying before submitting this question, but definitely the wrong way. – Killdashnein TV Apr 27 '20 at 19:32
  • A device being buggy is orthogonal to the fact that you can influence it with software. The whole reason why those "device quirks" exist is because while devices they're for are buggy, their bugs can still be worked around somehow. That's why I mentioned that there still could be a workaround for your case too. UPD: if you want an example, here's the latest one from my browser history – Hi-Angel Apr 27 '20 at 20:09
  • I kinda solved! – Killdashnein TV Apr 28 '20 at 13:53

1 Answers1

5

I found a solution to my issue:

As suggested here https://wiki.ubuntu.com/DebuggingTouchpadDetection I was trying to disable power-management for my touchpad by running as root something like

echo 'on' > '/path/to/device/power/control'

but this didn't work when using the device path written in /proc/bus/input/devices.

So I installed powertop and I was able to locate the correct device and path to use: Runtime PM for I2C Adapter i2c-0 (Synopsys DesignWare I2C adapter);

The command powertop runs as root to disable autosuspend for this device is:

echo 'on' > '/sys/bus/i2c/devices/i2c-0/device/power/control'

This does indeed solve the issue! The only thing I'm missing now is how to run this on startup. (as I have no /etc/rc.local)

(edit)

To run the workaround on startup on systems using systemd create /etc/systemd/system/disable-touchpad-pm.service containing the following:

[Unit]
Description=disables Acer aspire v3 572g touchpad PM to work around input delays

[Service]
Type=oneshot
ExecStart=/bin/sh -c "echo on > /sys/bus/i2c/devices/i2c-0/device/power/control"

[Install]
WantedBy=multi-user.target

then run on a terminal:

sudo systemctl daemon-reload && sudo systemctl enable disable-touchpad-pm
Killdashnein TV
  • 403
  • 1
  • 3
  • 10
  • 1
    Amazing! To run it on startup create this file, and execute sudo systemctl daemon-reload && sudo systemctl enable disable-touchpad-pm. Btw, if you feel motivation, you could even contribute a workaround upstream by writing and submitting a kernel driver, which would then be included in following Linux kernel releases. But that would require to dig a bit deeper and find exactly why the problem is happening. I bet the laptop has screwed up something in ACPI tables. I don't have experience regarding ACPI tho. – Hi-Angel Apr 28 '20 at 16:27
  • 1
    I don't think I'm knowledgeable enough to write a kernel driver fix, but I'll try figuring that out. If I can't I will at least do my best to report the bug. Anyway your help and time were precious how can I reward you with some reputation? You even made the script for me. – Killdashnein TV Apr 28 '20 at 16:57
  • 1
    No worries, I'm just glad I made a tiny contribution to Linux ecosystem by helping you a bit. Btw, someday the "github gist" link or the comments may disappear, so I think it may be worth to copy the service content and the commands into your answer. – Hi-Angel Apr 28 '20 at 17:04
  • 1
    Executable rights are not needed btw, it's a service description that is parsed by systemd. – Hi-Angel Apr 28 '20 at 19:22
  • You must be right, the script didn't work at first so I had to change different things before understanding that /bin was missing before sh. That chmod was one of the things I tried but if it's unnecessary ty for pointing that out, I actually wanted to ask you to check the code after I modified it in case I did anything wrong but since it worked I didn't bother you. Should anything else be fixed? – Killdashnein TV Apr 28 '20 at 19:50
  • Nope, it looks fine. I'm actually surprised that using sh without /bin/sh didn't work. It works for me on Fedora and Archlinux, no clue why it's different on Ubuntu. I also prefer using RemainAfterExit=true so unless the service failed to start, it looks active. But this is probably just a matter of taste. Nice catch with the Description, I didn't know about that bit! – Hi-Angel Apr 28 '20 at 20:18
  • On RH en derivatives, it's /usr/bin/sh. – WanWizard Nov 17 '21 at 17:25