OSMC remote for Kodi on Linux - Play/Pause button not working

Hi there,

I recently bought the OSMC remote to use with Kodi, which I have running on a NUC with elementaryOS as the base operating system (Ubuntu based). The plug and go functionality is great for most of the buttons, however the Stop and Play/Pause buttons weren’t working.

After I installed the Keymap Editor Add-On to Kodi, I was able to add Stop button function as it detected key ID 61952 - so that is working fine now. However, Keymap Editor doesn’t detect the Play/Pause button being pressed so I couldn’t add the function that way.

From Terminal I used showkey to determine that the system was detecting key output 164 for the Play/Pause button (128 for the Stop button) so I know that the remote is sending an output which is being detected by Linux.

I tried using a debug log on Kodi to see if I could find the 5 digit key ID for the Play/Pause button if it was picking up some input in Kodi. This is the log: https://paste.ubuntu.com/26244788/

Based on that I tried adding the line <key id=“61697”>Pause</key> to the gen.xml that was generated by Keymap Editor, as well as my own keyboard.xml. I’ve also removed Keymap Editor so that it won’t be trying to over-write my changes.

However I’m still stuck at the same spot - I can use the Stop button correctly, however get nothing from the Play/Pause button. Before troubleshooting I also ran update and upgrade through apt-get so I should be running the latest version of Kodi.

Any idea if there is a workaround, or is there just a working keyboard.xml file I can drop into the folder? Alternatively if there’s a way I can tell Linux to automatically translate the key input 164 into outputting the same as the space bar, that would have the same net result.


Does your OSMC remote have volume buttons?

You can install eventlircd (we have x64 packages) which can be installed. The remote would then automatically start working


Hi Sam,

Yes it does have volume buttons, here’s a picture: https://drive.google.com/file/d/1t82ZMqa4Z7Th9i8XlJ7JdHXknPt7mN03/view?usp=sharing

I don’t see any identifiable markers such as a serial number on it.

Play Pause should work out of the box on Linux. It does here.

Try checking with evtest

Thanks for your reply, hope you had a good Christmas.

I ran evtest - it picks up two OSMC remote events (across three tests: event2 and event3 the first time, event6 and event7 the second time, event5 and event6 the third time).

First time: I ran the evtest command on the first of the pair (event2) and when I pressed the Play/Pause button on the remote it recorded ^@ on the screen, similar to when terminal is doing something and you press random buttons it will just kick back garble. I couldn’t figure out how to interrupt to exit so I restarted the system.

Second time: I ran the evtest command on the second of the pair (event7) and when I pressed the Play/Pause button on the remote it kicks back the message which can be seen in the image: https://drive.google.com/open?id=1rDq2GtTk5oPOgZDkYo-PdvpbuftWjJ7N

Third time: I ran the evtest command on the first of the pair (event5) again, and got the same reaction as I was getting from the first test: https://drive.google.com/open?id=15y2cN42OayuTFykir3Ofp5sajvMcNSN9

Still can’t figure out what I’m meant to do to interrupt the test to exit it and generate a log hence I’ve included those two photos (I should say my Linux knowledge is very limited and extends to googling how to do a thing and hoping the results are relatively idiot proof instructions).

In every instance when it runs through possible Event codes it lists 164 a
“Event code 164 (KEY_PLAYPAUSE)”
prior to the input test cursor.

The system this is running on is elementary OS 0.4.1 based on Ubuntu 16.04.03 LTS, on a NUC. I’ve also tried this on a Tosh laptop running the same OS and had the same result. When I tried the remote with a freshly installed and updated clean Ubuntu 16.04 onto an AMD based desktop again I got the same results - the buttons work excluding Play/Pause and Stop (I assume I’d still be able to set up the Stop button if I were inclined.)

The remote work’s perfectly with any Windows 10 system I’ve plugged it into (Intel desktops, AMD desktop, Intel laptop).

It’s also worked perfectly in a Raspberry Pi 2 running RetroPi with Kodi installed. So my guess is that Ubuntu doesn’t carry with it built in support for LIRC, whereas the Linux releases planned as explicitly just small, light media centres have that included up stream. I tried installing lirc on eOS and when it asked me which remote/transceiver I realised I’m completely over my head for knowing where to go with that and the stuff I’ve found online tends to assume the reader has a little more background knowledge than I do.


1 Like


Sorry for the late reply.

As you’re on Ubuntu 16.04, my suggestions are similar to the topic here: OSMC remote mapping on KodiBuntu.

This won’t require any further changes.

There will be an OSMC release for PC in the future as well, which will provide a better experience than Kodi on Ubuntu.

With the latest remote, we have aimed for very close compatibility with Kodi on all platforms (Windows, Mac and Linux) out of the box.


Thanks for replying. I realise it’s the holiday period, I’m not expecting immediate responses :slight_smile:

Following your instructions in the link I’m lacking the eventlircd. Should I install from here or is there a PPA? osmc/package/eventlircd-osmc at master · osmc/osmc · GitHub

I don’t know if this would throw a spanner in the works for understanding where the problem is - I discovered that the Play/Pause button works as you’d expect in Spotify, as well as elementary OS’ bundled music player (labelled Music but I think it’s called noise to the system). None of the other buttons seem to do anything (not that they necessarily would do much), though it doesn’t seem to indicate the issue is with how Kodi is reading information being sent to it on Ubuntu-derived installs, rather than it being an issue in the OS?

Based on your advice in this post OSMC remote mapping on KodiBuntu - #16 by sam_nazarko - running kodi with the command ./kodi.bin --lircdev /var/run/lirc/lircd - would that mean always starting Kodi from terminal instead of the dock icon? If that’s so I may cut my losses and make do with it as it is.

you should be able to change the command for the icon to have the additional parameters

The instructions I’ve given you show you how to fetch our prebuilt LIRC and eventlircd packages.

I think you can change the Dock icon’s default start parameters, but it depends on the DE you’re using. Alternatvely you can launch it from a shell script and add that script to the dock.

I think I’m getting a similar problem as the previous poster. I do the three wget operations. When I run “sudo dpkg -i amd64-*.deb” I get this response:

(Ths is why I said about lacking eventlirc)

When I reun the command “sudo apt-get -f install” I get:

I tried a command for just the eventlirc package (“sudo dpkg -i armv6l-eventlircd-osmc_1.2.0_armhf.deb”) immediately after running the specific wget for it and receive this:

Install the amd64 version, not armv6l

I used
“wget http://ftp.fau.de/osmc/osmc/apt/pool/main/a/amd64-eventlircd-osmc/amd64-eventlircd-osmc_1.2.0_amd64.deb
and the dpkg went fine.

I ran “sudo systemctl enable eventlircd” then “systemctl status eventlircd” and got this:

I started Kodi with this command: “/usr/bin/kodi --lircdev /var/run/lirc/lircd”

In Kodi, the remote operates as it always has done - no response from Play/Pause or the Stop button. The Stop button can be configured in Keymap Editor, but Kodi still isn’t picking up the Play/Pause button.

This is the output into terminal during use of Kodi:

and on a second occasion

Unless you’re really certain about what will get this working I think I’m going to leave it there as it doesn’t seem to be going forward. It looks to be a really finicky disagreement somewhere between eOS, Kodi('s packages for Ubuntu), and the remote. The Play/Pause button does still work correctly in Spotify and the built in media applications on eOS which is the part I least understand.

I do still have access to play/pause functionality by pressing OK on the remote and using the playback bar - it’s just a bit annoying to have a button on the remote that isn’t doing anything. This issue I’ve found to be present when tested on installs of Kodi in Ubuntu 16.04, Linux Mint 18.3 and elementary OS 0.4.1 (my daily driver) - Mind and eOS both being Ubuntu derivatives - my version of eOS is built on Ubuntu 16.04.3. Problem is not present on Kodi on Windows - the Play/Pause button works perfectly for me there.

On a separate note, for whatever reason the Kodi keymapping of the Home key takes you to the top of a list, instead of Kodi’s Home screen. I’ve been setting the button on the remote to go to the home screen as, in my head, that’s what makes sense for a Home button - in Keymap Editor that’s been Global>Windows>Open Home which then reads as 61576. The default function of the Home button not going to the Home screen has been present accross Linux and Windows testing. I’m not sure how you have this set for OSMC on Pi but it may be something you consider for a PC release.

The version of eventlircd you have used is ancient (from 2016). Support for the remote was only added in November 2017.

Try http://apt.osmc.tv/pool/main/a/amd64-eventlircd-osmc/amd64-eventlircd-osmc_1.2.8_amd64.deb or add these changes manually:


Used the link to install via wget and have cross-checked to confirm that the changes are written in. The remote now ONLY interacts with the system when the program it’s run with is started via terminal with the additional command (I get no response in Spotify/noise - this is not a problem for how i plan to use it though).

The Play/Pause and Stop buttons ARE working, however the Information, OK, Context Menu and Volume -/+ buttons have stopped working. The Home button now routes to the home screen, and the back and directional buttons work fine.

I noticed that this matches to the lines with have # at the beginning of the file osmc_rf2.evmap so I’ve tried editing in nano (“nano /etc/eventlircd.d/osmc_rf2.evmap”) to add and remove # to all of the lines to see if that makes any difference, restarting between - which was no in both instances.

This is because eventlircd is consuming the uinput events produced by the device.
Applications need to listen on the LIRC socket to receive events.

The commented lines are buttons that aren’t (and don’t need) to be remapped in OSMC.
Perhaps you have a different keyboard.xml to OSMC.

I didn’t need to change anything on my laptop with Ubuntu 16.04 for things to work as expected here.
Some debug logs might show what the buttons are being interpreted as.


Log output here: https://paste.ubuntu.com/26313165/

After I started up Kodi from terminal, I pressed each button repeatedly multiple times in the sequence: Home, Info, Direction (up, down, left, right), OK, Back, Context Menu, Play/Pause, Stop, Vol -, Vol +

I can try on a fresh installed OS using a spare hard drive if it’s possible my previous attempts at a fix have created confusion somewhere along the line.

Edit: I can run evtest later as well but I think we already know all that all the buttons are transmitting correctly.

Nothing obvious in logs from a quick skim.
Are you launching Kodi with the correct path to LIRC socket?

“/usr/bin/kodi --lircdev /var/run/lirc/lircd” is the command I’ve been using

On a fresh install of the OS and Kodi and it’s now working. I guess somewhere along the way my keymapping must have gone wonky. Next step is off to the eOS support to find out how to add the command so I can start Kodi with eventlirc from the dock. For now I’ve got it set to run the command at startup which isn’t ideal but more accessible than going into terminal every time I want to use Kodi, seeing as that’s the main function of this machine.

Thanks for all your time and help. I think part of my confusion along the way was that the post you linked to OSMC remote mapping on KodiBuntu has an outdated package for eventlirc, so with the up to date one you gave in post 14 I think after that it was just whatever I’d done previously was stopping it from running as it should.

Update: on the off chance anyone comes across this following a similar path, I created an icon for launching Kodi with remote support thanks to a prompt from the eOS stack exchange here launcher - Alter application icon to execute command? - elementary OS Stack Exchange which I think should work in general for Linux, or at least Ubuntu based versions of Linux?