udev rule to disable the vc4 input device

This is for ARMv8 based devices

udev rule to disable the vc4 input device

Postby keithspg » Wed Mar 17, 2021 6:54 pm

I have the vc4-kms-v3d overlay enabled. It creates an input device that causes a pointer to show in Weston. How do I get rid of the input device so that it does not appear.
I queried udev and created this rule which does nothing:
$this->bbcode_second_pass_code('', 'KERNEL=="event*",ATTRS{name}=="vc4",ENV{LIBINPUT_IGNORE_DEVICE}="1"')

The device shows up with this info:
$this->bbcode_second_pass_code('', ' udevadm info --attribute-walk --path=$(udevadm info --query=path --name=/dev/input/event0)

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

looking at device '/devices/platform/soc/3f902000.hdmi/rc/rc0/input0/event0':
KERNEL=="event0"
SUBSYSTEM=="input"
DRIVER==""
ATTR{power/control}=="auto"
ATTR{power/runtime_active_time}=="0"
ATTR{power/runtime_status}=="unsupported"
ATTR{power/runtime_suspended_time}=="0"

looking at parent device '/devices/platform/soc/3f902000.hdmi/rc/rc0/input0':
KERNELS=="input0"
SUBSYSTEMS=="input"
DRIVERS==""
ATTRS{capabilities/abs}=="0"
ATTRS{capabilities/ev}=="100017"
ATTRS{capabilities/ff}=="0"
ATTRS{capabilities/key}=="ffffc000000000 3ff 0 400000320fc200 40830c900000000 0 210300 49d2c040ec00 1e378000000000 8010000010000000"
ATTRS{capabilities/led}=="0"
ATTRS{capabilities/msc}=="10"
ATTRS{capabilities/rel}=="3"
ATTRS{capabilities/snd}=="0"
ATTRS{capabilities/sw}=="0"
ATTRS{id/bustype}=="001e"
ATTRS{id/product}=="0000"
ATTRS{id/vendor}=="0000"
ATTRS{id/version}=="0001"
ATTRS{name}=="vc4"
ATTRS{phys}=="vc4/input0"
ATTRS{power/control}=="auto"
ATTRS{power/runtime_active_time}=="0"
ATTRS{power/runtime_status}=="unsupported"
ATTRS{power/runtime_suspended_time}=="0"
ATTRS{properties}=="20"
ATTRS{uniq}==""
...
')
libinput lists it like this (the first one is my touch screen the second one is this dummy):
$this->bbcode_second_pass_code('', '# libinput list-devices
...
Device: vc4
Kernel: /dev/input/event0
Group: 2
Seat: seat0, default
Capabilities: keyboard pointer
Tap-to-click: n/a
Tap-and-drag: n/a
Tap drag lock: n/a
Left-handed: disabled
Nat.scrolling: disabled
Middle emulation: n/a
Calibration: n/a
Scroll methods: *button
Click methods: none
Disable-w-typing: n/a
Accel profiles: flat *adaptive
Rotation: n/a')
why does that rule not disable it? When I test it, I get this:
$this->bbcode_second_pass_code('', 'udevadm test /sys/devices/platform/soc/3f902000.hdmi/rc/rc0/input0/
...
Reading rules file: /etc/udev/rules.d/99-vc4_input.rules
DEVPATH=/devices/platform/soc/3f902000.hdmi/rc/rc0/input0
PRODUCT=1e/0/0/1
NAME="vc4"
PHYS="vc4/input0"
PROP=20
EV=100017
KEY=ffffc000000000 3ff 0 400000320fc200 40830c900000000 0 210300 49d2c040ec00 1e378000000000 8010000010000000
REL=3
MSC=10
MODALIAS=input:b001Ev0000p0000e0001-e0,1,2,4,14,k71,72,73,74,8A,8B,8D,8E,8F,96,9E,9F,A1,A4,A6,A7,A8,AB,AE,C8,C9,D0,D5,160,163,166,167,16C,16D,173,17A,189,18E,18F,190,191,192,193,199,19C,19D,1B6,200,201,202,203,204,205,206,207,208,209,266,267,268,269,26A,26B,26C,26D,26E,26F,270,271,272,273,274,275,276,277,r0,1,am4,lsfw
ACTION=add
SUBSYSTEM=input
TAGS=:seat:
ID_INPUT=1
ID_INPUT_POINTINGSTICK=1
ID_INPUT_KEY=1
ID_PATH=platform-3f902000.hdmi
ID_PATH_TAG=platform-3f902000_hdmi
CURRENT_TAGS=:seat:
ID_FOR_SEAT=input-platform-3f902000_hdmi
USEC_INITIALIZED=7458772
run: 'kmod load input:b001Ev0000p0000e0001-e0,1,2,4,14,k71,72,73,74,8A,8B,8D,8E,8F,96,9E,9F,A1,A4,A6,A7,A8,AB,AE,C8,C9,D0,D5,160,163,166,167,16C,16D,173,17A,189,18E,18F,190,191,192,193,199,19C,19D,1B6,200,201,202,203,204,205,206,207,208,209,266,267,268,269,26A,26B,26C,26D,26E,26F,270,271,272,273,274,275,276,277,r0,1,am4,lsfw'
Unload module index
Unloaded link configuration context.')

From the docs, it should say IGNORE but it never does and I always get the pointer which does not move.

Thanks
Last edited by keithspg on Wed Mar 17, 2021 7:01 pm, edited 2 times in total.
keithspg
 
Posts: 221
Joined: Mon Feb 23, 2015 4:14 pm

Re: How to create udev rule to disable the vc4 input device

Postby keithspg » Wed Mar 17, 2021 6:58 pm

D'oh, I figured it out, to use the name in the rule, I need to use 'input*' instead of 'event0'.

$this->bbcode_second_pass_code('', 'KERNEL=="input*",ATTRS{name}=="vc4",ENV{LIBINPUT_IGNORE_DEVICE}="1"')

this rule supposedly works according to udev, anyway
Last edited by keithspg on Wed Mar 17, 2021 7:04 pm, edited 1 time in total.
keithspg
 
Posts: 221
Joined: Mon Feb 23, 2015 4:14 pm

Re: udev rule to disable the vc4 input device

Postby keithspg » Wed Mar 17, 2021 7:03 pm

So, I got a rule to supposedly disable it, but it still shows up:
$this->bbcode_second_pass_code('', 'Reading rules file: /etc/udev/rules.d/99-vc4_input.rules
DEVPATH=/devices/platform/soc/3f902000.hdmi/rc/rc0/input0
PRODUCT=1e/0/0/1
NAME="vc4"
PHYS="vc4/input0"
PROP=20
EV=100017
KEY=ffffc000000000 3ff 0 400000320fc200 40830c900000000 0 210300 49d2c040ec00 1e378000000000 8010000010000000
REL=3
MSC=10
MODALIAS=input:b001Ev0000p0000e0001-e0,1,2,4,14,k71,72,73,74,8A,8B,8D,8E,8F,96,9E,9F,A1,A4,A6,A7,A8,AB,AE,C8,C9,D0,D5,160,163,166,167,16C,16D,173,17A,189,18E,18F,190,191,192,193,199,19C,19D,1B6,200,201,202,203,204,205,206,207,208,209,266,267,268,269,26A,26B,26C,26D,26E,26F,270,271,272,273,274,275,276,277,r0,1,am4,lsfw
ACTION=add
SUBSYSTEM=input
TAGS=:seat:
ID_INPUT=1
ID_INPUT_POINTINGSTICK=1
ID_INPUT_KEY=1
ID_PATH=platform-3f902000.hdmi
ID_PATH_TAG=platform-3f902000_hdmi
CURRENT_TAGS=:seat:
ID_FOR_SEAT=input-platform-3f902000_hdmi
LIBINPUT_IGNORE_DEVICE=1
USEC_INITIALIZED=7426780
run: 'kmod load input:b001Ev0000p0000e0001-e0,1,2,4,14,k71,72,73,74,8A,8B,8D,8E,8F,96,9E,9F,A1,A4,A6,A7,A8,AB,AE,C8,C9,D0,D5,160,163,166,167,16C,16D,173,17A,189,18E,18F,190,191,192,193,199,19C,19D,1B6,200,201,202,203,204,205,206,207,208,209,266,267,268,269,26A,26B,26C,26D,26E,26F,270,271,272,273,274,275,276,277,r0,1,am4,lsfw'
Unload module index
Unloaded link configuration context.
')
it supposedly ignores the device, but libinput still sees it as it was before and the pointer is still visible.
keithspg
 
Posts: 221
Joined: Mon Feb 23, 2015 4:14 pm


Return to ARMv8 Devices

Who is online

Users browsing this forum: No registered users and 9 guests