All of lore.kernel.org
 help / color / mirror / Atom feed
* How to correctly disable LIRC-related MCE*/IR_* modules, to remove ID of RemoteControl as BOTH keyboard & remote?
@ 2013-11-13 16:31 randmedia
       [not found] ` <5283AE49.6030302@xs4all.nl>
  0 siblings, 1 reply; 3+ messages in thread
From: randmedia @ 2013-11-13 16:31 UTC (permalink / raw)
  To: linux-kernel

Hello,

I'm working on setup of an IR RemoteControl.  Specifically, a
'Streamzap' IR remote, with its included USB-connected IR receiver.

I'm configuring it as a LIRC remote _only_, in a specific app (XBMC,
fwiw), and NOT as a keyboard/remote in/for any other app.

I've been unable to manage disabling conflicts between the
assignment/registration of the IR Remote as BOTH a keyboard & a remote. 
I'd like to learn how to effectively DISable the interfering modules;
without necessarily having to recompille the kernel.

Here's what I'm seeing.

On Linux kernel -- whether

	uname -a
		Linux rpi.loc 3.10.18 #2 PREEMPT Tue Nov 12 16:04:38 UTC
		2013 armv6l GNU/Linux

@ an arm-based RaspberryPi, or

	uname -a
		Linux desk.loc 3.7.10-1.16-desktop #1 SMP PREEMPT Fri
		May 31 20:21:23 UTC 2013 (97c14ba) x86_64 x86_64 x86_64
		GNU/Linux

@ an x86_64 desktop, I find @ boot that the attached device is
recognized & registered as an MCE device (here, e.g., @ Rpi),

	dmesg | egrep -i "stream|lirc"
		[    4.537755] usb 1-3.1: Product: Streamzap Remote
		Control
		[    4.537756] usb 1-3.1: Manufacturer: Streamzap, Inc.
		[   17.122902] Registered IR keymap rc-streamzap
		[   17.134146] 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
		[   17.134244] 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
		[   17.134315] streamzap 1-3.1:1.0: Registered
		Streamzap, Inc. Streamzap Remote Control on usb1:4
		[   17.219672] IR RC5 (streamzap) protocol handler
		initialized
		[   17.290559] usbcore: registered new interface driver
		streamzap
>>>		[   17.417754] input: MCE IR Keyboard/Mouse (streamzap) as /devices/virtual/input/input9
		[   17.469336] lirc_dev: IR Remote Control driver
		registered, major 249
		[   17.486010] rc rc0: lirc_dev: driver ir-lirc-codec
		(streamzap) registered at minor = 0
		[   17.507386] IR LIRC bridge handler initialized

which is not what I want.

To prevent that, I've tried to blacklist MCE* and IR_RC5* drivers in
/etc/modprobe.d/{blacklist,MODULE}.conf, to no effect.  The
registration, and the load of associated modules, still occurs, as seen
in dmesg.

This has the result that I've been experiencing conflicts between
keypresses being recognized as MCE 'keyboard' presses and LIRC 'remote'
keypresses.

Where there's an X server in use, reading

	http://wiki.xbmc.org/index.php?title=How-to:Setup_Streamzap_PC_Remote_for_Linux#Xinput:_Preventing_Streamzap_from_becoming_a_keyboard

and editing

	cat /etc/X11/xorg.conf.d/05-streamzap.conf
		Section "InputClass"
		    Identifier "Ignore Streamzap IR as KEYBOARD or
		    MOUSE"
		     MatchIsKeyboard "on"
		    MatchProduct "treamzap|MCE IR"
		    Option "Ignore" "true"
		EndSection

manages to prevent the MCE-related conflict.  However, where there's NO
X env, e.g. on the RPi, I lose that option.

Working on the RPi, I finally got this under control by recompiling its
kernel, setting the kernel config specifically to DISable the unwanted
MCE* and IR_* modules,

	CONFIG_LIRC=m
	CONFIG_IR_LIRC_CODEC=m
	CONFIG_IR_STREAMZAP=m
	CONFIG_IR_MCE_KBD_DECODER=n
	CONFIG_IR_MCEUSB=n
	CONFIG_LIRC_STAGING=n
	CONFIG_IR_JVC_DECODER=n
	CONFIG_IR_NEC_DECODER=n
	CONFIG_IR_RC5_DECODER=n
	CONFIG_IR_RC5_SZ_DECODER=n
	CONFIG_IR_RC6_DECODER=n
	CONFIG_IR_SANYO_DECODER=n
	CONFIG_IR_SONY_DECODER=n
	CONFIG_LIRC_IGORPLUGUSB=n
	CONFIG_LIRC_IMON=n
	CONFIG_LIRC_RPI=n
	CONFIG_LIRC_XBOX=n
	CONFIG_LIRC_SASEM=n
	CONFIG_LIRC_SERIAL=n
	CONFIG_LIRC_SERIAL_TRANSMITTER=n
	CONFIG_LIRC_SIR=n
	CONFIG_LIRC_ZILOG=n

Now, @ Rpi, I've simply

	lsmod | egrep -i "sz|streamzap|lirc"
		ir_lirc_codec           3100  3 
		lirc_dev                7036  1 ir_lirc_codec
		rc_streamzap             668  0 
		streamzap               3425  0 
		rc_core                11688  4
		streamzap,ir_lirc_codec,rc_streamzap

and setup of standalone LIRC-daemon connection/use of the remote is as
expected -- remote-only, and no interruptions/intererference by
'keyboard' assignments, in-/out-side of the current target app, XBMC.

So, I have a workaround that meets my need.  Atm, it appears to require
the seemingly heavy-handed recompile of the kernel, cleaned of the
unwanted Media modules.

I'd prefer to avoid the hassle, and use standard distro kernel, but
manage to effectively disable the unwanted/interfering modules.

What's the correct/effective method to turn off specifically the
unwanted MCE*/IR_* interference, whether disable the modules, or other
method?

rand

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to correctly disable LIRC-related MCE*/IR_* modules, to remove ID of RemoteControl as BOTH keyboard & remote?
       [not found] ` <5283AE49.6030302@xs4all.nl>
@ 2013-11-13 17:12   ` randmedia
  2013-11-15  3:44     ` randmedia
  0 siblings, 1 reply; 3+ messages in thread
From: randmedia @ 2013-11-13 17:12 UTC (permalink / raw)
  To: Jim Bos; +Cc: linux-kernel

Hi Jim,

On Wed, Nov 13, 2013, at 08:52 AM, Jim Bos wrote:
> Have you looked at this sysfs-file, specifically tried this:
> 
> echo lirc > /sys/class/rc/rc0/protocols

In short, yes.

atm, I've this udev rule,

	cat /etc/udev/rules.d/70-infrared.rules
		ACTION=="add", SUBSYSTEM=="rc",
		RUN+="/usr/bin/ir-keytable --clear --protocol=LIRC
		--write=/etc/rc_keymaps/my_streamzap_rpi"

which ensures after boot

	ir-keytable
	Found /sys/class/rc/rc0/ (/dev/input/event2) with:
	        Driver streamzap, table rc-streamzap
	        Supported protocols: LIRC 
	        Enabled protocols: LIRC 
	        Repeat delay = 500 ms, repeat period = 125 ms

which correlates to

	cat  /sys/class/rc/rc0/protocols 
		[lirc]

i.e., the same effect as the manual intervetion of

	echo lirc > /sys/class/rc/rc0/protocols

nonetheless, that _alone_, does NOT 'do the trick'.  if those MCE*
kernel mods are around, i.e., if I have NOT disabled them in the kernel
(re)compile, or, similarly, use the distro-provided kernel which
compiles the mods by default, then -- at boot -- the Streamzap is
recognized/assigned as an MCE keyboard/remote.

rand

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to correctly disable LIRC-related MCE*/IR_* modules, to remove ID of RemoteControl as BOTH keyboard & remote?
  2013-11-13 17:12   ` randmedia
@ 2013-11-15  3:44     ` randmedia
  0 siblings, 0 replies; 3+ messages in thread
From: randmedia @ 2013-11-15  3:44 UTC (permalink / raw)
  To: linux-kernel

Hi all,

Bump, please.  Or a pointer to the appropriate list would be helpful.
I'm clearly getting lost amidst the patch traffic and deluge of spam, so
suspect I may be in the wrong place ...

Thanks.


On Wed, Nov 13, 2013, at 09:12 AM, randmedia@123mail.org wrote:
> Hi Jim,
> 
> On Wed, Nov 13, 2013, at 08:52 AM, Jim Bos wrote:
> > Have you looked at this sysfs-file, specifically tried this:
> > 
> > echo lirc > /sys/class/rc/rc0/protocols
> 
> In short, yes.
> 
> atm, I've this udev rule,
> 
> 	cat /etc/udev/rules.d/70-infrared.rules
> 		ACTION=="add", SUBSYSTEM=="rc",
> 		RUN+="/usr/bin/ir-keytable --clear --protocol=LIRC
> 		--write=/etc/rc_keymaps/my_streamzap_rpi"
> 
> which ensures after boot
> 
> 	ir-keytable
> 	Found /sys/class/rc/rc0/ (/dev/input/event2) with:
> 	        Driver streamzap, table rc-streamzap
> 	        Supported protocols: LIRC 
> 	        Enabled protocols: LIRC 
> 	        Repeat delay = 500 ms, repeat period = 125 ms
> 
> which correlates to
> 
> 	cat  /sys/class/rc/rc0/protocols 
> 		[lirc]
> 
> i.e., the same effect as the manual intervetion of
> 
> 	echo lirc > /sys/class/rc/rc0/protocols
> 
> nonetheless, that _alone_, does NOT 'do the trick'.  if those MCE*
> kernel mods are around, i.e., if I have NOT disabled them in the kernel
> (re)compile, or, similarly, use the distro-provided kernel which
> compiles the mods by default, then -- at boot -- the Streamzap is
> recognized/assigned as an MCE keyboard/remote.
> 
> rand
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-11-15  3:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-13 16:31 How to correctly disable LIRC-related MCE*/IR_* modules, to remove ID of RemoteControl as BOTH keyboard & remote? randmedia
     [not found] ` <5283AE49.6030302@xs4all.nl>
2013-11-13 17:12   ` randmedia
2013-11-15  3:44     ` randmedia

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.