K
K
Kiki552018-10-09 09:52:02
linux
Kiki55, 2018-10-09 09:52:02

Disable device in linux? What are the ways?

I read about modprobe and blacklist, but this did not solve the problem, and here's why ... I'll start in order.
I have a wireless (singed) mouse with a radio module. The mouse has three buttons, along with a middle click, but at the same time, the radio module carries a keyboard controller, which is highly undesirable to me. I would like to deactivate it. It all looks like this:

Log
Oct 9 02:38:14 asus kernel: [ 7456.489811] usb 6-4: new full-speed USB device number 3 using ohci-pci
Oct 9 02:38:14 asus kernel: [ 7456.676848] usb 6-4: New USB device found, idVendor=25a7, idProduct=fa23
Oct 9 02:38:14 asus kernel: [ 7456.676851] usb 6-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Oct 9 02:38:14 asus kernel: [ 7456.676852] usb 6-4: Product: 2.4G Receiver
Oct 9 02:38:14 asus kernel: [ 7456.676853] usb 6-4: Manufacturer: Compx
Oct 9 02:38:14 asus kernel: [ 7456.683165] input: Compx 2.4G Receiver as /devices/pci0000:00/0000:00:12.0/usb6/6-4/6-4:1.0/0003:25A7:FA23.0003/input/input13
Oct 9 02:38:14 asus kernel: [ 7456.742022] hid-generic 0003:25A7:FA23.0003: input,hidraw0: USB HID v1.10 Keyboard [Compx 2.4G Receiver] on usb-0000:00:12.0-4/input0
Oct 9 02:38:14 asus kernel: [ 7456.747470] input: Compx 2.4G Receiver as /devices/pci0000:00/0000:00:12.0/usb6/6-4/6-4:1.1/0003:25A7:FA23.0004/input/input14
Oct 9 02:38:14 asus kernel: [ 7456.806007] hid-generic 0003:25A7:FA23.0004: input,hiddev0,hidraw1: USB HID v1.10 Mouse [Compx 2.4G Receiver] on usb-0000:00:12.0-4/input1
Oct 9 02:38:14 asus mtp-probe: checking bus 6, device 3: "/sys/devices/pci0000:00/0000:00:12.0/usb6/6-4"
Oct 9 02:38:14 asus mtp-probe: bus: 6, device: 3 was not an MTP device

From this it can be seen that both devices work on the same driver - hid-generic. Disable it or add it to the blacklist modprobe - kills both the mouse and the keypad. Can you think of something? Shut up with another driver or something like that? Sorry in advance, I'm an amateur.
PS But my neighbor is a real technofascist. It has everything you need, from radio-electronic equipment to software for any fantasy.
We will conditionally assume that the interest here is purely sporting. I would appreciate any advice :)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Gerasimov, 2018-10-11
@OYTIS

How about udev?
https://projectgus.com/2014/09/blacklisting-a-sing...

P
pfg21, 2018-10-11
@pfg21

udev operates with drivers / modules, respectively, both are targeted through it.
look at the settings of the module, it may be possible to fade the devices in it.
Another option is to patch the sources and recompile.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question