I’m using Manjaro KDE on a Dell Latitude E5440 on the 5.10.56 LTS kernel. I’ve noticed that other distros that use KDE have the same issue so I don’t think it’s specific to Manjaro, but I figured I’d ask here first.
Fn+F5 will toggle the touchpad on/off (typical laptop feature) just fine when I’m using a KDE flavored distro. I often use a wireless mouse so I like to have the touchpad disabled. However, if I do so much as log out or restart, the touchpad will be turned back on. In Gnome and XFCE DEs this issue doesn’t seem to happen. I’ve used Ubuntu, Elementary, Zorin OS Core and Light, Kubuntu, etc. and they all keep the touchpad off across logouts and restarts. Something I noticed in these other environments is that if I go to the touchpad settings and use the hotkey to toggle it on and off, it actually checks/unchecks “Enable Touchpad”. The opposite happens with KDE environments; if I press the hotkey to toggle it on and off, Device Enabled is always left on.
Surely there is some way to change this and I’m just not finding it? I went to Keyboard shortcuts, search for Touchpad to pull up Touchpad off, Touchpad on, and Touchpad toggle. I made sure that toggle was set to Fn+F5 and it is.
1-why are you using the 5.10.56 LTS kernel instead of last stable 5.13.11-1?
2-if you go to the system settings/input devices/touchpad in the device description you’ll see something like AlpsPS/2 or something like that, first of all disconnect any other external devices connected (you must disconnect everything before restarting the Laptop), uncheck the option “Device Enabled”. In order to restart your computer press once the Laptop’s power button an then enter, that will lead you to the login screen, at that moment the touchpad will be change to enable mode, choose restart. That is supposed to work (it did for me), by the way, the toggle on-off function of Fn-F5 combination keys are independent from this configuration menu so in theory if you disable the touchpad through system settings it wont be capable of enable it again by pressing Fn-F5 combination keys (as you mentioned it) no matter if you see the on-off screen indicator. Or on the contrary lets suppose the touchpad is still enabled in the system configuration menu, if you press the Fn-F5 combination it’ll work, but you wont see any change in the “Device Enabled” option.
Remember when the system restarts the touchpad will be enabled but once you log in your account it won’t work. At that moment you can connect your external mouse
Take into account that if the touchpad is disabled in the system settings, it’ll work if you restart or log out while you’re in the login screen interface but once you enter the session the system configuration will take effect.
Try this other option, enter BIOS, go to POST Behavior-Mouse/Touchpad and choose PS/2 Mouse, it describes it disables the integrated touchpad when an external PS/2 is present (I haven’t tested it yet)
With this older computer I wasn’t in a hurry to move to a different kernel. I’m now on 5.13.
The suggestion that you made is very detailed and I appreciate it, but doing this does as you said and renders the function key to toggle the touchpad useless when I have disabled the touchpad altogether. I want to have the same functionality as other Linux distros I’ve tried when it comes to using Fn+F5 to disable (or enable) my touchpad and it stays that way after a restart.
With the help of the KDE Community Telegram group, I was able to find a workaround that works for me. I call this a workaround for a couple of reasons:
The touchpad will be enabled at the login screen. Which is fine as I can’t use Fn+F5 to toggle it on/off there anyways.
This workaround will run a script after login that disables the touchpad. So it doesn’t necessarily “save” the state before you logout/restart/shutdown.
The script is on the Arch Wiki so I’m unsure if this will work on Debian, Fedora, BSD, etc. I only have experience with doing this on Manjaro.
If this is something that is a bother then you could check out other DEs as this issue seems specific to KDE.
The first thing you will want to do is install xinput. This can be done by opening Add/Remove Software and searching for xorg-xinput, and then installing it. It’s in official repositories. You will then be prompted to restart, which you should do so. Next, we will create the script.
Open Terminal and enter:
sudo nano ~/.xprofile
Copy/paste the bash script below:
#!/bin/bash
declare -i ID
ID=`xinput list | grep -Eio '(touchpad|glidepoint)\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'`
declare -i STATE
STATE=`xinput list-props $ID | grep 'Device Enabled' | awk '{print $4}'`
if [ $STATE -eq 1 ]
then
xinput disable $ID
# echo "Touchpad disabled."
# notify-send -a 'Touchpad' 'Disabled' -i input-touchpad
else
xinput enable $ID
# echo "Touchpad enabled."
# notify-send -a 'Touchpad' 'Enabled' -i input-touchpad
fi
Ctrl+X to exit and Y → Enter to save the script.
Now you should be back to the Terminal. Now enter:
sudo chmod +x ~/.xprofile
to make it executable. You can now exit Terminal.
Last, open System Settings and go to Startup and Shutdown → Autostart. Click Add… then choose Login Script and select .xprofile. If you are unable to see the file, press Ctrl+H to show hidden files.
That’s it! You can now test it out by logging out and back in. Your touchpad should be disabled immediately.