[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: blacklist module? Selective disable USB?



Jeremy Ardley writes:

I have just installed Debian onto an older HP touchpad.

The machine has a touchscreen and a touchpad. The touchscreen is faulty and continually triggers. I have plugged in a USB mouse as well.

[...]

This was not effective so I manually disabled the hid_generic device

modprobe -r hid_generic

At this point the touchscreen stopped working but so did the plugged in USB mouse. The touchpad kept working.

So two issues:

1. How do I make the blackist entries work?

No idea about this one.

2. Can I selectively disable the USB devices that run the touchscreen yet keep any USB mouse working?

In case of touchscreens and mouses it may be easier to diable them at the X11 (xinput) level? It is an entirely different approach and works without root access. The basic commands are:

	xinput list                             # list devices
	xinput set-prop <ID> "Device Enabled" 0 # disable device with <ID>

I found that unintuitive enough to write a little auxiliary script that can take the names output by `xinput list` directly, see attachment or

Source: https://raw.githubusercontent.com/m7a/lo-shellscripts/master/set_xdev_enabled
Documentation: https://masysma.lima-city.de/32/shellscripts.xhtml

HTH
Linux-Fan

öö
#!/bin/sh -e
# Ma_Sys.ma X 11 Device Enable/Disable Script 1.0.1,
# Copyright (c) 2014, 2018 Ma_Sys.ma.
# For further info send an e-mail to Ma_Sys.ma@web.de.

head -n 4 "$0" | tail -n 3 | cut -c 3-
echo

# cf. http://askubuntu.com/questions/65951/how-to-disable-touchpad

if [ $# != 2 -o "$1" = "--help" -o "$1" = "-h" ]; then
	echo "USAGE $(basename "$0") pattern 0|1"
	echo
	echo To list all potential devices use \`xinput list\`.
	echo To enable set to 1. To disable set to 0.
	exit 0
fi

id="$(xinput list | grep -F "$1" | tr ' \t' '\n' | grep -E '^id=' | cut -c 4-)"
echo Selected IDs: $id
for i in $id; do
	xinput set-prop "$i" "Device Enabled" "$2"
done

Attachment: pgpT6MfXuvdrh.pgp
Description: PGP signature


Reply to: