[LINUX] Remote control buttons repeat too quickly
#1
XBMC version: 10.0
Distro: Arch (current as of 12/31/2010)
Architecture: x86_64
Install method: pacman (stable release from Arch's community repo)
LIRC version: 0.9.0.pre1
System: ASRock ion 330 (see here for specifications)
Remote: Hauppauge USB MCE remote clone (see here)

Up until last night, I had been running XBMC 10 on Ubuntu 10.04. Everything worked fine except for suspend, but I had been wanting to try out Arch on the media PC for a while, so last night I installed Arch and XBMC on it. Everything works fine again (even suspend - yay!) except for the remote. Whenever I push a button, XBMC registers two or three button presses. I have to press and release the button insanely fast in order to achieve a single button press.

It's been a few months since I last installed XBMC on this box (back when I installed it with Ubuntu 10.04), but I don't recall having to do anything special to get the remote to behave properly. I'm using LIRC's standard mceusb configuration file, and everything is pretty much a fresh install.

I tried creating an advancedsettings.xml file in XBMC's userdata directory with the following contents and restarting XBMC:
Code:
<advancedsettings>
    <remoterepeat>800</remoterepeat>
    <remotedelay>20</remotedelay>
</advancedsettings>
...but that didn't seem to have any effect at all. How can I make XBMC wait a little longer before triggering repeats?
Reply
#2
Hi!
Since kernel 2.6.36 the mce remote drivers is included in the kernel and by default it acts like keyboard. First remove lirc package its not needed anymore and keep lirc-utils package.
reboot and as root run this command: echo none +lirc > /sys/class/rc/rc0/protocols start xbmc and see if it works. That command will disable the in-kernel decoders and enable only the lirc bridge, in other words you get the old functionality back.
if it works copy that command to /etc/rc.local i found out that after couple of reboots rc.local misses to run this command maybe udev rules works better?
Another way of doing this is by running ir-keytable -p lirc the ir-keytable program is included in v4l-utils package.
Reply
#3
You, my friend, are a scholar and a gentleman. Works perfectly now! Smile

Thanks!
Reply
#4
Hey, decaturguy, I tried that but I get an error:

Code:
# echo none +lirc > /sys/class/rc/rc0/protocols
-bash: echo: write error: Invalid argument

My problem is, my MCEUSB remote reacts very slowly, or maybe it simple does not grab most keypresses. It works, but I must kept the keys pressed for a long time until the key is detected. Also, it does not always takes the same time, sometimes is faster, almost like normal behaviour, sometimes takes like 5 seconds pressing a key until it is detected.

I've removed lirc:
Code:
apt-get remove lirc
and my /sys/class/rc/rc0/protocols file contains:
Code:
# cat /sys/class/rc/rc0/protocols
[rc5] [nec] [rc6] [jvc] [sony] [lirc]


but everything is the same as when lirc was loaded.

Some more information:

Code:
# lsmod | grep ir
ir_lirc_codec           3092  0
lirc_dev                9393  1 ir_lirc_codec
ir_sony_decoder         1889  0
ir_jvc_decoder          1950  0
ir_rc6_decoder          2334  0
ir_rc5_decoder          1950  0
ir_nec_decoder          2014  0
ir_core                14654  9 ir_lirc_codec,ir_sony_decoder,ir_jvc_decoder,ir_rc6_decoder,ir_rc5_decoder,ir_nec_decoder,rc_rc6_mce,mceusb

Code:
# lsusb
Bus 004 Device 003: ID 045e:006d Microsoft Corp. eHome Remote Control Keyboard keys
Bus 004 Device 002: ID 045e:0284 Microsoft Corp. Xbox DVD Playback Kit
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 04fc:05d8 Sunplus Technology Co., Ltd Wireless keyboard/mouse
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Code:
# cat /proc/version
Linux version 2.6.35-24-generic (buildd@vernadsky) (gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5) ) #42-Ubuntu SMP Thu Dec 2 01:41:57 UTC 2010
Reply
#5
decaturguy Wrote:Hi!
Since kernel 2.6.36 the mce remote drivers is included in the kernel and by default it acts like keyboard. First remove lirc package its not needed anymore and keep lirc-utils package.
reboot and as root run this command: echo none +lirc > /sys/class/rc/rc0/protocols start xbmc and see if it works. That command will disable the in-kernel decoders and enable only the lirc bridge, in other words you get the old functionality back.
if it works copy that command to /etc/rc.local i found out that after couple of reboots rc.local misses to run this command maybe udev rules works better?
Another way of doing this is by running ir-keytable -p lirc the ir-keytable program is included in v4l-utils package.


Can you break this down into a step by step guide for a complete linux newb.
I'm having the same problem with my remote here but had no luck with the echo none line. Just didn't seem to do anything. I assume i did something wrong though.

thanks
Reply
#6
Are sure you're on kernel version 2.6.36? (Use uname -r to print your kernel version if you don't know.) If you're using a prior kernel version, then you're probably experiencing a different problem. The only reason I ask is because I'm pretty sure most of the newb-friendly distros are not using 2.6.36 yet. (If you're a Linux newb and you're using Arch, you should probably be looking for a different distro. :p)

Anyway, if you're sure you're on 2.6.36, are you running as root when you do the echo command? Just using sudo echo none +lirc > /sys/class/rc/rc0/protocols will not work because the echo command will run as root, but the file gets opened as the current user (who won't have write access to the file). If you're not in a root shell and you're using sudo, try:
Code:
sudo sh -c "echo none +lirc > /sys/class/rc/rc0/protocols"
Reply
#7
Yea I'm actually on 2.6.37-12 or whatever. Using xbmcfreak's latest live. Anyways your trick worked perfect. Thanks.
-Mike
Reply
#8
I'm also on 2.6.37-12 and cant seem to get this command to resume on reboot;

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

It works everytime I input the command but its not very convenient!

I'm a linux newb so if anyone can help resolve this issue it would be much appreciated....
Reply
#9
Did you add it to /etc/rc.local?
Reply
#10
Yep thats the bit I cant seem to get to work...

Input the command in puTTy;

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

Everything works fine - add the same command into rc.local after [# By default this script does nothing.] and before [exit 0].

But on reboot it goes back to remote double clicks?

Does it matter what order command lines are added to rc.local? I have a few other commands in there as well?
Reply
#11
One thing in the process Im not sure about is removing LIRC completely and keeping the utils package? Ive not been doing this so far?

Maybe that is my undoing..In simple terms, how to I correctly uninstall the required Lirc compoents?

Last time I did that I could move things on the screen couldnt select anything i.e. play, enter buttons wouldnt work...
Reply
#12
Hmm. What does your /etc/rc.local look like?
Reply
#13
Similar problem as in the initial post.
I have ion330, xbmc-10.0-live installed, and medion x10 rf usb remote.
Kernel in the live10 is 2.6.32-26-generic, so lirc is used.

Every key press produces the same action twice in xbmc.
The irw gives for example (the 'up' was pressed once and released):
-----------------
00000014ef1a0000 00 up medion
00000014ef1a0000 01 up medion
00000014ef1a0000 02 up medion
00000014ef1a0000 03 up medion
00000014ef1a0000 04 up medion
-----------------
This is stable, always 5 lines are produced for the key press.

The advancedsettings.xml consists of the following:
-----------------
<advancedsettings>
<remoterepeat>1500</remoterepeat>
</advancedsettings>
-----------------

This is reported as loaded but seems to be ignored completely. In the log the key is noticed twice:
-----------------
00:07:16 T:3054372736 M:1707487232 DEBUG: LIRC: Update - NEW at 1700239:00000014ef1a0000 00 up medion (up)
00:07:16 T:3054372736 M:1707487232 DEBUG: OnKey: 166 pressed, action is Up
00:07:16 T:2883787632 M:1707487232 DEBUG: thread start, auto delete: 1
00:07:16 T:2883787632 M:1707487232 DEBUG: Loading: /usr/lib/xbmc/system/ImageLib-i486-linux.so
00:07:16 T:3054372736 M:1706217472 DEBUG: OnKey: 166 pressed, action is Up
00:07:16 T:2894277488 M:1706090496 DEBUG: thread start, auto delete: 1
-----------------

Also pressing the key and holding for about 1 second (so less than the <remoterepeat>) makes the menu selection simply goes through the options one by one until key is released.

Is the <remoterepeat> really ignored? Any hints?
Reply
#14
Try with
Code:
<remotedelay>5</remotedelay>
in your advancedsettings.xml
Reply
#15
I can tune the behaviour using <remotedelay>.
Thanks.
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX] Remote control buttons repeat too quickly0