Solved What is the secret to getting a MCE compatible remote to work in Ubuntu 18.04
EDIT: The solution is in birdwatcher's post below, which references this article:  Make LIRC work in Ubuntu 18.04, so that you can use your infrared remote in Kodi

We have been trying to do this now for two days and can't seem to get anything approaching a working solution.  This is a brand new install of Ubuntu 18.04 and Kodi 17.6, and it is turning out to be a major headache.  We haven't even got to the point of thinking about addons or anything, this is truly "out of the box" Kodi, and we've reinstalled Ubuntu about three times now.

In previous versions of Ubuntu we'd install LIRC, configure it to use a Windows MCE remote, and Kodi just magically worked with the remote, and we have done this several times on different and upgraded systems.  But along comes Ubuntu 18.04 and apparently you can't use LIRC anymore.  But without it, not all the the buttons work, and those that do only work some of the time.  We tried the solution at but it only made things marginally better - more keys worked, but very often we'd get double keypresses or in other cases we'd have to press a button several times for it to register (particularly annoying when it's the OK/Enter button).  We checked remote operation using a command that I can't recall offhand from the Linux command line, and all the buttons to seem to register correctly, but if you hold any button down for more than just a moment Ubuntu appears to recognize multiple keypresses.

Getting a remote to work and properly behave in Kodi should NOT be this difficult.  I don't know if the cause is changes in LIRC that prevent it from working properly (which we uninstalled and purged because it made the remote stop working altogether), or in Ubuntu itself, or something in Kodi though I'd be very surprised if it was a Kodi issue.  I cannot believe other Ubuntu users aren't running into this and I am wondering, what did you do to fix it?  Do you live with a remote that hardly works acceptably, or did you actually find a solution that truly banishes these problems (and if you did, PLEASE share it)?  Or did you just go back to Ubuntu 16.04, where LIRC still works beautifully, or to some other Linux distro where LIRC still works?  I would really like to know if there is a solution to this.  Note that we have experienced this issue on two completely different systems running very different hardware, and yet the problems we observed were exactly the same.

If there is a solution that works I would suggest putting it in a sticky post that explains it because I have looked at so many web pages on this issue that supposedly show solutions (that don't work) that my eyes are glazing over, and I see that many users have run into this, and many of them apparently just gave up and went back to Ubuntu 16.04.  I would rather not do that, so if there is a solution that WORKS I would really love to hear it.
Save yourself a ton of headaches and buy a Flirc -
I use them on all of my htpc's running LibreElec and/or Ubuntu
(2018-07-22, 02:19)Aenima99x Wrote: Save yourself a ton of headaches and buy a Flirc -
I use them on all of my htpc's running LibreElec and/or Ubuntu
 So, what I heard you say there is "Go back to Ubuntu 16.04, because you'll never make your perfectly good remote work in Ubuntu 18.04"

(Sorry, my brain just refuses to process the word "buy" when I know there is absolutely nothing wrong with the equipment I already have).

But is that really the only viable solution at this point?
I too would love to know the answer to this I have spent days trying to make this work and countless hours searching the web for an answer and I can't find anything!!!  This is a super frustrating problem, my remote worked perfect in 16.04 and I can get it to recognize a few buttons in 18.04 but they all work hit or miss and a lot of double button presses.
I also upgraded recently from 16.04 to 18.04 and had issues figuring out how to get MCE to work.
After 2 days and most of the buttons working but some not, I got it finally working.
Maybe this can clearify some issues.

The how-to's are good but I missed the part where the mapping was explained, I'm just posting the buttons in the files to have a better overview.
First you have (i.e.) "/etc/rc_keymaps/rc6_mce":
Quote:# table rc6_mce, type: RC6
0x800f0400 KEY_NUMERIC_0
0x800f0401 KEY_NUMERIC_1

And then I have "/etc/lirc/lircd.conf.d/devinput.lircd.conf":
Quote:begin remote
  name  devinput-32
  driver devinput
  bits           16
  eps            30
  aeps          100

  one             0     0
  zero            0     0
  pre_data_bits   16
  pre_data       0x1
  post_data_bits  32
  post_data      0x1
  gap          132799
  toggle_bit_mask 0x0

      begin codes
          KEY_NUMERIC_0            0x200
          KEY_NUMERIC_1            0x201
      end codes
end remote

After that, the "Lircmap.xml":
Quote:<?xml version="1.0" encoding="UTF-8"?>
        <remote device="devinput-32">
            <!-- new kernel-based lirc button names -->

The buttons are mapped from "rc_keymaps"  to "devinput.lircd.conf" and after that you have to tell which buttons should be mapped to kodi functions.
Sorry 3dfx, but that answer made no sense at all to me, because for one thing the /etc/lirc directory doesn't exist, and for another I cannot figure out how your last section in any way relates to the first two.
KEY_1 should obviously be KEY_NUNERIC_1
And as for the lirc folder.... I have one.
And I can't tell you anything but that this works for me.
Just trying to help mate
Has your MCE remote ever worked correctly on this system? Your issue could be regarding the IR receiver rather than ir-keytable setup.

Note, clontarfx's instructions do work, at least in 16.04. Is there a particular reason you don't want to use the tried and tested 16.04 compared to the new and problematic 18.04?

If it's the age, once the HWE packages are installed 16.04 will update itself to kernel 4.15, not far behind 18.04. For kodi 17.6 16.04 works perfectly, if you follow fritsch's guide and the ir-keytable / MCE remote guide.
I think i had the same issue when upgrading from 16.04/17.10 to 18.04.
In 16.04 the hardware-related info was in /etc/lirc/hardware.conf.
Now you have to setup /etc/lirc/lirc_options.conf like this:
nodaemon = False
driver = default
device = /dev/lirc0
output = /var/run/lirc/lircd
pidfile = /var/run/lirc/
plugindir = /usr/lib/x86_64-linux-gnu/lirc/plugins
permission = 666[/syntax]
allow-simulate = No
repeat-max = 600
#effective-user =
#listen = [address:]port
#connect = host[:port]
#loglevel = 6
#release = true
#release_suffix = _EVUP
#logfile = ...
#driver-options = ...

uinput = False
nodaemon = False

# [modinit]
# code = /usr/sbin/modprobe lirc_serial
# code1 = /usr/bin/setfacl -m g:lirc:rw /dev/uinput
# code2 = ...

# [lircd-uinput]
# add-release-events = False
# release-timeout = 200
# release-suffix = _EVUP
Then you have to edit a small thing in the openbox autostart file from fritschs tut in /home/kodi/.config/openbox/autostart:
OUTPUT=`xrandr -display :0 -q | sed '/ connected/!d;s/ .*//;q'`
xrandr -display :0 --output $OUTPUT --set "Broadcast RGB" "Full"
xsetroot #000000
xset s off -dpms 
  /usr/bin/kodi --standalone --lircdev /var/run/lirc/lircd
while [ $? -ne 0 ]; do 
  /usr/bin/kodi --standalone --lircdev /var/run/lirc/lircd
openbox --exit
the --lircdev option doesn't work in v18 anymore, you have to set an env var LIRC_SOCKET_PATH instead.
Here it is only the volume up, volume down and mute which is not working.  All other MCE functions work fine.

Today tried this:

ir-keytable -c -p RC-6 -w /etc/rc_keymaps/rc6_mce -t

and for volume up, volume down and mute see this which is correct but nothing is seen in Kodi 17.6

499.952652: event type EV_MSC(0x04): scancode = 0x800f0410
499.952652: event type EV_KEY(0x01) key_down: KEY_VOLUMEUP(0x0073)
499.952652: event type EV_SYN(0x00).

503.821565: event type EV_MSC(0x04): scancode = 0x800f0411
503.821565: event type EV_KEY(0x01) key_down: KEY_VOLUMEDOWN(0x0072)
503.821565: event type EV_SYN(0x00).

509.116431: event type EV_MSC(0x04): scancode = 0x800f040e
509.116431: event type EV_KEY(0x01) key_down: KEY_MUTE(0x0071)
509.116431: event type EV_SYN(0x00).

Running debug (system settings, Logging and Enable debug logging) in Kodi 17.6 see the following with Volume up, Volume down and mute.

tail -f kodi.log

I do see something is amiss here.

volume up
11:24:59.311 T:139695372428480   DEBUG: Keyboard: scancode: 0x7a, sym: 0x00ae, unicode: 0x0000, modifier: 0x0

volume down
11:25:07.859 T:139695372428480   DEBUG: Keyboard: scancode: 0x7b, sym: 0x00af, unicode: 0x0000, modifier: 0x0

11:25:11.918 T:139695372428480   DEBUG: Keyboard: scancode: 0x79, sym: 0x00ad, unicode: 0x0000, modifier: 0x0

11:25:14.779 T:139695372428480   DEBUG: Keyboard: scancode: 0x72, sym: 0x0113, unicode: 0x0000, modifier: 0x0
11:25:14.779 T:139695372428480   DEBUG: OnKey: right (0xf083) pressed, action is Right
11:25:15.178 T:139695372428480   DEBUG: Keyboard: scancode: 0x72, sym: 0x0113, unicode: 0x0000, modifier: 0x0

I do not see the OnKey command running debug for volume up, volume down or mute and only see it for the rest of the MCE remote buttons.

Guessing this is my issue.  How do I fix this?
Here is the stupidly simple solution to this that actually works:

Make LIRC work in Ubuntu 18.04, so that you can use your infrared remote in Kodi
Thank you birdwatcher.

Your simple solution worked fine for me.  I have a volume control and mute button that works fine now.

Response times to the MCE remote are much better.
Thumbs Up 
(2018-07-24, 19:05)birdwatcher Wrote: Here is the stupidly simple solution to this that actually works:

Make LIRC work in Ubuntu 18.04, so that you can use your infrared remote in Kodi
 This is the answer that made my remote work!

I spent a week on the remote issue and tried the simple solution from here. The LIRC solution worked great on my newly minted xubuntu 18.04 as explained previously in posts. I now have Kodi integrated from here within my MythTV combined frontend and backend computer with a USB IR receiver in Lounge room. Currently my wife is pleased with the result as the whole process involved porting a MythTV installation from Ubuntu 12.04 of six years and integrating Kodi from an Intel NUC into one system all driven by Logitech's Smart Control Hub.

In the Study I now have a remote MythTV Frontend and integrated Kodi system on the newly acquired NUC also with xubuntu 18.04 and wanted to get the Nuvoton IR working rather than via Bluetooth. But here is where the fun started as I purged all references of LIRC from xubuntu. My other Logitech Smart Control Hub (in Study) identified the Intel NUC (NUC5i5RYH) and using ir-keytable I copied rc-rc6-mce file into the keymaps directory. I kept getting duplicated keystrokes so I decided to use another remote control an old DVICO Fusion remote and switch to that protocol (NEC). No more duplicate keystrokes in MythTV or Kodi. This is not the best solution but for now I have at least found the problem, and no more Lircmap.xml or lircrc files, just edit the keymap file to suit, one file in one place.

So to answer the original question maybe try a different remote (in Study) or go back to LIRC 0.9 (in Lounge).
Thread Rating:
  • 0 Vote(s) - 0 Average

Logout Mark Read Team Forum Stats Members Help
What is the secret to getting a MCE compatible remote to work in Ubuntu 18.0400