Linux MCE remote (asrock) troubles: double clicks
#1
I am running XBMC 13.1, and yesterday i upgraded from Ubuntu 12.04 LTS --> 14.04. After doing so I have some problems with my remote that I have not been able to solve, even after three ours of nightly googling and frustration. The remote is an Asrock MCE remote, which came with my ION 330 BR. Here is a picture of them both for reference
Image

Under Ubuntu 12.04, the remote worked out of the box with no configuration. After the upgrade it is still recognized automatically, but it acts very weirdly. In XBMC i can navigate (e.g. left and right), but if I click left two-three times in semi-rapid succession it registers as like 10-15 clicks in under a second. If I try to adjust the volume, the volume indicator shows up, but the volume level barely change at all, even if I am repeatedly clicking or holding the volume down key. Moreover, some buttons do not work out of the box like before, including OK and BACK (but this problem I can fix by editing the key bindings, so I don't necessarily need help with that).

The ir receiver is built into my ION 330, and is an nuvoton-cir device. I am not using lirc (it is not even installed). The output of ir-keytable gives the following:
Code:
Found /sys/class/rc/rc0/ (/dev/input/event2) with:
    Driver nuvoton-cir, table rc-rc6-mce
    Supported protocols: NEC RC-5 RC-6 JVC SONY SANYO LIRC other
    Enabled protocols: RC-5 RC-6
    Name: Nuvoton w836x7hg Infrared Remote
    bus: 25, vendor/product: 1050:00b4, version: 0x0073
    Repeat delay = 500 ms, repeat period = 125 ms
Found /sys/class/rc/rc1/ (/dev/input/event11) with:
    Driver em28xx, table rc-hauppauge
    Supported protocols: NEC RC-5 RC-6
    Enabled protocols: RC-5
    Name: em28xx IR (em2884 #0)
    bus: 3, vendor/product: 2040:1605, version: 0x0001
    Repeat delay = 500 ms, repeat period = 125 ms
(The first device here is my IR receiver, the other is a TV card).

When testing it with ir-keytable -t i get the following when I click the up arrow on my remote once (using the RC-6 protocol only):
Code:
1408262331.725156: event type EV_MSC(0x04): scancode = 0x800f041e
1408262331.725156: event type EV_KEY(0x01) key_down: KEY_UP(0x0001)
1408262331.725156: event type EV_SYN(0x00).
1408262331.828661: event type EV_MSC(0x04): scancode = 0x800f041e
1408262331.828661: event type EV_SYN(0x00).
1408262331.955798: event type EV_MSC(0x04): scancode = 0x800f041e
1408262331.955798: event type EV_SYN(0x00).
1408262332.205120: event type EV_KEY(0x01) key_up: KEY_UP(0x0001)
1408262332.205120: event type EV_SYN(0x00).

As you can see, the key is registered as clicked at least twice. I guess this is the root of my problem. But what can I do about that? How do I fix it, or how can I troubleshoot further?[/php]
Reply
#2
Maybe the button release is not recognized. Remotes may send a toggle bit and in this case you need to define both codes in you mapping file. Here is a snipped of mine:

Code:
0x8034043d KEY_ESC
0x8034843d KEY_ESC
0x8034048e KEY_POWER
0x8034848e KEY_POWER
0x80340437 KEY_RECORD
0x80348437 KEY_RECORD
0x80340430 KEY_PAUSE
0x80348430 KEY_PAUSE
Reply
#3
Okey, but how do I figure out what the "second scancode"/"release scancode" is when my remote outputs only what I have posted above following a single click (two-three scancodes that are identical)?
Reply
#4
I checked my system and this is what I get when pressing the up key:

Code:
xbmc@ID67:~$ sudo ir-keytable -t
Testing events. Please, press CTRL-C to abort.
1408276155.770026: event type EV_MSC(0x04): scancode = 0x80340458
1408276155.770026: event type EV_KEY(0x01) key_down: KEY_UP(0x0001)
1408276155.770026: event type EV_SYN(0x00).
1408276155.907064: event type EV_MSC(0x04): scancode = 0x80340458
1408276155.907064: event type EV_SYN(0x00).
1408276156.156602: event type EV_KEY(0x01) key_up: KEY_UP(0x0001)
1408276156.156602: event type EV_SYN(0x00).

So not much different to what you see. The culprit can also be the SDL layer which handles keyboard input in XBMC 13.x. It repeats key presses after 10ms. You could try a nightly. Helix has removed SDL and you can control repeat rate at OS level.
Reply
#5
Okey. Still weird that it worked under Ubuntu 12.04 with Gotham, though. I will await the Helix final, and use the android remote until then and check if the upgrade solves my issue.

Any other suggestions as to what could be wrong? (Other than the SDL)
Reply
#6
No idea. It works here but I haven't used a version with SDL in 2 years. If it's not SDL and you wait until Helix final it may still be broken. If users are not willing to contribute things won't be fixed.
Reply

Logout Mark Read Team Forum Stats Members Help
MCE remote (asrock) troubles: double clicks0