0

I am trying to enable synaptics touchpad "natural scrolling" on startup, based on the registry key "EnableNaturalScrolling".

    if [ $ENS -eq 1 ] && [ $VSD -gt 0 ] ; then
             VSD=$(synclient | grep VertScrollDelta | cut -d "=" -f2)
             VS_INVERT=$((VSD * -1))
             TPAD_ID=$(xinput | grep Synaptics | awk '{print $6}' | cut -d "=" -f2)
             xinput set-prop $TPAD_ID "Synaptics Scrolling Distance" $VS_INVERT $VS_INVERT
             synclient VertScrollDelta=$VS_INVERT
    fi

When this condition runs, all values are as expected ($ENS=1, $VSD=112, VS_INVERT=-112, TPAD_ID is what I need it to be)

The last two commands are two separate ways of enabling "natural scrolling on a Synaptics touchpad by reversing the Scrolling Distance.

xinput list-props $TPAD_ID | grep "Distance" shows negative values for this property I changed.

However, by the time GUI starts up, Scrolling Distance values are positive if I xinput list-props $TPAD_ID

How can I figure out why my changes are being altered or reverted by some program?

  • Does this answer your question? [Startup script not executing](https://askubuntu.com/questions/1450604/startup-script-not-executing) – Raffa Mar 08 '23 at 19:03
  • I have proof that the startup script executes via logger debug statements. – Niko Senkov Mar 08 '23 at 19:07
  • How about delaying the execution of the script until whatever is messing it up has run? – Organic Marble Mar 08 '23 at 21:49
  • Workarounds certainly exist but I would rather determine what is changing my code and why. I'll be sure to update once I figure it out! – Niko Senkov Mar 09 '23 at 03:40
  • The something that over-writes my changes is Xserver reloading the synaptics touchpad 39 seconds after boot. My script needs to run after this. – Niko Senkov Mar 09 '23 at 04:45

1 Answers1

0

The "something" that over-writes my changes is Xserver reloading the synaptics touchpad 39 seconds after boot.