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


If you are a Kodi user and have recently tried to upgrade your system to Ubuntu 18.04, and then tried to install and use LIRC to make your infrared remote control work the way it should, you may have discovered that it doesn’t work. For one thing, you don’t get the configuration menu during the install process, so you can’t select your make and model of remote. Even the old standby of using sudo dpkg-reconfigure lirc to bring up the configuration menu doesn’t work anymore.

Chances are you searched the web for an answer, but perhaps you never found anything that would make your remote work as smoothly as it used to in past versions of Ubuntu. Even if you got the remote to work in Kodi, you probably got double button presses or a lack of response to button presses on some buttons at random times, and maybe certain buttons would not work at all. We have heard of Kodi users giving up and going back to Ubuntu 16.04 because of this issue!

It turns out that the issue may not be with Ubuntu OR Kodi.  It appears the problem is that the Ubuntu 18.04 repositories contain a newer version of LIRC, that just doesn’t work properly.  We found that going back to an old version, specifically LIRC 0.9.0, is the answer – install that, and you do get a version of LIRC that works in Ubuntu 18.04 and that makes your remote work smooth as silk in Kodi.  Well, at least it did for ours, which is a standard Windows MCE compatible remote similar to the one pictured above.

So how do you do that?  Well, as the title of this blog implies, we are two “sort of” tech guys, and one thing we are not is Linux experts.  So, we took an approach that is relatively easy and that works, even if it may not be the “most correct” way to do it.  Here’s the procedure we used:

First, remove any existing installs of ir-keytable and/or lirc – from Linux command line do:

sudo apt purge ir-keytable lirc

Also, if you have added any other software in an attempt to get the remote to work, you probably should remove that as well.

Next, we’re going to temporarily edit /etc/apt/sources.list – we will use nano, but feel free to use vi or vim if that’s your thing:

sudo nano /etc/apt/sources.list

Add this line at the bottom of the /etc/apt/sources.list file:

deb xenial universe

Use Ctrl-X to exit nano; be sure to save the file (unless you made a mistake, then just exit without saving and start over).

Then, from the Linux command line:

sudo apt update
sudo apt install lirc/xenial

You should see it install lirc and a few dependencies.  Somewhere in the process you should see “Setting up lirc (0.9.0-0ubuntu6) …” and also you should get the configuration screen, from which you can pick the type of infrared remote you use (such as “Windows Media Center Transceivers/Remotes (all)”, which is down near the bottom of the list).

lirc configuration screenClick on the image to enlarge

After that is finished, do this so Ubuntu won’t try to upgrade lirc to the newer bad version:

sudo apt-mark hold lirc

Now that lirc is installed, you need to go back and remove the line you just added to /etc/apt/sources.list:

sudo nano /etc/apt/sources.list

Scroll down to the bottom of the file and put the cursor at the start of this line and press Ctrl-K to delete it:

deb xenial universe

As before use Ctrl-X to exit nano, and be sure to save the file.

Now from the command line you should immediately do this so that your system doesn’t inadvertently try to get any other packages from the xenial universe repository:

sudo apt update

And that’s it!  What we have done here is to temporarily enable the Ubuntu 16.04 (xenial) universe repository, where a copy of lirc 0.9.0 is available, and then we installed it using the apt command.

We do realize that there may be alternative way to do this, such as downloading the lirc package from the xenial repository (the amd64 version is here) and then installing it using dpkg, but we’d be a little concerned that doing it that way either might not bring in the necessary dependencies, or might not show the configuration menu.  But, feel free to try doing it that way if you’re much more conversant with Linux than we are.

We hope this helps others who have struggled to get their infrared remote working with Kodi in Ubuntu 18.04!

If you liked this article, you may also want to read our followup article: Extending the remote control capabilities of LIRC.

25 thoughts on “Make LIRC work in Ubuntu 18.04, so that you can use your infrared remote in Kodi

  1. mike stikkelorum

    time to leave a message!

    can’t thank you enough, this issue has plagued me for months, fiddling with Lirc and ir-keytable, creating custom buttons for my harmony-one, drove me crazy…

    Life sucks without a proper working remote 😛

    i salute you



  2. Roland

    Thank you guys!!

    i fiddled nearly a month around with this Problem! now just fixed and everything work as well as with 16.04!
    Thank you so much!


  3. FMc

    I upgraded my PC from 16.04.1 LTS to 18.04.1 LTS running Kodi. My MCE Remote Control stopped working and this article solved the problem immediately. Thanks!


  4. Дмитрий Седьмой

    I have not configuration dialog during installation process, so I doing it later via
    dpkg-reconfigure lirc
    And running at this time Kodi don’t work with remote, so I simply reboot the PC and it works!
    Good post, thank you!

    Liked by 1 person

  5. Cam

    Saved my bacon guys. I installed LMDE 3 and was tearing my hair out after a week of internet forums before finding your amazing article. The ubuntu package installed perfectly on a fresh un-updated install of lmde 3 and now my house has shared media again.
    Thank You for taking the time to write this down for others.


  6. Lawrence

    I can’t thank you enough for making my day!!!! Thanks!

    I have spent weeks looking for a solution and tried several “tutorials” on how to make my mce remote work with Kodi on Linux Mint 19. And your instructions simply worked! Thank you!!!!


  7. JF

    Again, your solution worked for another person. me!

    Thanks a lot. Also learned a bit more about features of apt and specific versions installations along the way.


  8. tomonoak

    Thank you, thank you! I could never get LIRC to work after upgrading to 18.04, even compiling from source rather than installing from the repository. I can confirm this fix works on 18.10. I wonder what will happen with 19.04?


  9. defec

    Thanks for the writeup. I can’t get my serial blaster to work with it. I need my box to transmit. Maybe due to not being to install the modules for it. If anyone else had any like please let us know how you did it.


  10. szafiro

    They have change driver module name from Lirc_serial to serial_ir.

    If you don’t have /dev/lirc0 you need to change hardware.conf file

    REMOTE_MODULES=”lirc_dev lirc_serial”

    REMOTE_MODULES =”lirc_dev serial_ir”


  11. mubin

    sudo apt install lirc/xenial
    This didn’t work for me I wrote sudo apt install lirc/oldstable and it was able to install old version of lirc. However I can not run configuration window. How?


  12. eddictnl

    anyone get this working with 20.04 LTS ?

    the the configuration screen did not show up after “sudo apt install lirc/xenial” command so manually executed “sudo dpkg-reconfigure lirc”. then selecting “Windows Media Center Transceivers/Remotes (all)” and “None” i get below error:

    ls: cannot access ‘/lib/modules/5.4.0-28-generic/kernel/drivers/staging/media/lirc’: No such file or directory


    1. Just out of curiosity, did you make sure there were no other versions of LIRC on the system? We looked on our 18.04 LTS installs and that file or directory doesn’t exist there either.

      We’ve been afraid this method might not work in 20.04; but since neither of us are true penguin heads we really can’t say what needs to be done to make it work. We’ve seen some posts where users have said that this method does still work for them with 20.04, so can’t say why some are having success and others aren’t. It may be that it uses one or more dependencies that need to be installed. Still, the error you got is kind of a weird one and other than it possibly coming from a different version of LIRC, we don’t know why you’re seeing it.

      (If there are any true penguin heads reading this, please feel free to jump in and give us a hand with this. But please keep in mind that the reason some of us really want LIRC to work is because it lets you control several different programs and even do system tasks if you set up a proper configuration file. Many of the more recent “solutions” offered to Kodi users ONLY work inside Kodi; you can’t even use them to launch Kodi from the desktop.)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.