Xorg device disabled with 'Option "Ignore" "true"' still enabled by udev+Xorg. How to fix ?
Peter Hutterer
peter.hutterer at who-t.net
Mon Sep 9 16:22:09 PDT 2013
On Mon, Sep 09, 2013 at 12:31:01AM -0700, ar16 wrote:
> Hi,
>
> I'm running Opensuse 12.3/64,
>
> uname -r
> 3.7.10-1.16-desktop
>
> with
>
> X.Org X Server 1.13.2
>
> I've attached a USB IR receiver (Streamzap).
>
> I'm trying to keep Xorg from auto-adding the device as a KEYBOARD or
> MOUSE, using udev-discovered device info.
>
> The default Xorg evdev catchall includes
>
> cat /etc/X11/xorg.conf.d/10-evdev.conf
> ...
> Section "InputClass"
> Identifier "evdev pointer catchall"
> MatchIsPointer "on"
> MatchDevicePath "/dev/input/event*"
> Driver "evdev"
> EndSection
>
> Section "InputClass"
> Identifier "evdev keyboard catchall"
> MatchIsKeyboard "on"
> MatchDevicePath "/dev/input/event*"
> Driver "evdev"
> EndSection
> ...
>
> Iiuc, the override for just the Streamzap device should be
>
> cat /etc/X11/xorg.conf.d/05-streamzap.conf
> Section "InputClass"
> Identifier "Ignore Streamzap KEYBOARD"
> MatchIsKeyboard "on"
> MatchDevicePath "/dev/input/event*|/dev/input/mouse*"
> Driver "evdev"
Use "MatchDriver" here, otherwise you're actually (re)assigning the driver
to this device.
both of these could be merged into a single snippet using only MatchProduct
"treamzap", the rest is superfluous in your setup.
> MatchProduct "treamzap"
> Option "Ignore" "true"
> EndSection
> Section "InputClass"
> Identifier "Ignore Streamzap MOUSE"
> MatchIsPointer "on"
> MatchDevicePath "/dev/input/event*|/dev/input/mouse*"
> Driver "evdev"
> MatchProduct "treamzap"
> Option "Ignore" "true"
> EndSection
>
> but, after reboot,
>
> dmesg | grep -i stream
> [ 5.948841] usb 1-3.1: Product: Streamzap Remote Control
> [ 5.961779] usb 1-3.1: Manufacturer: Streamzap, Inc.
> [ 16.320725] Registered IR keymap rc-streamzap
> [ 16.343465] input: Streamzap PC Remote Infrared Receiver
> (0e9c:0000) as
> /devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3.1/1-3.1:1.0/rc/rc0/input8
> [ 16.343497] rc0: Streamzap PC Remote Infrared Receiver
> (0e9c:0000) as
> /devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3.1/1-3.1:1.0/rc/rc0
> [ 16.343678] streamzap 1-3.1:1.0: Registered Streamzap, Inc.
> Streamzap Remote Control on usb1:4
> [ 16.510240] IR RC5 (streamzap) protocol handler initialized
> [ 16.536955] usbcore: registered new interface driver
> streamzap
> [ 16.803999] input: MCE IR Keyboard/Mouse (streamzap) as
> /devices/virtual/input/input17
> [ 16.877543] rc rc0: lirc_dev: driver ir-lirc-codec
> (streamzap) registered at minor = 0
>
> grep -i stream /var/log/Xorg.0.log | egrep -i stream
> [ 37.541] (II) config/udev: Adding input device Streamzap PC
> Remote Infrared Receiver (0e9c:0000) (/dev/input/event8)
> [ 37.541] (**) Streamzap PC Remote Infrared Receiver
> (0e9c:0000): Ignoring device from InputClass "Ignore Streamzap
> IR as KYBD"
> [ 37.546] (II) config/udev: Adding input device MCE IR
> Keyboard/Mouse (streamzap) (/dev/input/event17)
this message is printed when udev lets us know a device exists, before an
xorg.conf snippet takes effect.
> [ 37.546] (**) MCE IR Keyboard/Mouse (streamzap): Ignoring
> device from InputClass "Ignore Streamzap IR as MOUSE"
now the snippet tells it to ignore this device and - it is, I can't see the
"MCE IR Keyboard/Mouse (streamzap)" device in your xinput list.
> [ 37.547] (II) config/udev: Adding input device MCE IR
> Keyboard/Mouse (streamzap) (/dev/input/mouse2)
> [ 37.547] (**) MCE IR Keyboard/Mouse (streamzap): Ignoring
> device from InputClass "Ignore Streamzap IR as MOUSE"
>
> xinput
> ⎡ Virtual core pointer id=2 [master
> pointer (3)]
> ⎜ ↳ Virtual core XTEST pointer id=4 [slave
> pointer (2)]
> ⎜ ↳ Kensington Kensington Expert Mouse id=8 [slave
> pointer (2)]
> ⎣ Virtual core keyboard id=3 [master
> keyboard (2)]
> ↳ Virtual core XTEST keyboard id=5 [slave
> keyboard (3)]
> ↳ Power Button id=6 [slave
> keyboard (3)]
> ↳ Power Button id=7 [slave
> keyboard (3)]
> ↳ Macally Peripherals Macally ICEKey keyboard id=9
> [slave keyboard (3)]
> ↳ Macally Peripherals Macally ICEKey keyboard id=10
> [slave keyboard (3)]
>
> Which looks like the Streamzap's ignored -- AFTER being assigned -- a
> bit confusing as to what's going on.
>
> But, a clear indication that it's not completely ignored is -- if, at
> this point, I press the POWER button on the Streamzap, it immediately
> powers off my desktop. Not an action that I'd intended!
>
> How do I completely disable the adding of the Streamzap and its use by
> Xorg?
your snippets are correct, the device is ignored. My current suspicion is
that whatever the power button does, it triggers the poweroff in the kernel,
not in X. you can easily verify that by switching to a tty, then pressing
the power button. if it shuts off, it's the kernel doing so.
Cheers,
Peter
More information about the xorg
mailing list