I downloaded Fedora 43 Cosmic (Wayland) and found no way to disable my touchpad (mouse is always connected). xinput and synclient seem to be X11 only. Touchpad Disable is a simple checkbox with KDE Wayland but not so with Fedora Cosmic.
After some web research, I found a manual device lookup then copy-paste to a root command line that worked. I wrote a tpad-off script to automate the process a bit more. However, the script runs but does nothing while copying the output command line and running from the terminal works.
( UPDATED - 1. tpad-on:SUCCESS 2. tpad-off:FAIL )
#!/bin/bash
grep -E "Touchpad|platform" /proc/bus/input/devices |
cut -d '=' -f 2 |
sed -z 's;pad.\\n;pad @echo 1 \\\> /sys;g' |
grep @ |
cut -d '@' -f 2 |
sed -e 's;$;/inhibited;g' | /bin/bash
OUTPUT from grep -E "Touchpad|platform" /proc/bus/input/devices
S: Sysfs=/devices/platform/i8042/serio0/input/input3
N: Name="ETPS/2 Elantech Touchpad"
S: Sysfs=/devices/platform/i8042/serio1/input/input5
S: Sysfs=/devices/platform/AMDI0010:01/i2c-1/i2c-ELAN2204:00/0018:04F3:309A.0002/input/input11
N: Name="ELAN2204:00 04F3:309A Touchpad"
S: Sysfs=/devices/platform/AMDI0010:01/i2c-1/i2c-ELAN2204:00/0018:04F3:309A.0002/input/input13
S: Sysfs=/devices/platform/pcspkr/input/input14
S: Sysfs=/devices/platform/huawei-wmi/input/input15
Output (fail) from tpad-off script (that ignored pipe to /bin/bash)
echo 1 > /sys/devices/platform/i8042/serio1/input/input5/inhibited
echo 1 > /sys/devices/platform/AMDI0010:01/i2c-1/i2c-ELAN2204:00/0018:04F3:309A.0002/input/input13/inhibited
grep -E "Touchpad|platform" /proc/bus/input/devicesto your question (no comment)./bin/sh. (2) It looks like you're missing a step -- the way that's written it generates output but just writes it to stdout instead of enacting anything. I wouldn't expect that to do anything useful at all, even run by hand on the command line, written as it is now.| /bin/bashpipe to the script worked fortpad-onbut failed fortpad-off. Except forecho 0 >changed toecho 1 >, the scripts are the same.evalhas, so it's safer to run explicit loops, even if the code is a lot more wordy. As for the immediate bug, though -- without having the touchpad at hand and a Linux box experiencing the problem, I can't speak to why reenabling it doesn't work; there's nothing innately wrong with the script at hand.while IFS= read -r line; do [[ $line =~ "N:".*Touchpad ]] || continue; read -r sys || break; [[ $s = "S: Sysfs="* ]] || continue; echo 0 >"${s#*=}"; done </proc/bus/input/devices-- but again, that's not expected to behave differently from the code you already have (except when there's a malicious device attached that's trying to trick your script into running unwanted commands).