How to enable the trackpad?
Trackpads, can be disabled in desktop environments, such as Plasma, if you plug a USB device that gets also registered as a “pointer”.
By doing so, libinput notifies Plasma which in turn disables the trackpad. If this is not something you want, you can re-enable it using xinput
.
First, let’s list all devices:
1user $ xinput list
2
3⎡ Virtual core pointer id=2 [master pointer (3)]
4⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
5⎜ ↳ Keychron Keychron K2 id=10 [slave pointer (2)]
6⎜ ↳ TPPS/2 IBM TrackPoint id=15 [slave pointer (2)]
7⎜ ↳ Synaptics TM3075-002 id=14 [slave pointer (2)]
8⎣ Virtual core keyboard id=3 [master keyboard (2)]
9 ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
10 ↳ Power Button id=6 [slave keyboard (3)]
11 ↳ Video Bus id=7 [slave keyboard (3)]
12 ↳ Sleep Button id=8 [slave keyboard (3)]
13 ↳ Keychron Keychron K2 id=9 [slave keyboard (3)]
14 ↳ Integrated Camera: Integrated C id=11 [slave keyboard (3)]
15 ↳ AT Translated Set 2 keyboard id=12 [slave keyboard (3)]
16 ↳ ThinkPad Extra Buttons id=13 [slave keyboard (3)]
17 ↳ Keychron Keychron K2 id=16 [slave keyboard (3)]
In the above example, I have 3 real devices that are seen as pointers:
- Keychron K2 (my new awesome keyboard)
- TPPS/2 IBM TrackPoint (the ThinkPad trackpoint)
- Synaptics TM3075-002 (the actual trackpad which is handled by the synaptics library)
So now, we can easily enable or disable devices:
1xinput enable <id>
2xinput enable <name>
For example:
1user $ xinput enable 14
2user $ xinput enable "Synaptics TM3075-002"
In a script, it’s better to use the name of the device and not its id
because it may change across reboots.