2

My laptop has a wonky trackpoint that keeps on moving the mouse around.

When using xorg, i can use this command to shut it off: xinput -set-prop "AlpsPS/2 ALPS DualPoint Stick" "Device Enabled" 0

seems like xinput is not a thing on wayland? A quick search gave me libinput, but libinput gives me no possibility to shut down the trackpoint (as far as i can see)

So how would I turn off the trackpoint in wayland? Or is there maybe another way of doing this than xinput/libinput?

System info:

Toshiba Portege Z30A

Ubuntu 19.10 GNOME

*Update:

I found this discussion: https://gist.github.com/fghaas/3406be59095de212182f1803a503a64b#file-75-input-rules

Which seems to do exactly what I need, but I don't understand how to execute it. Could I get some help making sense of it? Where do I put what?

Eirik
  • 301
  • 2
  • 5
  • 13

4 Answers4

6

This worked for me today:

sudo gedit /etc/udev/rules.d/99-myfavoritetrackpoint.rules

In that file:

# ALPS DualPoint Stick: Ignore as input device
ATTRS{name}=="*DualPoint Stick", ENV{ID_INPUT}="", ENV{ID_INPUT_MOUSE}="", ENV{ID_INPUT_POINTINGSTICK}=""

If that's not your device name, you would probably do the following and look for your device name to replace in the above command:

sudo apt-get install libinput-tools
sudo libinput list-devices
user1839457
  • 76
  • 1
  • 2
1

On recent Thinkpads ~2023 above solution didn't work for me. However with guidance from following post I could make it easily.

First find folder location of our device:

grep -a2 TrackPoint /proc/bus/input/devices

Then append 1 to the inhibited button and include folder /sys/ before the location of the output of the S: section, example:
S: Sysfs=/devices/platform/i8042/serio1/input/input5

As root:

echo 1 > /sys/devices/platform/i8042/serio1/input/input5/inhibited

Pit
  • 111
0

This worked for my HP Elitebook 8470p too:

sudo vim /etc/udev/rules.d/99-myfavoritetrackpoint.rules

then in the file:


ATTRS{name}=="PS/2 Generic Mouse", ENV{ID_INPUT}="", ENV{ID_INPUT_MOUSE}="", ENV{ID_INPUT_POINTINGSTICK}=""```

use: sudo apt-get install libinput-tools; sudo libinput list-devices to get the name of your pointing stick

Flint
  • 1
0

The answers provided by @user1839457 and @flint work well.

Note that as an alternative to unsetting the ID_INPUT* variables, one can also use something like this, as documented in the libinput troubleshooting section:

If a device has the LIBINPUT_IGNORE_DEVICE udev property set to any value but “0”, that device is not initialized by libinput. [...]

This property should be used for devices that are correctly detected as input devices [..] but that should not be used by libinput. It is recommended that devices that should not be handled as input devices at all unset the ID_INPUT and related properties instead. The LIBINPUT_IGNORE_DEVICE property signals that only libinput should ignore this property but other parts of the stack (if any) should continue treating this device normally.

# /etc/udev/rules.d/99-disable-trackpoint.rules
# Skip trackpoint device addition
ACTION!="remove", ATTRS{name}=="*TrackPoint*", ENV{LIBINPUT_IGNORE_DEVICE}="1"

However, I found that on my computer (Lenovo ThinkPad X1), either option would also disable my physical mouse buttons above the trackpad. I put together a small project to work around that, which you can find here. In case somebody stumbles upon the exact same problem, simply follow these few simple steps:

# clone repo
git clone https://github.com/tmoerschell/trackpoint-filter.git
cd trackpoint-filter

build

mkdir build && cd build cmake .. -DCMAKE_BUILD_TYPE=Release -GNinja cmake --build .

install

sudo cmake --build . --target install

enable and start systemd service

sudo systemctl daemon-reload sudo systemctl enable --now trackpoint-filter

refresh udev devices

sudo udevadm control --reload-rules sudo udevadm trigger --subsystem-match=input --action=remove --attr-match=name="TrackPoint" sudo udevadm trigger --subsystem-match=input --action=add

The README.md file provides more details if necessary.

If disabling the trackpoint device doesn't also disable mouse buttons, do not use this. Simply create the udev rules and reload them (3 last commands). I hope this can help someone in the same situation as me!