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

For discussion of topics specific to MythTV on linux
wesnewell
Senior
Posts: 672
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: Mythtv on Ubuntu 20.04

Post by wesnewell » Tue Apr 14, 2020 5:36 pm

OK, forget mythtv for now. ir-keyteable has nothing to with mythtv. It simply turns the remote into a keyboard. Test it in a terminal, or other app like notes or mousepad. After you get it working you can then setup keys in mythtv that you want to use.
Make sure this is in front of all other driver entrys in /etc/rc_maps.cfg
nuvoton-cir * /etc/rc_keymaps/rc6_mce
Ahttps://forum.kodi.tv/showthread.php?tid=101151http://atterer.org/mythtv-xmbc-remote-control-without-lircnd that this is the first line in your keymap file.
# table *, type:rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp
If you have lirc loaded, remove it via cl or synaptic.
Now reboot.
Make sure the nuvoton-cir driver is loaded.
lsmod nuvoton-cir
In terminal, notes, whatever, push the number buttons on the remote. Do they show up? If they do, then it works. if not then open a terminal and run ir-keytable -t as root and start pushing remote buttons and see what you get.
Here are reference links I used to get mine working.
http://atterer.org/mythtv-xmbc-remote-c ... thout-lirc
https://madaboutbrighton.net/articles/2 ... -ir-keymap
https://forum.kodi.tv/showthread.php?tid=101151
BE/FE-Asrock AB350 Pro Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.

yawlhoo
Junior
Posts: 92
Joined: Wed Apr 15, 2015 4:18 pm
United States of America

Re: Mythtv on Ubuntu 20.04

Post by yawlhoo » Wed Apr 15, 2020 2:26 am

wesnewell, I appreciate your interest in this problem.

Files are set up as you suggest. sudo ir-keytable -t shows output for the number keys 0,1,...,9, identifying them as KEY_0, KEY_1, etc.

But there is no output shown at all in a desktop terminal, as well as Notes, and also an application called Mousepad.

yawlhoo
Junior
Posts: 92
Joined: Wed Apr 15, 2015 4:18 pm
United States of America

Re: Mythtv on Ubuntu 20.04

Post by yawlhoo » Wed Apr 15, 2020 6:24 am

I just quickly set up my 18.04 LTS mythtv frontend setup, in a different partition of the same system. I had been using lirc to control this.

With lirc temporarily shut down and ir-keytable and its config files in place, remote number key presses DO show up in the terminal.

Hence apparently there is some major change in remote handling between 18.04 and 20.04.

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

Re: Mythtv on Ubuntu 20.04

Post by wesnewell » Wed Apr 15, 2020 1:12 pm

I'll be upgrading to 20.04lts in a couple of weeks. Will let you know what happens. I know it's not a kernel problem as I've been running 5.4.28 for a while now.
BE/FE-Asrock AB350 Pro Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.

yawlhoo
Junior
Posts: 92
Joined: Wed Apr 15, 2015 4:18 pm
United States of America

(SOLVED) Re: Mythtv on Ubuntu 20.04

Post by yawlhoo » Thu Apr 16, 2020 1:56 am

I wish you luck. In the meantime, I have found a solution of sorts, I am using the lirc from Ubuntu xenial, a workaround explained here:

https://twosortoftechguys.wordpress.com ... ntu-18-04/

in lieu of ir-keytable. Kinda clunky, but it works!

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

Re: Mythtv on Ubuntu 20.04

Post by Lester_Burnham » Tue Apr 28, 2020 8:50 am

Hi All,

I’m interested in this thread also, as I’ve just done a fresh install of Xubuntu 20.04 & Mythtv 0.31
I was previously on Mythbuntu 14.04 & Mythtv 0.27 and didn’t feel like the pain of an upgrade in stepping stones from the old service system to systemd.

I’ve got it currently setup using ir-keytable with a mce rc6 remote, with a couple of changes to the number buttons and a few others etc., as is required to get them recognised in mythtv & kodi. It works ok, but still needs button mapping tweaks, but each tweak I make needs to work with Kodi as well. I’ve documented it here. (ir-keytable only installed, so you would probably need to purge lirc for it to work without interference) https://lester-burnham.id.au/xubuntu-20-04-mythtv-0-31/

Because of the above, I’d love to go back to the old lirc way of doing things with .lircrc in your home directory and the .lirc directory with the mythtv and other apps key binding files. (I really miss this part of Mythbuntu)
Don’t get excited, because I’m no coder! I’m a troubleshooter:)
Anyway, I’m about to install some old versions in a vm to see if I can follow the path of how this all works with lirc. I currently have a 20.04 vm install with lirc (no ir-keytable) installed and passing on devinput-32 events in irw, but I’m trying to work out the rest of the path mapped to applications. Currently looking at the lirc config tools.

I would love some help from the brainiacs in this community if possible.

Thanks,
Lester

yawlhoo
Junior
Posts: 92
Joined: Wed Apr 15, 2015 4:18 pm
United States of America

Re: Mythtv on Ubuntu 20.04

Post by yawlhoo » Tue Apr 28, 2020 2:50 pm

lirc functions well on my 20.04 frontend.

Have you regressed your lirc to the xenial version as outlined in the link in my post above? A crazy fix, but nevertheless, it works!

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

Re: Mythtv on Ubuntu 20.04

Post by Lester_Burnham » Wed Apr 29, 2020 12:45 am

yawlhoo wrote:
Tue Apr 28, 2020 2:50 pm
lirc functions well on my 20.04 frontend.

Have you regressed your lirc to the xenial version as outlined in the link in my post above? A crazy fix, but nevertheless, it works!
Hi,

I have done before.
This time I’m trying to go forward and understand how lirc’s links into different directory’s work.
So, I setup a mythbuntu 16.04 vm last night and today, I’ll upgrade it to 18.04 and probably break it then hopefully fix it again and I’ll hopefully be closer to the newer way they do things in lirc 1+

Installing lirc and getting it running using devinput was very simple. All that needed to be done was. The down side is I still haven't worked out how to tweak the file for button names. I edited it in /etc/lirc/lircd.conf.d/devinput.lircd.conf and restarted, but no change.
$ sudo apt-get install lirc lirc-compat-remotes
It will error out, but add the files you need.
$ sudo cp /etc/lirc/lirc_options.conf.dist /etc/lirc/lirc_options.conf
$ sudo cp /etc/lirc/lircd.conf.dist /etc/lirc/lircd.conf
Then install again to tidy up and it will complete this time.
$ sudo apt-get install lirc lirc-compat-remotes
Then restart lircd service and check it
$ sudo systemctl restart lircd.service
$ sudo systemctl status lircd.service

I'm off to play again. Just thought I'd add the above, because there is so much confusion around the internet with lirc.

Lester

wesnewell
Senior
Posts: 672
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 » 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.
BE/FE-Asrock AB350 Pro Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.

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 » Fri May 29, 2020 5:21 am

Apologies if this has already been covered, I did a quick scan of this thread and didn't see a mention of it but I might have missed it. I had the exact same issue as you. The directional and enter/returned remote buttons worked, but nothing else. I found on a page somewhere, that the ASCII code for the key you are assigning the remote buttons to must be below 256, otherwise X ignores them. That's why all my buttons worked via the command line ir-keytable -t, and only my directional /return buttons worked (less than 256) but nothing else did (above 256) in MythTV.

Also when testing with MythTV, if you make a keytable change while MythFrontend is open, you have to close and reopen the MythFrontend to pick up the changes.

Ben

wesnewell
Senior
Posts: 672
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 » Fri May 29, 2020 4:33 pm

Not following this. Standard ascii codes are 0-127, and extended codes are 128-255. So all numbers and letters are below 128. Something else must be causing the problem. I mean it worked fine in all previous version up until 20.04LTS. Don't remember exactly when I switched from lirc to ir-keytable but it was a long time ago. Think I was running 16.04 mythbuntu.
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 » Sat May 30, 2020 7:41 am

Hi,
I remember reading about the codes above 256 that weren’t recognised to do with X. I have no lirc installed at all, as I’m just using ir-keytable with mythfrontend only, so I don’t need the hassle.

I hate it that I can’t understand the black art of lirc!
My guess with the keys working before with lirc, would maybe be to do with the re-mapping of the scancodes from ir-keytable to lirc? Maybe lirc takes control of the codes and X has nothing to do with it?

I’d love to know how to setup irexec, lircrc and lirc again like how it used to be in Mythbuntu 14.04!

Lester

yawlhoo
Junior
Posts: 92
Joined: Wed Apr 15, 2015 4:18 pm
United States of America

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

Post by yawlhoo » Sat May 30, 2020 2:57 pm

Lester_Burnham wrote:

"I’d love to know how to setup irexec, lircrc and lirc again like how it used to be in Mythbuntu 14.04!"

I don't know whether lirc is set up like 14.04, but it is certainly like 18:04, using the guide at:

https://twosortoftechguys.wordpress.com ... ntu-18-04/

I have been using lirc on 20.04 for some time and it works very well!

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 » Sun May 31, 2020 12:13 am

wesnewell wrote:
Fri May 29, 2020 4:33 pm
Not following this. Standard ascii codes are 0-127, and extended codes are 128-255. So all numbers and letters are below 128. Something else must be causing the problem. I mean it worked fine in all previous version up until 20.04LTS. Don't remember exactly when I switched from lirc to ir-keytable but it was a long time ago. Think I was running 16.04 mythbuntu.
So are you saying you've changed the keytable to make sure all remote buttons are outputting standard keyboard keys rather than things like KEY_TV or KEY_EPG?

You are right regarding the standard keys on a keyboard, but a lot of the buttons on an IR remote are for things like KEY_BLUE, which by default in the keytables that come with ir-keytable outputs key with an ASCII code higher than 256. If you run ir-keytable -t, press some buttons that don't work in Mythfrontend or X, then convert the hex key code to decimal, you should find it's greater than 256 (that's what I found during my testing).

The fix for me, using the KEY_BLUE example, was to change the keytable so that when I press the IR remote blue button, it outputs KEY_F13 (0x800f045e = "KEY_F13") which has a code of 105. This made it work in X when I tested it with xev . I then used the key mapper in Mythfrontend to make that button do what I wanted it to do.

Ben

wesnewell
Senior
Posts: 672
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 » Sun May 31, 2020 4:36 am

All I use is standard codes. They are here.
viewtopic.php?f=3&t=2977#p14390
BE/FE-Asrock AB350 Pro Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.

Post Reply