Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: GNUser on July 28, 2020, 07:37:53 AM

Title: [Solved] pointer customization lost after "udevadm trigger"
Post by: GNUser on July 28, 2020, 07:37:53 AM
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.
Title: Re: pointer customization lost after "udevadm trigger"
Post by: Juanito on July 28, 2020, 07: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
Title: Re: pointer customization lost after "udevadm trigger"
Post by: GNUser on July 28, 2020, 08: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.
Title: Re: pointer customization lost after "udevadm trigger"
Post by: GNUser on July 28, 2020, 09: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!
Title: Re: [Solved] pointer customization lost after "udevadm trigger"
Post by: GNUser on July 28, 2020, 09: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?
Title: Re: [Solved] pointer customization lost after "udevadm trigger"
Post by: Juanito on July 28, 2020, 09:52:23 AM
I don't know for sure - maybe @curaga can help?
Title: Re: [Solved] pointer customization lost after "udevadm trigger"
Post by: curaga on July 28, 2020, 01:29:53 PM
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.
Title: Re: [Solved] pointer customization lost after "udevadm trigger"
Post by: GNUser on July 28, 2020, 03:48:37 PM
That makes sense and would definitely explain the observations. Thanks, curaga :)