[mythtv-users] iMON & ir-keytable on Fedora 15

Erik Sejr esejr at wildroseinternet.ca
Sat May 28 01:27:55 UTC 2011


On 5/27/2011 2:53 AM, Douglas Clowes wrote:
> On 2011-05-27 18:11, Erik Sejr wrote:
>> Hello list,
>> I've got an Antec case with a Soundgraph (iMon) LCD&  IR receiver. I
>> recently upgraded from Fedora 13 to Fedora 15, and I read over some of
>> Jarods changes in the imon module (particularly the removal of the
>> ir_protocol option). I was using this option to set the device to MCE
>> mode (ir_protocol = 1) in Fedora 13 and running lircd using the devinput
>> driver.
>>
>> I have been attempting to get the device back in RC-6 mode with no
>> success so far. ir-keytable sees the device:
>>
>> Found /sys/class/rc/rc3/ (/dev/input/event7) with:
>>          Driver imon, table rc-imon-pad
>>          Supported protocols: RC-6
>>          Enabled protocols:
>>          Repeat delay = 500 ms, repeat period = 33 ms
>>
>> And I can read the existing table:
>>
>> # ir-keytable -d /dev/input/event7 -s /sys/class/rc/rc3 -r
>> scancode 0x100007f = KEY_RIGHT (0x6a)
>> scancode 0x1000080 = KEY_LEFT (0x69)
>> scancode 0x1007f00 = KEY_DOWN (0x6c)
>> scancode 0x1008000 = KEY_UP (0x67)
>> scancode 0x200001e = KEY_NUMERIC_1 (0x201)
>> scancode 0x200001f = KEY_NUMERIC_2 (0x202)
>> scancode 0x2000020 = KEY_NUMERIC_3 (0x203)
>> scancode 0x2000021 = KEY_NUMERIC_4 (0x204)
>> scancode 0x2000022 = KEY_NUMERIC_5 (0x205)
>> scancode 0x2000023 = KEY_NUMERIC_6 (0x206)
>> scancode 0x2000024 = KEY_NUMERIC_7 (0x207)
>> scancode 0x2000025 = KEY_NUMERIC_8 (0x208)
>> scancode 0x2000026 = KEY_NUMERIC_9 (0x209)
>> scancode 0x2000027 = KEY_NUMERIC_0 (0x200)
>> scancode 0x2000028 = KEY_ENTER (0x1c)
>> scancode 0x2000029 = KEY_ESC (0x01)
>> scancode 0x200002a = KEY_BACKSPACE (0x0e)
>> scancode 0x200002c = KEY_SPACE (0x39)
>> scancode 0x2200020 = KEY_NUMERIC_POUND (0x20b)
>> scancode 0x2200025 = KEY_NUMERIC_STAR (0x20a)
>> scancode 0x288195b7 = KEY_EXIT (0xae)
>> scancode 0x288515b7 = KEY_BOOKMARKS (0x9c)
>> scancode 0x288795b7 = KEY_CHANNELDOWN (0x193)
>> scancode 0x289395b7 = KEY_CHANNELUP (0x192)
>> scancode 0x289515b7 = KEY_DOWN (0x6c)
>> scancode 0x28a115b7 = KEY_BACKSPACE (0x0e)
>> scancode 0x28a195b7 = KEY_ENTER (0x1c)
>> scancode 0x28a395b7 = KEY_VOLUMEUP (0x73)
>> scancode 0x28a515b7 = KEY_TV (0x179)
>> scancode 0x28a595b7 = KEY_VOLUMEDOWN (0x72)
>> scancode 0x28b195b7 = KEY_NUMERIC_3 (0x203)
>> scancode 0x28b515b7 = KEY_NUMERIC_STAR (0x20a)
>> scancode 0x28b595b7 = KEY_NUMERIC_1 (0x201)
>> scancode 0x298115b7 = KEY_RECORD (0xa7)
>> scancode 0x298195b7 = KEY_NEXT (0x197)
>> scancode 0x298315b7 = KEY_REWIND (0xa8)
>> scancode 0x298595b7 = KEY_SUBTITLE (0x172)
>> scancode 0x299115b7 = KEY_KEYBOARD (0x176)
>> scancode 0x299135b7 = KEY_KEYBOARD (0x176)
>> scancode 0x299195b7 = KEY_AUDIO (0x188)
>> scancode 0x299595b7 = KEY_NUMERIC_5 (0x205)
>> scancode 0x29a115b7 = KEY_NUMERIC_POUND (0x20b)
>> scancode 0x29a295b7 = KEY_DVD (0x185)
>> scancode 0x29a395b7 = KEY_DVD (0x185)
>> scancode 0x29a515b7 = KEY_LEFT (0x69)
>> scancode 0x29a595b7 = KEY_ZOOM (0x174)
>> scancode 0x2a8115b7 = KEY_PLAY (0xcf)
>> scancode 0x2a8195b7 = KEY_REWIND (0xa8)
>> scancode 0x2a8315b7 = KEY_PLAY (0xcf)
>> scancode 0x2a8515b7 = KEY_NUMERIC_8 (0x208)
>> scancode 0x2a8595b7 = KEY_NUMERIC_4 (0x204)
>> scancode 0x2a9115b7 = KEY_PAUSE (0x77)
>> scancode 0x2a9315b7 = KEY_SPACE (0x39)
>> scancode 0x2aa115b7 = KEY_NUMERIC_9 (0x209)
>> scancode 0x2aa395b7 = KEY_SCREEN (0x177)
>> scancode 0x2aa515b7 = KEY_UP (0x67)
>> scancode 0x2aa595b7 = KEY_NUMERIC_6 (0x206)
>> scancode 0x2ab715b7 = KEY_MEDIA (0xe2)
>> scancode 0x2b8115b7 = KEY_FASTFORWARD (0xd0)
>> scancode 0x2b8315b7 = KEY_FASTFORWARD (0xd0)
>> scancode 0x2b8515b7 = KEY_VIDEO (0x189)
>> scancode 0x2b8595b7 = KEY_LANGUAGE (0x170)
>> scancode 0x2b9115b7 = KEY_PREVIOUS (0x19c)
>> scancode 0x2b9395b7 = KEY_NUMERIC_7 (0x207)
>> scancode 0x2b9595b7 = KEY_MUTE (0x71)
>> scancode 0x2b9715b7 = KEY_STOP (0x80)
>> scancode 0x2ba115b7 = KEY_CAMERA (0xd4)
>> scancode 0x2ba385b7 = KEY_MENU (0x8b)
>> scancode 0x2ba395b7 = KEY_MENU (0x8b)
>> scancode 0x2ba515b7 = KEY_RIGHT (0x6a)
>> scancode 0x2ba595b7 = KEY_NUMERIC_0 (0x200)
>> scancode 0x2bb195b7 = KEY_NUMERIC_2 (0x202)
>> scancode 0x2bb715b7 = KEY_ESC (0x01)
>> Enabled protocols: JVC SONY LIRC
>>
>> But I tried to change the protocol and ir-keytable just seg faults:
>>
>> # ir-keytable -d /dev/input/event7 -s /sys/class/rc/rc3 -p rc6
>> Segmentation fault (core dumped)
>>
>> Under the debugger it looks like this (not sure how helpful it is)
>>
>> GNU gdb (GDB) Fedora (7.2.90.20110429-36.fc15)
>> Reading symbols from /usr/bin/ir-keytable...Reading symbols from
>> /usr/lib/debug/usr/bin/ir-keytable.debug...done.
>> done.
>> (gdb) run -d /dev/input/event7 -s /sys/class/rc/rc3 -p rc6
>> Starting program: /usr/bin/ir-keytable -d /dev/input/event7 -s
>> /sys/class/rc/rc3 -p rc6
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> __strcpy_chk () at ../sysdeps/x86_64/strcpy_chk.S:71
>> 71              movq    (%rsi), %rax    /* Read double word (8
>> bytes).  */
>> (gdb) bt
>> #0  __strcpy_chk () at ../sysdeps/x86_64/strcpy_chk.S:71
>> #1  0x000000000040275f in strcpy (__src=<optimized out>,
>> __dest=0x7fffffffd480 "") at /usr/include/bits/string3.h:105
>> #2  v1_set_hw_protocols (rc_dev=0x7fffffffe4b0) at keytable.c:742
>> #3  0x0000000000401795 in set_proto (rc_dev=0x7fffffffe4b0) at
>> keytable.c:1117
>> #4  main (argc=<optimized out>, argv=<optimized out>) at keytable.c:1495
>>
>> I was able to write the rc6_mce table to the device (but ir-keytable
>> still seg faults at the end). I also cannot perform a test (-t) for the
>> same reason.
>>
>> Has anyone been able to get imon working under Fedora 15?
>>
>> Thanks,
>> Erik
>>
>>
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users at mythtv.org
>> http://www.mythtv.org/mailman/listinfo/mythtv-users
> try
> ir-keytable -s rc0 -c -w /etc/rc_keymaps/rc6_mce -p rc6
>
> where rc0 is the rcX from
>
> /sys/class/rc/rc3
>
> /sys/class/rc/rc3
>
> Cheers,
>
> Douglas
Douglas/Rob,
Thanks for the responses. I read over your post Rob, and that seems to
cover very well what needs to be done to set it up, and it matches up
quite well to what i'm doing.

When I run ir-keytable like that Rob, it appears to work and it does not
segfault. I ran it in test mode right after 'ir-keytable -s rc0 -t' and
tried a few buttons on the remote. Nothing.

I was reading another post in which Jarod included the option for the
module to enable debug mode. I added this to my config and rebooted the
machine (just in case). I re-ran ir-keytable -s rc0 -c -w
/etc/rc_keymaps/rc6_mce -p rc6 and this time it hung trying to switch
the protocol (it did indicate it cleared and wrote the table). I killed
it with CTRL+C, then checked dmesg for debug output from imon and found
this:

[  239.450438] imon:send_packet: error submitting urb(-22)
[  239.455427] imon:lcd_write: send packet failed!
[  294.911327] ------------[ cut here ]------------
[  294.911335] WARNING: at lib/list_debug.c:53 __list_del_entry+0x8d/0x98()
[  294.911337] Hardware name: EX58-UD5
[  294.911339] list_del corruption. prev->next should be
ffff88003795dd28, but was ffff88019e9098d8
[  294.911341] Modules linked in: uinput fuse ipt_MASQUERADE iptable_nat
nf_nat xt_recent nfs lockd fscache nfs_acl auth_rpcgss sunrpc
cpufreq_ondemand acpi_cpufreq freq_table mperf xfs exportfs
snd_hda_codec_hdmi nvidia(P) rc_imon_pad ir_sony_decoder hdpvr
ir_jvc_decoder ir_rc6_decoder v4l2_common ir_rc5_decoder videodev imon
ir_nec_decoder v4l2_compat_ioctl32 rc_core joydev snd_hda_intel
snd_hda_codec snd_hwdep snd_seq snd_seq_device snd_pcm microcode
serio_raw iTCO_wdt r8169 i7core_edac iTCO_vendor_support i2c_i801
snd_timer snd i2c_core mii edac_core soundcore snd_page_alloc wmi ipv6
firewire_ohci ata_generic firewire_core pata_acpi uas usb_storage
crc_itu_t pata_jmicron [last unloaded: lirc_dev]
[  294.911375] Pid: 13673, comm: ir-keytable Tainted: P           
2.6.38.6-27.fc15.x86_64 #1
[  294.911377] Call Trace:
[  294.911382]  [<ffffffff8105510e>] warn_slowpath_common+0x83/0x9b
[  294.911384]  [<ffffffff810551c9>] warn_slowpath_fmt+0x46/0x48
[  294.911387]  [<ffffffff812377ed>] __list_del_entry+0x8d/0x98
[  294.911389]  [<ffffffff81237806>] list_del+0xe/0x2d
[  294.911394]  [<ffffffff814743b7>] wait_for_common+0xd3/0x101
[  294.911398]  [<ffffffff8104df76>] ? default_wake_function+0x0/0x14
[  294.911400]  [<ffffffff81474458>]
wait_for_completion_interruptible+0x1d/0x2c
[  294.911405]  [<ffffffffa0cf723d>] send_packet+0x1e3/0x270 [imon]
[  294.911408]  [<ffffffffa0cf74b8>] imon_ir_change_protocol+0x138/0x181
[imon]
[  294.911412]  [<ffffffffa0cbe304>] store_protocols+0x199/0x26e [rc_core]
[  294.911416]  [<ffffffff812e2958>] dev_attr_store+0x20/0x22
[  294.911420]  [<ffffffff811793d1>] sysfs_write_file+0x111/0x14d
[  294.911425]  [<ffffffff81121829>] vfs_write+0xac/0xf3
[  294.911427]  [<ffffffff81121a18>] sys_write+0x4a/0x6e
[  294.911430]  [<ffffffff81009bc2>] system_call_fastpath+0x16/0x1b
[  294.911432] ---[ end trace b9578ab86a371b80 ]---
[  294.911433] imon:send_packet: task interrupted

So I re-ran it (exactly the same command line) and this time, no hang
and no backtrace in dmesg.  I did notice that every time I unload, and
reload the module the imon:send_packet: error submitting urb(-22)
message appears in dmesg.

Trying the remote again it appears the signals are being decoded:

[  766.129258] intf0 decoded packet: 02 00 00 4f 00 00 00 00
[  766.225164] intf0 decoded packet: 02 00 00 00 00 00 00 00

and, looking at the mce keymap table the code is correct based on the
button I pressed, but it appears nothing is ever passed out the event
device in /dev. I've tried to hexdump it and I see nothing at on the
kernel interface device.

lrwxrwxrwx 1 root root 9 May 27 18:31 usb-15c2_0038-event-if00 -> ../event7
Bus 006 Device 002: ID 15c2:0038 SoundGraph Inc. GD01 MX VFD Display/IR
Receiver

I'm guessing this may be a bug in iMon, as it was working OK back with
F13 and an earlier version of the module. Is there a place I can send
Jarod a bug report on imon?

Thanks,
Erik


More information about the mythtv-users mailing list