WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] pointer customization lost after "udevadm trigger"  (Read 2090 times)

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1345
I've noticed that loading any extension whose  tce.installed  script contains this line:
Code: [Select]
udevadm triggerCauses my pointer/trackpoint customization to be lost. The customization is achieved with this command at boot:
Code: [Select]
xinput set-prop 'TPPS/2 IBM TrackPoint' 'libinput Accel Speed' -0.4Currently, my poor-man's workaround is to re-run the  xinput  command after loading such extensions.

Please, how do I make the pointer customization permanent? My guess is that it would be with either a special udevadm rule or an xorg config file, but I'm not sure what would be the appropriate syntax or file to modify.
« Last Edit: July 28, 2020, 06:36:51 AM by Rich »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535
Re: pointer customization lost after "udevadm trigger"
« Reply #1 on: July 28, 2020, 04:58:06 AM »
I assume you could do it with an xorg.conf snippet in /usr/local/share/X11/xorg.conf.d - there's already an example in there

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1345
Re: pointer customization lost after "udevadm trigger"
« Reply #2 on: July 28, 2020, 05:31:36 AM »
Thank you, juanito. I tried changing this snippet in /usr/local/share/X11/xorg.conf.d/40-libinput.conf:

Code: [Select]
Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

To this:
Code: [Select]
Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
Option "libinput Accel Speed" "-0.4"
EndSection

and this:
Code: [Select]
Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
Option "Accel Speed" "-0.4"
EndSection

and this:
Code: [Select]
Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
Option "AccelSpeed" "-0.4"
EndSection

Alas, no joy--"udevadm trigger" causes the pointer to become unusable for me. Maybe a adding or modifying a udev rule would do the trick? Unfortunately, libinput is new to me as of TCL11 so I have no prior experience working with it.

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1345
Re: pointer customization lost after "udevadm trigger"
« Reply #3 on: July 28, 2020, 06:11:06 AM »
Juanito, you were right (as usual). It was a matter of using the correct syntax right AND restarting X, which I forgot to do.

I created a file called  /usr/local/share/X11/xorg.conf.d/52-trackpoint-tweaks.conf  with this in it:

Code: [Select]
Section "InputClass"
    Identifier         "Trackpoint tweaks"
    MatchProduct       "TPPS/2 IBM TrackPoint"
    MatchDevicePath    "/dev/input/event*"
    Driver             "libinput"
    Option             "AccelSpeed"      "-0.4"
EndSection

Then:
Code: [Select]
$ pkill -f X
$ startx

Now, the command "udevadm trigger" causes no changes in my trackpoint :) :) :)

Solved!

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1345
Re: [Solved] pointer customization lost after "udevadm trigger"
« Reply #4 on: July 28, 2020, 06:48:20 AM »
Juanito, if you'll indulge me with a question, I'd like to learn a nugget from this:
Why does "udevadm trigger" undo/break trackpoint's customization done via the xinput command, but has no effect if customization is done via /usr/local/share/X11/xorg.conf.d?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535
Re: [Solved] pointer customization lost after "udevadm trigger"
« Reply #5 on: July 28, 2020, 06:52:23 AM »
I don't know for sure - maybe @curaga can help?

Online curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10960
Re: [Solved] pointer customization lost after "udevadm trigger"
« Reply #6 on: July 28, 2020, 10:29:53 AM »
xinput applies settings to one device at runtime. Running udevadm may cause X to think the mouse was disconnected and reconnected, and X may think it's a new device. No inheriting old runtime options. However options from the config file are applied to all such new devices.
The only barriers that can stop you are the ones you create yourself.

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1345
Re: [Solved] pointer customization lost after "udevadm trigger"
« Reply #7 on: July 28, 2020, 12:48:37 PM »
That makes sense and would definitely explain the observations. Thanks, curaga :)