Solved Kodibuntu 14.2, NUC(2820),Harmony: Repeating key presses
#1
Hi all,

I recently took the bold step to upgrade to kodibuntu from my 6 yo windows 7(with a Asrock) set up that was slow and dying (but working). I am having a issue where each key press on my Harmony remote fires off a never ending stream of repeating key commands.

The following is my setup and the configuration steps that I took to get here. Sorry for it being so long and detailed but I hope that I can help others get to where I am and that if you are reading this that it is clear what I have done.

My System Setup
  1. Intel Celeron 2820 NUC
  2. Harmony 515 remote
  3. Sony Bravia monitor and a NAD D3020 USB direct amp (both working perfectly with kodibuntu

Configuration Steps
  1. Upgraded the NUC Bios to the latest version 0050. This provided the inbuilt IR support
  2. Disabled the inbuilt audio from the bios
  3. Installed kodibuntu 14.0 64bit onto a 8GB Kingston DataTraveller USB2 (non live mode). Plugged into the front USB3 port
  4. Performed a update to get the latest kodi 14.2 (helpful link : kodi.wiki/view/HOW-TO:Install_Kodi_for_Linux)
    Code:
    sudo apt-get update
    sudo apt-get upgrade
    #Confirm that we are on kodi 14.0
    sudo apt-cache policy kodi
    #Remove the PPA
    sudo add-apt-repository -r ppa:team-xbmc
    #Add the PPA again to get onto the stable branch
    sudo add-apt-repository ppa:team-xbmc/ppa
    sudo apt-get update
    sudo apt-get remove kodi
    sudo apt-get install kodi gedit -y

  5. Open up kodi and confirm that we now have 14.2 and that your harmony doesn't work. Mine didn't so I had to perform the next steps
  6. Upgraded the kodibuntu kernel from 3.13 to the latest trusty rc2 3.15. I used the header and image from here and followed this guide. Updated commands below.
    Code:
    mkdir linux3.15
    cd linux3.15
    wget -O headers.deb http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.15-rc2-trusty/linux-headers-3.15.0-031500rc2_3.15.0-031500rc2.201404201435_all.deb
    wget -O image.deb http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.15-rc2-trusty/linux-image-3.15.0-031500rc2-generic_3.15.0-031500rc2.201404201435_amd64.deb
    sudo dpkg -i *.deb
    sudo reboot

  7. Confirm that we now have the 3.15 kernel
    Code:
    uname -r
    #Mine returns: 3.15.0-031500rc2-generic

  8. Confirm that you have the ITE8713 CIR transceiver
    Code:
    cat /proc/bus/input/devices
    Output should have something along the lines of:
    Code:
    I: Bus=0019 Vendor=1283 Product=0000 Version=0000
    N: Name="ITE8713 CIR transceiver"
    P: Phys=
    S: Sysfs=/devices/virtual/rc/rc0/input13
    U: Uniq=
    H: Handlers=kbd event6
    B: PROP=0
    B: EV=100013
    B: KEY=fff 0 200108fc32e 237605100000000 0 700158000 419200004001 8e968000000000 10000000
    B: MSC=10

  9. Confirm that the resources folder exists
    Code:
    sudo ls /sys/bus/acpi/devices/ITE8713\:00/physical_node/


  10. Next I have to get the IR device working. I used 2 guides. kodi.wiki/view/Intel_NUC#Consumer_IR and one with the NUC 2820 details. Updated commands are below. Enable the ite_cir driver for the CIR. Create a new file /etc/rc2.d/S18fix-cir using your favorite editor with this content:
    Code:
    sudo gedit /etc/rc2.d/S18fix-cir

  11. Paste in the following and save/close.
    Code:
    #! /bin/sh
    #
    # Fix for Consumer IR device, see https://communities.intel.com/thread/46259
    modprobe -r ite_cir
    echo "auto" > /sys/bus/acpi/devices/ITE8713\:00/physical_node/resources
    modprobe ite_cir

  12. Make the new file executable using:
    Code:
    sudo chmod +x /etc/rc2.d/S18fix-cir

  13. If you reboot now you should have inbuilt IR capabilities. Confirm by
    Code:
    dmesg | grep -i ite_cir
    #
    # Output should show something line
    #
    [   11.405252] ite_cir: Auto-detected model: ITE8713 CIR transceiver
    [   11.405258] ite_cir: Using model: ITE8713 CIR transceiver
    [   11.405260] ite_cir: TX-capable: 1
    [   11.405262] ite_cir: Sample period (ns): 8680
    [   11.405264] ite_cir: TX carrier frequency (Hz): 38000
    [   11.405266] ite_cir: TX duty cycle (%): 33
    [   11.405267] ite_cir: RX low carrier frequency (Hz): 0
    [   11.405269] ite_cir: RX high carrier frequency (Hz): 0
    [   11.529087] ite_cir: driver has been successfully loaded
    [   18.222046] ite_cir: Auto-detected model: ITE8713 CIR transceiver
    [   18.222049] ite_cir: Using model: ITE8713 CIR transceiver
    [   18.222051] ite_cir: TX-capable: 1
    [   18.222053] ite_cir: Sample period (ns): 8680
    [   18.222055] ite_cir: TX carrier frequency (Hz): 38000
    [   18.222057] ite_cir: TX duty cycle (%): 33
    [   18.222059] ite_cir: RX low carrier frequency (Hz): 0
    [   18.222060] ite_cir: RX high carrier frequency (Hz): 0
    [   18.228169] ite_cir: driver has been successfully loaded


  14. Install lirc and ir-keytable
    Code:
    sudo apt-get install lirc ir-keytable
    Lirc will ask you some questions. It does not really matter what IR receiver is chosen as the required one is not available, so choose None for both the receiver and the transmitter.

  15. Edit /etc/lirc/hardware.conf and add the following.
    Code:
    REMOTE="ITE8713 CIR transceiver"
    REMOTE_MODULES="lirc_dev ite_cir"
    REMOTE_DRIVER="default"
    REMOTE_DEVICE="/dev/lirc0"
    REMOTE_SOCKET=""
    REMOTE_LIRCD_CONF=""
    REMOTE_LIRCD_ARGS=""
    START_LIRCD="true"
    LOAD_MODULES="false"

  16. Confirm that the lirc protocol is enabled
    Code:
    cat /sys/class/rc/rc0/protocols
    #
    # Should output
    #
    [rc-5] [nec] [rc-6] [jvc] [sony] [sanyo] [sharp] [mce_kbd] [lirc]

  17. I had everything enabled but we only want lirc. So lets make lirc the only enabled one
    Code:
    sudo echo lirc > /sys/class/rc/rc0/protocols
    #
    # Should output
    #
    rc-5 nec rc-6 jvc sony sanyo sharp mce_kbd [lirc]

  18. Now confirm that your remotes key presses are being received by the inbuilt IR. Run ir-keytable -t and then press your karmony remote buttons.
    Code:
    ir-keytable -t


  19. It is at this point that i get the many repeating key presses. In this example i pressed the down arrow(^[[B) once and the stop button(x) once(confirmed to work in kodi 14.2 on my windows 7 build)
    Code:
    Testing events. Please, press CTRL-C to abort.
    ^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[Bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

  20. These key presses will repeat for ever and only stop when another key is pressed. If that other button is pressed again then it repeats without end also.
  21. I thought it may simply be that kodi could ignore the repeats so I updated advanced settings 'sudo gedit ~/.kodi/userdata/advancedsettings.xml'
    Code:
    <remotedelay>10</remotedelay>
    <remoterepeat>1000</remoterepeat>

  22. I rebooted and then opened kodi and the repeating keypresses still remain.

Thanks,
Luddite
Reply
#2
Have you updated your devices/activities in harmony software, the IR receiver isn't the same as the old one you were using obviously but you make no mention of doing that in your pretty detailed steps...
Reply
#3
Hi robo989,

Thanks for replying. No I didn't update the harmony. If it is that then I will kick myself. I will check tomorrow night after work.
Reply
#4
robo989,

Yes, that was the problem. Thank-you!!!. I had to tweak the logitehc harmony software.

Go back into the logitech harmony software, click troubleshoot on the device:

"Responds to some commands either too many times or only occasionally"

Change that to zero. Solved!

I also had to modify the "prev" button. I assigned it 'clear' which is also delete in kodi. I then had to modify the keymap in kodi to remove delete from the file system 'delete' command.

I also removed the steps for lirc as it is no longer needed.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodibuntu 14.2, NUC(2820),Harmony: Repeating key presses0