Touchpad power-management issue, "sticky cursor", input detection delay (autosuspend)

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.


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