Mythtv on Ubuntu 20.04 (edit: mostly ir-keytable/lirc issue)

For discussion of topics specific to MythTV on linux
nexzzt
Junior
Posts: 17
Joined: Wed Jun 18, 2014 3:58 am
Australia

Re: Mythtv on Ubuntu 20.04 (edit: mostly ir-keytable/lirc issue)

Post by nexzzt » Mon Jun 01, 2020 3:26 am

Ah OK, looks good to me. Moving on...

Lester_Burnham
Newcomer
Posts: 14
Joined: Sat Jun 14, 2014 7:50 am
Australia

Re: Mythtv on Ubuntu 20.04 (edit: mostly ir-keytable/lirc issue)

Post by Lester_Burnham » Mon Jun 01, 2020 4:19 am

wesnewell wrote:
Fri May 29, 2020 4:39 am
Did a fresh install of 20.04LTS and no luck with ir-keytable. While all the remote buttons work using ir-keytable -t, only a few work in apps. All 4 arrow keys and the Return key are the only ones that worked in app or CL iirc. Not sure why it doesn't work. More info here.
https://answers.launchpad.net/ubuntu/+question/690977

But no response yet. In the meantime, I've just switched to using mini wireless KB's.
Hi,

In 20.04 with ir-keytable I didn’t have to set a config file. (rc_maps.cfg) I remember years ago I needed a config as you have done, but not this time.
With mine I just had to copy the remote file from “sudo cp /lib/udev/rc_keymaps/rc6_mce.toml /etc/rc_keymaps/“ then modify the button presses to suit what key I wanted to see output. Need to reload config and restart the frontend to test from memory.
Maybe it’s something as simple as your old config is tripping it up.

Lester

wesnewell
Senior
Posts: 669
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: Mythtv on Ubuntu 20.04 (edit: mostly ir-keytable/lirc issue)

Post by wesnewell » Mon Jun 01, 2020 4:50 am

Could be. Problem is my remote uses my own codes that I uploaded to the remote. I've added an entry for it in /lib/udev/rc_keymaps/
wes@mythfe0:~$ ls /lib/udev/rc_keymaps/my*
/lib/udev/rc_keymaps/myremotes.toml
But I'm not sure it's in the right format yet. Been busy with something else and will get back to this later.
BE/FE-Asrock AB350 Pro Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.

Lester_Burnham
Newcomer
Posts: 14
Joined: Sat Jun 14, 2014 7:50 am
Australia

Re: Mythtv on Ubuntu 20.04 (edit: mostly ir-keytable/lirc issue)

Post by Lester_Burnham » Mon Jun 01, 2020 7:05 am

No worries.
What ever is in /etc/rc_keymaps/ is loaded by default, otherwise if you only have your remote config in /lib/udev/rc_keymaps/ you will need to tell it what to load. Which is what your config used to do.

You could try just copying your config to /etc/rc_keymaps/ and reload ir-keytable to see what happens.

My rc6_mce.toml has the likes of these codes in there. The scan code is very different to yours.
0x800f0408 = "KEY_8" #WAS KEY_NUMERIC_8
0x800f0409 = "KEY_9" #WAS KEY_NUMERIC_9
0x800f040a = "KEY_DELETE"
0x800f040b = "KEY_ENTER"
0x800f040c = "KEY_SLEEP"
0x800f040d = "KEY_M" #WAS KEY MEDIA

Good luck when you get around to it.
Lester

wesnewell
Senior
Posts: 669
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: Mythtv on Ubuntu 20.04 (edit: mostly ir-keytable/lirc issue)

Post by wesnewell » Wed Jun 03, 2020 7:38 pm

OK, finally took some time to look into this more and got it working in all apps and CL. Had to redo my rc-map file because the one from 18.04 wouldn't load properly and renamed it to *.toml. Once I did that, I had to manually load it. I also copied it to lib/udev/rc_keymaps dir and usr/lib/udev/rc_keymaps. I don't know if that's needed but... To get it to load automatically on boot, I had to make it the top entry in /etc/rc_maps.cfg.
Here's portions of that;

# Table to automatically load the rc maps for the bundled IR's provided with the
# devices supported by the linux kernel
mceusb * /etc/rc_keymaps/myremotes.toml

#driver table file
* rc-adstech-dvb-t-pci adstech_dvb_t_pci.toml

And here's the top of my map file.Note the equal signs and quotes. Also had to remove trailing comments from original.

[[protocols]]
name = "myremotes"
protocol = "nec"
variant = "nec"
[protocols.scancodes]
0x0f = "KEY_F12"
0x2b = "KEY_L"
0x29 = "KEY_T"
0x26 = "KEY_B"
0x21 = "KEY_COMMA"

Hope this gives you enough to get yours working.
BE/FE-Asrock AB350 Pro Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.

Lester_Burnham
Newcomer
Posts: 14
Joined: Sat Jun 14, 2014 7:50 am
Australia

Re: Mythtv on Ubuntu 20.04 (edit: mostly ir-keytable/lirc issue)

Post by Lester_Burnham » Thu Jun 04, 2020 9:26 am

Hi,

I see some smart cookie on the mailing list figured out the new lirc remote and blasting setup. I was interested in the remote part and it works well. I just needed to tweak the mythtv lircrc to match some remote buttons for an mceusb. Need to look at irexec Now to launch apps.

https://www.mythtv.org/wiki/FTDI_USB_IR ... using_LIRC

I’m fine with what I have now, but it’s good to have options.
Lester

nouglywires
Newcomer
Posts: 8
Joined: Sun Nov 23, 2014 7:17 pm
United States of America

Re: Mythtv on Ubuntu 20.04 (edit: mostly ir-keytable/lirc issue)

Post by nouglywires » Sat Oct 03, 2020 7:05 pm

Thanks for this thread, and thanks especially to wesnewell who got me pointed in the right direction. Here are the details of what i did to get my remote control working again with MythTV after upgrading from 18.04 to 20.04.1:
wesnewell wrote:
Wed Jun 03, 2020 7:38 pm
Had to redo my rc-map file because the one from 18.04 wouldn't load properly and renamed it to *.toml.
KEY_RETURN (the numpad Enter key) is no longer supported; I had to make that KEY_ENTER.

You must add sections for protocols and protocols.scancodes. Here's the new preamble in my /etc/rc_keymaps/rc6_mce.toml. The Debian manual page for ir-keytable lists some known protocols and variants:

Code: Select all

[[protocols]]
name = "myremotes"
protocol = "rc-6"
variant  = "rc-6-mce"
[protocols.scancodes]  
Previously, this simple format was supported:

Code: Select all

0x800f0412 KEY_PAGEUP
Now you must code

Code: Select all

0x800f0412 = "KEY_PAGEUP"
I ran sudo ir-keytable --write=/etc/rc_keymaps/rc6_mce.toml and lo! my remote control worked again.

I have only one copy of the file - /etc/rc_keymaps/rc6_mce.toml - and the first line of /etc/rc_maps.cfg points to it:

Code: Select all

mceusb * /etc/rc_keymaps/rc6_mce.toml
I hope someone finds this helpful.

Post Reply