Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ir-keytable, wrong table loaded (by udev?)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Matthijs70
n00b
n00b


Joined: 01 Oct 2006
Posts: 43
Location: the Netherlands

PostPosted: Fri Mar 09, 2012 9:14 pm    Post subject: ir-keytable, wrong table loaded (by udev?) Reply with quote

Hi there .... hope somebody can point me in the right direction

I try to figure out how to change the table for ir-keytable...

What I mean is I created a new table called /etc/rc_keymaps/hauppauge-pvr150

I modified /etc/rc_maps.cfg for the rc-hauppauge to use this new table:
Code:
*       rc-hauppauge             hauppauge-pvr150


By the kernel (3.2.1) the IR device is detected as rc-hauppauge

I know there is a udev rule to load these (/lib/udev/rules.d/70-infrared.rules):
Code:
ACTION=="add", SUBSYSTEM=="rc", RUN+="/usr/bin/ir-keytable -a /etc/rc_maps.cfg -s $name"


However if I reboot it comes with the wrong key-codes.
When I manually do "ir-keytable -a /etc/rc_maps.cfg" I got the correct key-codes.

So why does this happen and what should I do to correct this?

To me it proves the /etc/rc_maps.cfg is setup correctly, but why is it not loaded after reboot?
And from where does ir-keytable get the WRONG key-codes?
I also renamed the hauppauge file in /etc/rc_keymaps, but no cure either.

Code:

# ir-keytable -r
...
scancode 0x1e25 = KEY_OK (0x160)
...
# ir-keytable -a /etc/rc_maps.cfg
Old keytable cleared
Wrote 136 keycode(s) to driver
Protocols changed to RC-5
# ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event4) with:
        Driver ir-kbd-i2c, table rc-hauppauge
        Supported protocols: RC-5
        Enabled protocols: RC-5
        Repeat delay = 500 ms, repeat period = 125 ms
# ir-keytable -r
...
scancode 0x1e25 = KEY_ENTER (0x1c)
...


Hope somebody can make so sense to this ...

Thanks,
Matthijs
Back to top
View user's profile Send private message
BT
Guru
Guru


Joined: 13 Jun 2004
Posts: 317

PostPosted: Fri Apr 27, 2012 1:58 am    Post subject: Reply with quote

Do you have CONFIG_RC_MAP enabled in the kernel? If you're loading rc tables in userspace via ir-keymaps then you need to disable this option. This would explain why the incorrect rc table is loaded at boot. I'm guessing it's the kernel rc-hauppauge table.

I also have the issue of the udev rule not appearing to trigger. I can only load the rc table manually with "ir-keytable -w /etc/rc_keymaps/rc6_mce" as "ir-keytable -a /etc/rc_maps.cfg" doesn't work. This probably explains why the udev rule isn't working. Furthermore ir-keytable only shows "table rc-empty" instead of "table rc-rc6-mce".


Last edited by BT on Fri Apr 27, 2012 8:29 am; edited 3 times in total
Back to top
View user's profile Send private message
BT
Guru
Guru


Joined: 13 Jun 2004
Posts: 317

PostPosted: Fri Apr 27, 2012 4:26 am    Post subject: Reply with quote

I think I may have solved this. If I enable CONFIG_RC_MAP I now get the kernel rc table loaded and ir-keytable correctly shows "table rc-rc6-mce". The kernel rc table isn't really useful since many buttons generate codes higher than 255 which X doesn't recognize. Instead of using udev to load the table, I manually load the userspace rc table by placing the following in "/etc/local.d/local.start". Just make sure it's executable.
Code:
#!/bin/sh

/usr/bin/ir-keytable -a /etc/rc_maps.cfg

I would still prefer to use udev and have CONFIG_RC_MAP disabled but I'm yet to figure out why the udev rule doesn't appear to trigger.
Back to top
View user's profile Send private message
BT
Guru
Guru


Joined: 13 Jun 2004
Posts: 317

PostPosted: Fri Apr 27, 2012 5:32 am    Post subject: Reply with quote

I have it working without CONFIG_RC_MAP. I just changed the local.start script to the following:
Code:
#!/bin/sh

/usr/bin/ir-keytable -c -w /etc/rc_keymaps/rc6_mce
Back to top
View user's profile Send private message
Matthijs70
n00b
n00b


Joined: 01 Oct 2006
Posts: 43
Location: the Netherlands

PostPosted: Fri Apr 27, 2012 3:03 pm    Post subject: Reply with quote

Thanks for your replies, will check this weekend :-)

Update:

CONFIG_RC_MAP was set, but I tried without it but still the same issue.
However I think you are right about RC table loader from kernel instead of udev.

BTW ... I am using openrc, so I added this lines at /etc/local.d/ir-keytable.start instead:
Code:

ir-keytable -a /etc/rc_maps.cfg


This works perfect for me. :-)
Back to top
View user's profile Send private message
BT
Guru
Guru


Joined: 13 Jun 2004
Posts: 317

PostPosted: Sun Apr 29, 2012 9:44 am    Post subject: Reply with quote

Good to know you got it working. :)

Do you have any problems with the repeat delay/rate of button presses with your remote? I've tried adjusting it via ir-keytable but it doesn't make any difference what values I use.
Back to top
View user's profile Send private message
Matthijs70
n00b
n00b


Joined: 01 Oct 2006
Posts: 43
Location: the Netherlands

PostPosted: Sun Apr 29, 2012 2:48 pm    Post subject: Reply with quote

I have no problems with repeat/delay of the buttons when pressed. But as I said, I hot the Hauppauge PVR-150.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum