Since 18.04 was introduced, there have been multiple posts regarding broken infrared lirc and evdev systems.
There is no definitive tutorial so I thought I'd do one after spending days trying to get my system sorted.
First of all ensure your ir receiver is recognised; install ir-keytable, which is in the repos, and enter just the command as root on it's own:
Code:
ir-keytable
You should get something similar to this:
Code:
root@linuxmint:/home/tony# ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event5) with:
Name: Media Center Ed. eHome Infrared Remote Transceiver (1784:0008)
Driver: mceusb, table: rc-rc6-mce
lirc device: /dev/lirc0
Supported protocols: other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp
Enabled protocols: lirc rc-6
bus: 3, vendor/product: 1784:0008, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms
Once you have established that the receiver is recognised, make a note of:
1) the event number -- mine is event5 -more on this later.**
2) the Driver: parameter -- mine is mceusb table: rc-rc6-mce
3) enabled protocols: mine is lirc rc-6
4) repeat delay and period -- mine is set to 500ms and 125ms respectively
At this point completely purge lirc and lircd.
Code:
apt-get purge lirc lircd
There are many places where lirc is lurking (ha) check them all, remove even the slightest traces from /etc, /lib, /usr and /home do not forget /root and /mythtv if you have it installed.
Once lirc is no longer lurking we can proceed to the next part, testing your button presses:
Code:
ir-keytable -t
root@linuxmint:/home/tony# ir-keytable -t
Testing events. Please, press CTRL-C to abort.
2870.160992: lirc protocol(rc6_mce): scancode = 0x800f0423 toggle=1
2870.161011: event type EV_MSC(0x04): scancode = 0x800f0423
2870.161011: event type EV_KEY(0x01) key_down: KEY_ESC(0x0001)
2870.161011: event type EV_SYN(0x00).
^[2870.264970: lirc protocol(rc6_mce): scancode = 0x800f0423 toggle=1
2870.264983: event type EV_MSC(0x04): scancode = 0x800f0423
2870.264983: event type EV_SYN(0x00).
2870.376989: lirc protocol(rc6_mce): scancode = 0x800f0423 toggle=1
2870.377005: event type EV_MSC(0x04): scancode = 0x800f0423
2870.377005: event type EV_SYN(0x00).
2870.508062: event type EV_KEY(0x01) key_up: KEY_ESC(0x0001)
2870.508062: event type EV_SYN(0x00).
2876.976840: lirc protocol(rc6_mce): scancode = 0x800f0426 toggle=1
2876.976863: event type EV_MSC(0x04): scancode = 0x800f0426
2876.976863: event type EV_KEY(0x01) key_down: KEY_S(0x001f)
2876.976863: event type EV_SYN(0x00).
s2877.080862: lirc protocol(rc6_mce): scancode = 0x800f0426 toggle=1
2877.080879: event type EV_MSC(0x04): scancode = 0x800f0426
2877.080879: event type EV_SYN(0x00).
2877.184866: lirc protocol(rc6_mce): scancode = 0x800f0426 toggle=1
2877.184882: event type EV_MSC(0x04): scancode = 0x800f0426
2877.184882: event type EV_SYN(0x00).
2877.316061: event type EV_KEY(0x01) key_up: KEY_S(0x001f)
2877.316061: event type EV_SYN(0x00).
Make a note of the names of the various buttons you want to remap to mythtv, I remapped my stop key to escape for instance.
I use Double Commander or Thunar to run a root gui file manager, KDE in their infinite stupidity crippled Dolphin.
(You could always just-)
Code:
cp /lib/udev/rc_keymaps/your-remote-here /etc/rc_keymaps/your-remote-here
Navigate to /lib/udev/rc_keymaps and find the keymapping for your remote. Copy this file to /etc/rc_keymaps and edit the file to remap the keys you require changed.
Don't forget to reload the evdev events:-
Code:
ir-keytable -c -w /etc/rc_keymaps/rc6_mce
That's it, you can play with mythtv's key mappings and the /etc/rc_keymaps/whatever-your-remote-is
file to suit your system.