Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: Trouble with MCE remote in 14.04

  1. #1
    Join Date
    May 2014
    Beans
    7

    Trouble with MCE remote in 14.04

    Hi all

    Few days ago I installed Mythbuntu 14.04 to a new box. Everything went well enough (relatively speaking) and I got important things working. The remote worked out of the box right after the install. Today, I moved the system to my "AV rack" and while doing that, forgot to connect the Windows Media Center USB remote. After some head scratching I noticed my mistake, but for some reason couldn't get remote to work again.

    In fact, I can't get any input from the remote. Not with irw, mode2 or ir-keytable. Everything seems to be fine, but there's just no input. Just to make sure, I tested the remote in another computer, where it worked fine. There are no error messages anywhere I can find, lsusb shows the device and when plugged in, there's normal looking message in dmesg. I'm running out of ideas on how to debug this.

    One more thing, which may be related or not. It seems that I crashes the box once or twice when unplugging the remote's receiver. Google turned up some old(ish) messages, but they seemed to indicate that the particular problem was fixed several kernel revisions ago. Anyway, it didn't seem to be related, though you never know.

    Anyway, if someone has had similar problems, I'd be happy to hear how you fixed them. Any suggestions on how to further debug this are also welcome. I've been running MythTV box since 2008 and Mythbuntu since 2009 (I think), and do Linux sysadmining as part of my job, so I might be able to get something done even with incomplete suggestions. This is a "production" system though, so I rather not do re-install just to see if that would fix it.

    -JLarja

  2. #2
    squakie is offline Chocolate-Covered Ubuntu Beans
    Join Date
    Oct 2012
    Beans
    2,238
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Trouble with MCE remote in 14.04

    This is going to sound strange, but bear with me.........I have an IR receiver (USB) I use with a remote configured as a MCE remote to use with XBMC on the Pi. The same exact things happens there as well. The solution: unplug the device, power off the system, plug the device back in, power on the system. Don't know why - it does appear that some of IR receivers aren't always hot pluggable. Not sure if that is any part of your problem or not.

  3. #3
    Join Date
    May 2014
    Beans
    7

    Re: Trouble with MCE remote in 14.04

    Thanks for the suggestion. Unfortunately, it doesn't seem to do anything here. I have rebooted several times before. This time, I did like you said (unplugged, switch the system off, even the PSU, plugged in, switched system on). No change.

    -JLarja
    Last edited by Jukka_Larja; May 5th, 2014 at 05:56 PM.

  4. #4
    Join Date
    Aug 2013
    Beans
    78

    Re: Trouble with MCE remote in 14.04

    I have certainly had an issue with USB devices not working after changes which seem quite unrelated. My Hauppauge T500 DVB tuner (a PCI device but with onboard USB bus) will consistently stop working after a change of display device (eg VGA to HDMI). I have not chased this problem because a cold boot fixes it but think that a UDEV rule would also fix it.

    As for your present issue, I’ll suggest 2 things, though they are rather stabs in the dark as I have yet to try a remote with 14.04.

    Stab 1 has worked in the past:

    Find your device and note the event number with:
    Code:
    cat /proc/bus/input/devices
    In my case it's on a line
    Code:
    H: Handlers= kbd event 4
    Try to set the ‘event’ number in the infrared section in Mythbuntu control centre. Note that there used to be (still is?) a bug whereby it did not prompt for the device unless you deleted and re-installed it.

    Stab 2

    As far as I can gather, the sequence of getting from a remote key press to action on the screen goes like this:

    a) The file /etc/lirc/hardware.conf defines for lirc where to look for the device. Look for the line:
    Code:
    cat /etc/lirc/hardware.conf
    [...]
    REMOTE_DEVICE= “/dev/lirc0”
    [...]
    I’m not entirely sure how one finds out the device but on my system it matches the output of
    Code:
    ls –l /dev ¦ grep lirc
    b) The file /etc/lirc/lircd.conf (and include files) defines the pulse patterns for each remote key. “If you see 10001110000 pulses then channel up has been pressed on the MCE remote, but if you see 111110000 then it’s red button on a Samsung remote ” These codes are pure fiction of course!

    c) ~/.mythtv/lircrc (or the linked file) translates those remote keys to the keystrokes you would use to control mythtv from a real keyboard (or any other application for that matter). Keystroke names need to match those in /etc/lirc/lircd.conf exactly.

    d) Mythtv keybindings say which keyboard key to look for in each frontend menu.

    Hope this moves you on a bit, but if you can fill in any of the blanks or provide corrections then please do so. I'll be following you once I fix my nvidia graphics.

    Phil

  5. #5
    Join Date
    May 2014
    Beans
    7

    Re: Trouble with MCE remote in 14.04

    Thanks for your answer, though unfortunately it didn't help.

    Quote Originally Posted by khPWXxF View Post
    I have certainly had an issue with USB devices not working after changes which seem quite unrelated. My Hauppauge T500 DVB tuner (a PCI device but with onboard USB bus) will consistently stop working after a change of display device (eg VGA to HDMI). I have not chased this problem because a cold boot fixes it but think that a UDEV rule would also fix it.

    As for your present issue, I’ll suggest 2 things, though they are rather stabs in the dark as I have yet to try a remote with 14.04.

    Stab 1 has worked in the past:

    Find your device and note the event number with:
    Code:
    cat /proc/bus/input/devices
    In my case it's on a line
    Code:
    H: Handlers= kbd event 4
    Try to set the ‘event’ number in the infrared section in Mythbuntu control centre. Note that there used to be (still is?) a bug whereby it did not prompt for the device unless you deleted and re-installed it.
    I can see the remote in the listing at /proc/bus/input/devices, along with bluetooth keyboard+mouse combination and other stuff (audio plugs, power button etc.). However, the Mythbuntu Control Centre's infrared section doesn't seem to have anywhere that I could set event number to. I have tried toggling remote on and off in Control Centre, but that didn't seem to have any effect.

    Quote Originally Posted by khPWXxF View Post
    Stab 2

    As far as I can gather, the sequence of getting from a remote key press to action on the screen goes like this:

    a) The file /etc/lirc/hardware.conf defines for lirc where to look for the device. Look for the line:
    Code:
    cat /etc/lirc/hardware.conf
    [...]
    REMOTE_DEVICE= “/dev/lirc0”
    [...]
    I’m not entirely sure how one finds out the device but on my system it matches the output of
    Code:
    ls –l /dev ¦ grep lirc
    b) The file /etc/lirc/lircd.conf (and include files) defines the pulse patterns for each remote key. “If you see 10001110000 pulses then channel up has been pressed on the MCE remote, but if you see 111110000 then it’s red button on a Samsung remote ” These codes are pure fiction of course!

    c) ~/.mythtv/lircrc (or the linked file) translates those remote keys to the keystrokes you would use to control mythtv from a real keyboard (or any other application for that matter). Keystroke names need to match those in /etc/lirc/lircd.conf exactly.

    d) Mythtv keybindings say which keyboard key to look for in each frontend menu.

    Hope this moves you on a bit, but if you can fill in any of the blanks or provide corrections then please do so. I'll be following you once I fix my nvidia graphics.

    Phil
    Thanks for your tips, but I think the problem is at lower level. Using ir-keytable I get:
    Code:
    root@Willow:~# ir-keytable
    Found /sys/class/rc/rc0/ (/dev/input/event5) with:
            Driver mceusb, table rc-rc6-mce
            Supported protocols: NEC RC-5 RC-6 JVC SONY SANYO LIRC other
            Enabled protocols: LIRC
            Name: Media Center Ed. eHome Infrared
            bus: 3, vendor/product: 0471:0815, version: 0x0000
            Repeat delay = 500 ms, repeat period = 125 ms
    But in test mode (ir-keytable -t) I get nothing. No error or anything like that, just no input.

    I'm having bit of a hard time trying to trouble-shoot right now. Too much TV shows need to be recorded, so it's a bit hard to find a time when I can boot the box. Realistically speaking I probably won't be doing much before Saturday, but if you (or anyone else) has any suggestions, I'll be sure to remember them.

    -JLarja

  6. #6
    Join Date
    Jan 2014
    Location
    Ohio, USA
    Beans
    18
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Trouble with MCE remote in 14.04

    Quote Originally Posted by Jukka_Larja View Post


    Thanks for your tips, but I think the problem is at lower level. Using ir-keytable I get:
    Code:
    root@Willow:~# ir-keytable
    Found /sys/class/rc/rc0/ (/dev/input/event5) with:
            Driver mceusb, table rc-rc6-mce
            Supported protocols: NEC RC-5 RC-6 JVC SONY SANYO LIRC other
            Enabled protocols: LIRC
            Name: Media Center Ed. eHome Infrared
            bus: 3, vendor/product: 0471:0815, version: 0x0000
            Repeat delay = 500 ms, repeat period = 125 ms
    But in test mode (ir-keytable -t) I get nothing. No error or anything like that, just no input.

    -JLarja
    I think the Enabled protocols: LIRC is the problem. You should have RC-6 enabled.

    Try stopping lirc, then run ir-keytable and if RC-6 is now enabled, then try "ir-keytable -t". If those work, then I think you need to have:

    DISABLE_KERNEL_SUPPORT=false

    in your /etc/lirc/hardware.conf file.

  7. #7
    Join Date
    May 2014
    Beans
    7

    Re: Trouble with MCE remote in 14.04

    (Hah, I did manage to get home in time for an hour of troubleshooting )

    Quote Originally Posted by Dave_Alverson View Post
    I think the Enabled protocols: LIRC is the problem. You should have RC-6 enabled.

    Try stopping lirc, then run ir-keytable and if RC-6 is now enabled, then try "ir-keytable -t". If those work, then I think you need to have:

    DISABLE_KERNEL_SUPPORT=false

    in your /etc/lirc/hardware.conf file.
    Doesn't seem to help. Stopping lirc doesn't affect the Enabled protocols line, neither does adding DISABLE_KERNEL_SUPPORT="false" to hardware.conf and rebooting. ir-keytable -t stays silent.

    -JLarja

  8. #8
    Join Date
    Jan 2014
    Location
    Ohio, USA
    Beans
    18
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Trouble with MCE remote in 14.04

    I'm still on 12.04 and in that version, the lirc init script will set enabled protocols to just LIRC when started if LOAD_MODULES is true. In a later version of the lirc package (0.9.0-0ubuntu3), it would also only do the disable if DISABLE_KERNEL_SUPPORT is true. I cant think of anything else that would be tweaking the enabled protocols for your remote. I believe at startup, all the protocols are enabled.

    You can try manually setting the protocol with this:

    Code:
    sudo  echo "rc-6" > /sys/class/rc/rc0/protocols
    Then see what ir-keytable shows for enabled protocols, and try "ir-keytable -t".

    NOTE: if there is no DISABLE_KERNEL_SUPPORT set in hardware.conf, it will default to "true" to emulate the way the older script ran.
    Last edited by Dave_Alverson; May 8th, 2014 at 07:00 PM. Reason: added NOTE

  9. #9
    Join Date
    May 2014
    Beans
    7

    Re: Trouble with MCE remote in 14.04

    There's DISABLE_KERNEL_SUPPORT="false" by default in hardware.conf. I did try setting it to true for a while. I haven't done any manual tweaking before the troubleshooting. After the initial install, remote just worked (TM). Then it just stopped working. I'm about 98 % certain that I have reverted all the changes I've been doing during the troubleshooting, though I may have forgotten something at some point.

    Doing the echo "rc-6" > /sys/class/rc/rc0/protocols did change the ir-keytable output:

    Code:
    Found /sys/class/rc/rc0/ (/dev/input/event4) with:
            Driver mceusb, table rc-rc6-mce
            Supported protocols: NEC RC-5 RC-6 JVC SONY SANYO LIRC other
            Enabled protocols: RC-6
            Name: Media Center Ed. eHome Infrared
            bus: 3, vendor/product: 0471:0815, version: 0x0000
            Repeat delay = 500 ms, repeat period = 125 ms
    ... but unfortunately ir-keytable -t still shows now input.

    I guess there isn't any more low-level way of monitoring input in Linux for mere mortals. There's always the possibility that the receiver really is broken, just in some weird way that still allows it to work in Windows.

    Edit: I did some testing with evtest. It lists
    Code:
    /dev/input/event4:      Media Center Ed. eHome Infrared Remote Transceiver (0471:0815)
    /dev/input/event5:      MCE IR Keyboard/Mouse (mceusb)
    but doesn't show any input for either. I don't whether that's surprising or not considering the silence of ir-keytable.

    Edit:

    Since I still have the old 12.04 box sans TV-tuners and big disks, I fired it up and tested the remote with it. It did work with irw and once I shut down lirc, also in ir-keytable. So apparently not a hardware problem at least on remote's side. Ir-keytable shows (with lirc disabled):
    Code:
    Found /sys/class/rc/rc0/ (/dev/input/event2) with:
            Driver mceusb, table rc-rc6-mce
            Supported protocols: NEC RC-5 RC-6 JVC SONY LIRC other
            Enabled protocols: NEC RC-5 RC-6 JVC SONY LIRC other
            Repeat delay = 500 ms, repeat period = 125 ms
    Apart from SANYO, seems to be the same list as on 13.04.

    Just another data point. Unfortunately I don't see how this would help.

    -JLarja
    Last edited by Jukka_Larja; May 10th, 2014 at 12:29 PM.

  10. #10
    Join Date
    Aug 2013
    Beans
    78

    Re: Trouble with MCE remote in 14.04

    Not sure it adds anything new to the equation but I'll mention it anyway. This article has a pointer to a comprehensive XBMC article on LIRC.
    https://forum.mythtv.org/viewtopic.php?f=36&t=123
    Phil

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •