[opensuse] Can't exclude/prevent udev/xorg auto-recognition of an IR/Remote as a KEYBOARD device; bug or a config issue?
I'm running Opensuse 12.3/64. I'm installing a StreamzapIR LIRC remote for exclusive use with XBMC; I want it otherwise ignored by the system/KDE/etc. Part of the process is, 1st, getting the remote prpoerly IGNORED as a "KEYBOARD" device. Atm, I'm unsuccessfuly at excluding the StreamzapIR from being recognized as a KYBD dev either by: xorg udev My question is: How/where do I properly exclude the Streamzap <--> Keyboard mapping? Here's what I have so far: Following http://wiki.xbmc.org/index.php?title=HOW-TO:Setup_Streamzap_PC_Remote_for_Li... I add cat /etc/X11/xorg.conf.d/90-streamzap.conf Section "InputClass" Identifier "Ignore Streamzap IR as KYBD" MatchProduct "Streamzap" MatchIsKeyboard "true" Option "Ignore" "true" EndSection But after boot, I still have hwinfo ... 38: PS/2 00.0: 10800 Keyboard <=========================================== [Created at input.226] Unique ID: 2jvT.MnZK4QjxeC0 Hardware Class: keyboard Model: "MCE IR Keyboard/Mouse (streamzap)" Device: "MCE IR Keyboard/Mouse (streamzap)" Compatible to: int 0x0211 0x0001 Device File: /dev/input/event17 Device Files: /dev/input/event17, /dev/input/ir Device Number: char 13:81 Driver Info #0: XkbRules: xfree86 XkbModel: pc104 Config Status: cfg=new, avail=yes, need=no, active=unknown ... 65: USB 00.0: 0000 Unclassified device [Created at usb.122] Unique ID: vt3A.WSZ9GAy9ji4 Parent ID: 2UT6.MK3XiDwLleA SysFS ID: /devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3.1/1-3.1:1.0 SysFS BusID: 1-3.1:1.0 Hardware Class: unknown Model: "Streamzap Remote Control" Hotplug: USB Vendor: usb 0x0e9c "Streamzap, Inc." Device: usb 0x0000 "Streamzap Remote Control" Revision: "1.00" Driver: "streamzap" Driver Modules: "streamzap" Speed: 1.5 Mbps Module Alias: "usb:v0E9Cp0000d0100dc00dsc00dp00icFFiscFFipFFin00" Driver Info #0: Driver Status: streamzap is active Driver Activation Cmd: "modprobe streamzap" Config Status: cfg=no, avail=yes, need=no, active=unknown Attached to: #81 (Hub) ... which Xorg picks up on apparently due to the /etc/X11/xorg evdev catchall in cat /etc/X11/xorg.conf.d/10-evdev.conf ... Section "InputClass" Identifier "evdev keyboard catchall" MatchIsKeyboard "on" MatchDevicePath "/dev/input/event*" Driver "evdev" EndSection ... checking, that's the case grep -i zap /var/log/Xorg.0.log [ 42.683] (II) config/udev: Adding input device Streamzap PC Remote Infrared Receiver (0e9c:0000) (/dev/input/event8) [ 42.683] (**) Streamzap PC Remote Infrared Receiver (0e9c:0000): Ignoring device from InputClass "Ignore Streamzap IR" [ 42.688] (II) config/udev: Adding input device MCE IR Keyboard/Mouse (streamzap) (/dev/input/event17) [ 42.688] (**) MCE IR Keyboard/Mouse (streamzap): Applying InputClass "evdev pointer catchall" [ 42.688] (**) MCE IR Keyboard/Mouse (streamzap): Applying InputClass "evdev keyboard catchall" [ 42.688] (**) MCE IR Keyboard/Mouse (streamzap): Applying InputClass "evdev pointer catchall" [ 42.688] (**) MCE IR Keyboard/Mouse (streamzap): Applying InputClass "evdev keyboard catchall" [ 42.688] (**) MCE IR Keyboard/Mouse (streamzap): Applying InputClass "LocalKeyboard" ==> [ 42.688] (II) Using input driver 'evdev' for 'MCE IR Keyboard/Mouse (streamzap)' [ 42.688] (**) MCE IR Keyboard/Mouse (streamzap): always reports core events [ 42.689] (**) evdev: MCE IR Keyboard/Mouse (streamzap): Device: "/dev/input/event17" [ 42.689] (--) evdev: MCE IR Keyboard/Mouse (streamzap): Vendor 0 Product 0 [ 42.689] (--) evdev: MCE IR Keyboard/Mouse (streamzap): Found 3 mouse buttons [ 42.689] (--) evdev: MCE IR Keyboard/Mouse (streamzap): Found relative axes [ 42.689] (--) evdev: MCE IR Keyboard/Mouse (streamzap): Found x and y relative axes [ 42.689] (--) evdev: MCE IR Keyboard/Mouse (streamzap): Found keys [ 42.689] (II) evdev: MCE IR Keyboard/Mouse (streamzap): Configuring as mouse [ 42.689] (II) evdev: MCE IR Keyboard/Mouse (streamzap): Configuring as keyboard [ 42.689] (**) evdev: MCE IR Keyboard/Mouse (streamzap): YAxisMapping: buttons 4 and 5 [ 42.689] (**) evdev: MCE IR Keyboard/Mouse (streamzap): EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200 [ 42.689] (II) XINPUT: Adding extended input device "MCE IR Keyboard/Mouse (streamzap)" (type: KEYBOARD, id 13) [ 42.689] (II) evdev: MCE IR Keyboard/Mouse (streamzap): initialized for relative axes. [ 42.689] (**) MCE IR Keyboard/Mouse (streamzap): (accel) keeping acceleration scheme 1 [ 42.689] (**) MCE IR Keyboard/Mouse (streamzap): (accel) acceleration profile 0 [ 42.689] (**) MCE IR Keyboard/Mouse (streamzap): (accel) acceleration factor: 2.000 [ 42.689] (**) MCE IR Keyboard/Mouse (streamzap): (accel) acceleration threshold: 4 [ 42.689] (II) config/udev: Adding input device MCE IR Keyboard/Mouse (streamzap) (/dev/input/mouse2) [ 42.689] (**) MCE IR Keyboard/Mouse (streamzap): Applying InputClass "LocalKeyboard" My 1st guess at a problem is there's no proper/correct match for MatchProduct "Streamzap" as there's no "Product" info in the hwinfo db for the "38: PS/2 00.0: 10800 Keyboard" device. Looking at the hwinfo output, I'm not sure WHAT to match on there ... SO, the right solution seems to me to be a udev rule disabling the device recognition as a KYBD. e.g., cat /etc/udev/rules.d/10-local.rules ... SUBSYSTEM=="zzzz" ATTRS{xxxx}=="THIS" ATTRS{yyyy}=="THAT" ... OPTIONS==”ignore_device” ... To get the right match params for I UNIQUE match, I check udevadm for the device from hwinfo, "Device File: /dev/input/event17", udevadm info --query=all --path=$(udevadm info --query=path --name=/dev/input/event17) P: /devices/virtual/input/input17/event17 N: input/event17 S: input/ir E: DEVLINKS=/dev/input/ir E: DEVNAME=/dev/input/event17 E: DEVPATH=/devices/virtual/input/input17/event17 E: DMI_VENDOR=System manufacturer E: ID_INPUT=1 E: ID_INPUT_KEY=1 E: ID_INPUT_KEYBOARD=1 E: ID_INPUT_MOUSE=1 E: ID_SERIAL=noserial E: MAJOR=13 E: MINOR=81 E: SUBSYSTEM=input E: USEC_INITIALIZED=477263 SUBSYSTEM is easy. Unfortunately, there's not a definitely completly unique set of ATTR's to match -- no VENDOR/PRODUCT info, for example. Still, I thought this *should* do it, cat /etc/udev/rules.d/10-local.rules SUBSYSTEM=="input" ATTRS{ID_INPUT_KEYBOARD}=="1" ATTRS{DEVLINKS}=="/dev/input/ir" OPTIONS==”ignore_device” But, after reboot, hwinfo --keyboard STILL returns, ... 38: PS/2 00.0: 10800 Keyboard [Created at input.226] Unique ID: 2jvT.MnZK4QjxeC0 Hardware Class: keyboard Model: "MCE IR Keyboard/Mouse (streamzap)" Device: "MCE IR Keyboard/Mouse (streamzap)" Compatible to: int 0x0211 0x0001 Device File: /dev/input/event17 Device Files: /dev/input/event17, /dev/input/ir Device Number: char 13:81 Driver Info #0: XkbRules: xfree86 XkbModel: pc104 Config Status: cfg=new, avail=yes, need=no, active=unknown ... and, of course, Xorg sees/grabs it, grep -i zap /var/log/Xorg.0.log [ 39.796] (II) config/udev: Adding input device Streamzap PC Remote Infrared Receiver (0e9c:0000) (/dev/input/event8) [ 39.796] (**) Streamzap PC Remote Infrared Receiver (0e9c:0000): Ignoring device from InputClass "Ignore Streamzap IR keyboard dev" [ 39.806] (II) config/udev: Adding input device MCE IR Keyboard/Mouse (streamzap) (/dev/input/event17) [ 39.806] (**) MCE IR Keyboard/Mouse (streamzap): Applying InputClass "evdev pointer catchall" [ 39.806] (**) MCE IR Keyboard/Mouse (streamzap): Applying InputClass "evdev keyboard catchall" [ 39.806] (**) MCE IR Keyboard/Mouse (streamzap): Applying InputClass "evdev pointer catchall" [ 39.806] (**) MCE IR Keyboard/Mouse (streamzap): Applying InputClass "evdev keyboard catchall" [ 39.806] (**) MCE IR Keyboard/Mouse (streamzap): Applying InputClass "LocalKeyboard" [ 39.806] (II) Using input driver 'evdev' for 'MCE IR Keyboard/Mouse (streamzap)' [ 39.806] (**) MCE IR Keyboard/Mouse (streamzap): always reports core events [ 39.806] (**) evdev: MCE IR Keyboard/Mouse (streamzap): Device: "/dev/input/event17" [ 39.807] (--) evdev: MCE IR Keyboard/Mouse (streamzap): Vendor 0 Product 0 [ 39.807] (--) evdev: MCE IR Keyboard/Mouse (streamzap): Found 3 mouse buttons [ 39.807] (--) evdev: MCE IR Keyboard/Mouse (streamzap): Found relative axes [ 39.807] (--) evdev: MCE IR Keyboard/Mouse (streamzap): Found x and y relative axes [ 39.807] (--) evdev: MCE IR Keyboard/Mouse (streamzap): Found keys [ 39.807] (II) evdev: MCE IR Keyboard/Mouse (streamzap): Configuring as mouse [ 39.807] (II) evdev: MCE IR Keyboard/Mouse (streamzap): Configuring as keyboard [ 39.807] (**) evdev: MCE IR Keyboard/Mouse (streamzap): YAxisMapping: buttons 4 and 5 [ 39.807] (**) evdev: MCE IR Keyboard/Mouse (streamzap): EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200 [ 39.807] (II) XINPUT: Adding extended input device "MCE IR Keyboard/Mouse (streamzap)" (type: KEYBOARD, id 13) [ 39.807] (II) evdev: MCE IR Keyboard/Mouse (streamzap): initialized for relative axes. [ 39.807] (**) MCE IR Keyboard/Mouse (streamzap): (accel) keeping acceleration scheme 1 [ 39.807] (**) MCE IR Keyboard/Mouse (streamzap): (accel) acceleration profile 0 [ 39.807] (**) MCE IR Keyboard/Mouse (streamzap): (accel) acceleration factor: 2.000 [ 39.807] (**) MCE IR Keyboard/Mouse (streamzap): (accel) acceleration threshold: 4 [ 39.807] (II) config/udev: Adding input device MCE IR Keyboard/Mouse (streamzap) (/dev/input/mouse2) [ 39.807] (**) MCE IR Keyboard/Mouse (streamzap): Applying InputClass "LocalKeyboard" I.e., it's still "there" as a keyboard. How/where do I properly 'exclude' this Streamzap <--> Keyboard mapping? Is my config off, or is there a bug in the way? Thanks. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
simplifying ... I removed all lirc* pkgs, and all lirc/streamzap-related configs, rules, etc. The only pkg remaining is "liblirc_client0", required by my MPLayer install. rpm -e liblirc_client0-0.9.0-5.1.1.x86_64 error: Failed dependencies: liblirc_client.so.0()(64bit) is needed by (installed) MPlayer-1.1+35127-3.1.x86_64 I.e., there's NO config on my part ... what follows here appears to be built-in to OOTB Opensuse. Leaving the IR receiver plugged in, @ reboot, I see the device installed as per configs' returns below. With this setup, if I press the "Power" button on the Streamzap, it forces an immediate, complete system Power Off! Not the behavior I want at all! So, before introducing lircd and XBMC, I need to understand how to DISABLE this behavior as Keyboard/Mouse, and prevent any interaction with the system. Here's the after-boot auto-config, without any config of my own: lsmod | egrep -i "lirc|streamzap" ir_lirc_codec 13022 0 lirc_dev 19981 1 ir_lirc_codec rc_streamzap 12509 0 streamzap 13251 0 rc_core 31851 12 ir_lirc_codec,ir_mce_kbd_decoder,ir_sanyo_decoder,ir_sony_decoder,ir_jvc_decoder,ir_rc6_decoder,ir_rc5_decoder,ir_nec_decoder,ir_rc5_sz_decoder,rc_streamzap,streamzap lsusb | grep -i streamzap Bus 001 Device 004: ID 0e9c:0000 Streamzap, Inc. Streamzap Remote Control lsusb -v -s 001:004 Bus 001 Device 009: ID 0e9c:0000 Streamzap, Inc. Streamzap Remote Control Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x0e9c Streamzap, Inc. idProduct 0x0000 Streamzap Remote Control bcdDevice 1.00 iManufacturer 1 Streamzap, Inc. iProduct 2 Streamzap Remote Control iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 25 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 3 Receive Infrared bmAttributes 0x80 (Bus Powered) MaxPower 50mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 10 Device Status: 0x0000 (Bus Powered) hwinfo ... >> pci.1: sysfs drivers ----- sysfs driver list (id 0x8b56b235e4da9cb9) ----- ... streamzap: /devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3.1/1-3.1:1.0 streamzap: module = streamzap >> pci.2: get sysfs pci data ... streamzap: /devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3.1/1-3.1:1.0 streamzap: module = streamzap ... >> block.2: sysfs drivers ... streamzap: /devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3.1/1-3.1:1.0 streamzap: module = streamzap ... usb device: name = 1-3.1:1.0 path = /devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3.1/1-3.1:1.0 modalias = "usb:v0E9Cp0000d0100dc00dsc00dp00icFFiscFFipFFin00" bInterfaceNumber = 0 bInterfaceClass = 255 bInterfaceSubClass = 255 bInterfaceProtocol = 255 if: 1-3.1:1.0 @ /devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3.1 bDeviceClass = 0 bDeviceSubClass = 0 bDeviceProtocol = 0 idVendor = 0x0e9c idProduct = 0x0000 manufacturer = "Streamzap, Inc." product = "Streamzap Remote Control" bcdDevice = 0100 speed = "1.5" ... and grep stream /var/log/Xorg.0.log [ 42.748] (II) config/udev: Adding input device MCE IR Keyboard/Mouse (streamzap) (/dev/input/event9) [ 42.748] (**) MCE IR Keyboard/Mouse (streamzap): Applying InputClass "evdev pointer catchall" [ 42.748] (**) MCE IR Keyboard/Mouse (streamzap): Applying InputClass "evdev keyboard catchall" [ 42.748] (**) MCE IR Keyboard/Mouse (streamzap): Applying InputClass "evdev pointer catchall" [ 42.748] (**) MCE IR Keyboard/Mouse (streamzap): Applying InputClass "evdev keyboard catchall" [ 42.748] (**) MCE IR Keyboard/Mouse (streamzap): Applying InputClass "LocalKeyboard" [ 42.748] (II) Using input driver 'evdev' for 'MCE IR Keyboard/Mouse (streamzap)' [ 42.748] (**) MCE IR Keyboard/Mouse (streamzap): always reports core events [ 42.748] (**) evdev: MCE IR Keyboard/Mouse (streamzap): Device: "/dev/input/event9" [ 42.748] (--) evdev: MCE IR Keyboard/Mouse (streamzap): Vendor 0 Product 0 [ 42.748] (--) evdev: MCE IR Keyboard/Mouse (streamzap): Found 3 mouse buttons [ 42.748] (--) evdev: MCE IR Keyboard/Mouse (streamzap): Found relative axes [ 42.748] (--) evdev: MCE IR Keyboard/Mouse (streamzap): Found x and y relative axes [ 42.748] (--) evdev: MCE IR Keyboard/Mouse (streamzap): Found keys [ 42.748] (II) evdev: MCE IR Keyboard/Mouse (streamzap): Configuring as mouse [ 42.748] (II) evdev: MCE IR Keyboard/Mouse (streamzap): Configuring as keyboard [ 42.748] (**) evdev: MCE IR Keyboard/Mouse (streamzap): YAxisMapping: buttons 4 and 5 [ 42.748] (**) evdev: MCE IR Keyboard/Mouse (streamzap): EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200 [ 42.748] (II) XINPUT: Adding extended input device "MCE IR Keyboard/Mouse (streamzap)" (type: KEYBOARD, id 14) [ 42.748] (II) evdev: MCE IR Keyboard/Mouse (streamzap): initialized for relative axes. [ 42.748] (**) MCE IR Keyboard/Mouse (streamzap): (accel) keeping acceleration scheme 1 [ 42.748] (**) MCE IR Keyboard/Mouse (streamzap): (accel) acceleration profile 0 [ 42.748] (**) MCE IR Keyboard/Mouse (streamzap): (accel) acceleration factor: 2.000 [ 42.748] (**) MCE IR Keyboard/Mouse (streamzap): (accel) acceleration threshold: 4 [ 42.749] (II) config/udev: Adding input device MCE IR Keyboard/Mouse (streamzap) (/dev/input/mouse2) [ 42.749] (**) MCE IR Keyboard/Mouse (streamzap): Applying InputClass "LocalKeyboard" -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
В Sun, 08 Sep 2013 14:12:17 -0700 ar16 <ar16@imapmail.org> пишет:
I'm running Opensuse 12.3/64.
I'm installing a StreamzapIR LIRC remote for exclusive use with XBMC; I want it otherwise ignored by the system/KDE/etc.
Part of the process is, 1st, getting the remote prpoerly IGNORED as a "KEYBOARD" device.
Atm, I'm unsuccessfuly at excluding the StreamzapIR from being recognized as a KYBD dev either by:
xorg udev
My question is: How/where do I properly exclude the Streamzap <--> Keyboard mapping?
Here's what I have so far:
Following
http://wiki.xbmc.org/index.php?title=HOW-TO:Setup_Streamzap_PC_Remote_for_Li...
I add
cat /etc/X11/xorg.conf.d/90-streamzap.conf Section "InputClass" Identifier "Ignore Streamzap IR as KYBD" MatchProduct "Streamzap" MatchIsKeyboard "true" Option "Ignore" "true" EndSection
Did you try to use MatchProduct "MCE IR Keyboard/Mouse (streamzap)" as reported by Xorg?
[ 42.688] (II) config/udev: Adding input device MCE IR Keyboard/Mouse (streamzap) (/dev/input/event17)
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Did you try to use
MatchProduct "MCE IR Keyboard/Mouse (streamzap)"
as reported by Xorg?
[ 42.688] (II) config/udev: Adding input device MCE IR Keyboard/Mouse (streamzap) (/dev/input/event17)
Yep. According to http://www.x.org/archive/current/doc/man/man5/xorg.conf.5.xhtml#heading9 MatchProduct" matchproduct This entry can be used to checkif the substring "matchproduct" occurs inthe device’s product name. It should match on any substring match; unclear it it's case sensitive or not. I've tried MatchProduct "Streamzap" MatchProduct "streamzap" and MCE IR Keyboard/Mouse (streamzap) Same result in all cases; the device is still added as both MOUSE & KEYBOARD. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
After a bit of digging in/around kernel, noting, dmesg | grep -i stream ... [ 16.510240] IR RC5 (streamzap) protocol handler initialized ... it's the RC5 protocol that's the culprit. loaded by, ir-keytable Found /sys/class/rc/rc0/ (/dev/input/event8) with: Driver streamzap, table rc-streamzap Supported protocols: NEC RC-5 RC-6 JVC SONY SANYO LIRC RC-5-SZ other Enabled protocols: NEC RC-5 RC-6 JVC SONY SANYO LIRC RC-5-SZ other Repeat delay = 500 ms, repeat period = 125 ms a udev override does the trick, cat /etc/udev/rules.d/70-infrared.rules ACTION=="add", SUBSYSTEM=="rc", RUN+="/usr/bin/ir-keytable --clear" ACTION=="add", SUBSYSTEM=="rc", RUN+="/usr/bin/ir-keytable --protocol=LIRC" reboot ... ir-keytable Found /sys/class/rc/rc0/ (/dev/input/event11) with: Driver streamzap, table rc-streamzap Supported protocols: NEC RC-5 RC-6 JVC SONY SANYO LIRC RC-5-SZ other Enabled protocols: LIRC Repeat delay = 500 ms, repeat period = 125 ms There are prehaps other ways to achieve this, but, testing, there's no longer any capture/response -- namely system shutdown! -- on PowerOff button press. Good enough. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Andrey Borzenkov
-
ar16