Mailing List Archive

Fix for broken lirc package in Ubuntu 20.04
As it was in Ubuntu 18.04, so it is in 20.04 - the lirc package is
still broken. The underlying lirc code is working, so you can
manually configure it if you know how to do that. But even there, the
Python parts of lirc are now a little out of date and are producing
deprecation warnings. They are still working for now, but as Python
gets upgraded they will eventually stop working unless fixes are done.
In the mean time, the deprecation warning messages can safely be
ignored. And only the core configuration code actually works - for
example, the Info button will pop up a link to the wrong place for the
info files.

I have updated my fix script for 18.04 to work with 20.04. It is on
my web server here:

http://www.jsw.gen.nz/mythtv/lirc-ubuntu-20.04-install.sh

The script for fixing the lirc package in 18.04 is here, should anyone
still need it:

http://www.jsw.gen.nz/mythtv/lirc-ubuntu-18.04-install.sh

The script will download the source package for lirc and compile it in
order to create the missing *.so file - so it will take a while and
create a lot of screen output doing that. It cleans up all of that
when it finishes. Once it has been run, you should be able to run
lirc-setup (using sudo) and configure lirc.

I think it may be possible that if you upgrade an existing working
18.04 lirc configuration, it will still work in 20.04. But I have not
tried that. And if you needed to reconfigure lirc at some point, the
Python tools would not work. So I think it is best to run my script
after upgrading. Please note that my script stops and disables all
the lirc systemd services except for those needed for running lircd,
as they can do various bad things if they are running with the (bad)
default configurations. If you are using any of the other services
(irexec.service, lircd-uinput.service or lircmd.service) and have
given them valid configurations, then you will need to re-enable and
restart them after the script finishes:

sudo systemctl enable <service name>
sudo systemctl start <service name>

As yet I do not have a real 20.04 system running, as I am waiting for
20.04.1 so that I can do the LTS upgrade from 18.04. I created my
updated script using a fresh install of Xubuntu 20.04 in a VirtualBox
VM. One volunteer has tested it for me on a real 20.04 with IR
hardware attached - I would like to thank John Burroughs for helping
do that. But it is still possible that there may be undiscovered
problems with the script. So if you have problems, please let me
know.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
Hi Stephen,

I've finally just upgraded from 18.04 to 20.04. I've run your helpful
script to install and fix the lirc packages.
I ran lirc-setup and successfully selected my IR receiver and remote type
(mceusb).
Following, I copied the lirc_options.conf to /etc/lirc and verified the
mceusb.lirc.conf file was in ~/lirc-setup.conf.d
Finally, I copied my working lircrc file from ~/.mythtv/ in my 18.04 to the
new 20.04 installation.

I can run irw and see that all of the remote buttons are properly received.
I do sudo systemctl status lircd-dev.service and see that it has run
successfully to create the softlink for /dev/lircd
I checked that /dev/lircd is what is specified in the mythfrontend setup.
However, Mythfrontend does not respond to the remote input. Can you think
of anything I might be missing?

Thanks,
Steve

On Tue, Jun 30, 2020 at 4:17 AM Stephen Worthington <
stephen_agent@jsw.gen.nz> wrote:

> As it was in Ubuntu 18.04, so it is in 20.04 - the lirc package is
> still broken. The underlying lirc code is working, so you can
> manually configure it if you know how to do that. But even there, the
> Python parts of lirc are now a little out of date and are producing
> deprecation warnings. They are still working for now, but as Python
> gets upgraded they will eventually stop working unless fixes are done.
> In the mean time, the deprecation warning messages can safely be
> ignored. And only the core configuration code actually works - for
> example, the Info button will pop up a link to the wrong place for the
> info files.
>
> I have updated my fix script for 18.04 to work with 20.04. It is on
> my web server here:
>
> http://www.jsw.gen.nz/mythtv/lirc-ubuntu-20.04-install.sh
>
> The script for fixing the lirc package in 18.04 is here, should anyone
> still need it:
>
> http://www.jsw.gen.nz/mythtv/lirc-ubuntu-18.04-install.sh
>
> The script will download the source package for lirc and compile it in
> order to create the missing *.so file - so it will take a while and
> create a lot of screen output doing that. It cleans up all of that
> when it finishes. Once it has been run, you should be able to run
> lirc-setup (using sudo) and configure lirc.
>
> I think it may be possible that if you upgrade an existing working
> 18.04 lirc configuration, it will still work in 20.04. But I have not
> tried that. And if you needed to reconfigure lirc at some point, the
> Python tools would not work. So I think it is best to run my script
> after upgrading. Please note that my script stops and disables all
> the lirc systemd services except for those needed for running lircd,
> as they can do various bad things if they are running with the (bad)
> default configurations. If you are using any of the other services
> (irexec.service, lircd-uinput.service or lircmd.service) and have
> given them valid configurations, then you will need to re-enable and
> restart them after the script finishes:
>
> sudo systemctl enable <service name>
> sudo systemctl start <service name>
>
> As yet I do not have a real 20.04 system running, as I am waiting for
> 20.04.1 so that I can do the LTS upgrade from 18.04. I created my
> updated script using a fresh install of Xubuntu 20.04 in a VirtualBox
> VM. One volunteer has tested it for me on a real 20.04 with IR
> hardware attached - I would like to thank John Burroughs for helping
> do that. But it is still possible that there may be undiscovered
> problems with the script. So if you have problems, please let me
> know.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>


--
________________________
"destroying the fundamental underpinnings of the broadcast television
ecosystem"
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
On Sun, 7 Nov 2021 18:03:43 -0800, you wrote:

>Hi Stephen,
>
>I've finally just upgraded from 18.04 to 20.04. I've run your helpful
>script to install and fix the lirc packages.
>I ran lirc-setup and successfully selected my IR receiver and remote type
>(mceusb).
>Following, I copied the lirc_options.conf to /etc/lirc and verified the
>mceusb.lirc.conf file was in ~/lirc-setup.conf.d
>Finally, I copied my working lircrc file from ~/.mythtv/ in my 18.04 to the
>new 20.04 installation.
>
>I can run irw and see that all of the remote buttons are properly received.
>I do sudo systemctl status lircd-dev.service and see that it has run
>successfully to create the softlink for /dev/lircd
>I checked that /dev/lircd is what is specified in the mythfrontend setup.
>However, Mythfrontend does not respond to the remote input. Can you think
>of anything I might be missing?
>
>Thanks,
>Steve

So this is not actually an upgrade in place - you are installing on a
new 20.04 system by copying from a working 18.04 on another PC - is
that right? If you were upgrading in place, it should have been
working immediately after running my script.

As irw is working, the lirc side of things is likely to be all good,
so it is the mythfrontend side that is not working yet. To check
that, shut down mythfrontend and run:

ircat mythtv

as your normal user (not as root).

The "mythtv" there is the name that all MythTV programs provide to
lirc when connecting to it, and is the same "mythtv" string that
should be in your $(HOME)/.lirc/mythtv file in the "prog =" lines:

begin
remote = devinput
prog = mythtv
button = KEY_EXIT
config = Escape
repeat = 0
delay = 0
end

So for the above, when you use the Back button on your MCE remote, it
will produce KEY_EXIT in irw, and lirc will translate that to "Escape"
and that is what "ircat mythtv" should then display. If that is not
working, then check that you have copied your $(HOME)/.lirc directory
to the new PC. Lirc capable programs load their lirc configuration by
loading $(HOME/.lircrc, and in a MythTV created .lircrc, all you will
find is a set of includes for files in $(HOME)/.lirc, which all need
to be there.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
Hi Stephen,

I’ve recently set up a new front end with Ubuntu 21.10 does your script work with that, or do you have a manual set of steps to set up lira?

Regards,
Dave

Sent from my iPad

> On 8 Nov 2021, at 08:54, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>
> ?On Sun, 7 Nov 2021 18:03:43 -0800, you wrote:
>
>> Hi Stephen,
>>
>> I've finally just upgraded from 18.04 to 20.04. I've run your helpful
>> script to install and fix the lirc packages.
>> I ran lirc-setup and successfully selected my IR receiver and remote type
>> (mceusb).
>> Following, I copied the lirc_options.conf to /etc/lirc and verified the
>> mceusb.lirc.conf file was in ~/lirc-setup.conf.d
>> Finally, I copied my working lircrc file from ~/.mythtv/ in my 18.04 to the
>> new 20.04 installation.
>>
>> I can run irw and see that all of the remote buttons are properly received.
>> I do sudo systemctl status lircd-dev.service and see that it has run
>> successfully to create the softlink for /dev/lircd
>> I checked that /dev/lircd is what is specified in the mythfrontend setup.
>> However, Mythfrontend does not respond to the remote input. Can you think
>> of anything I might be missing?
>>
>> Thanks,
>> Steve
>
> So this is not actually an upgrade in place - you are installing on a
> new 20.04 system by copying from a working 18.04 on another PC - is
> that right? If you were upgrading in place, it should have been
> working immediately after running my script.
>
> As irw is working, the lirc side of things is likely to be all good,
> so it is the mythfrontend side that is not working yet. To check
> that, shut down mythfrontend and run:
>
> ircat mythtv
>
> as your normal user (not as root).
>
> The "mythtv" there is the name that all MythTV programs provide to
> lirc when connecting to it, and is the same "mythtv" string that
> should be in your $(HOME)/.lirc/mythtv file in the "prog =" lines:
>
> begin
> remote = devinput
> prog = mythtv
> button = KEY_EXIT
> config = Escape
> repeat = 0
> delay = 0
> end
>
> So for the above, when you use the Back button on your MCE remote, it
> will produce KEY_EXIT in irw, and lirc will translate that to "Escape"
> and that is what "ircat mythtv" should then display. If that is not
> working, then check that you have copied your $(HOME)/.lirc directory
> to the new PC. Lirc capable programs load their lirc configuration by
> loading $(HOME/.lircrc, and in a MythTV created .lircrc, all you will
> find is a set of includes for files in $(HOME)/.lirc, which all need
> to be there.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
On Mon, 8 Nov 2021 12:46:49 +0000, you wrote:

>Hi Stephen,
>
>I?ve recently set up a new front end with Ubuntu 21.10 does your script work with that, or do you have a manual set of steps to set up lira?
>
>Regards,
>Dave

I had to make adjustments to the script between 18.04 and 20.04, so
unfortunately it is likely there would need to be some changes for
21.10. If we are really lucky the packager might have actually fixed
the packaging problems and the script will be largely unnecessary, but
I would have to try it out to see. I will see if I can find time in
the next day or so to have a look.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
On Tue, 09 Nov 2021 01:57:54 +1300, you wrote:

>On Mon, 8 Nov 2021 12:46:49 +0000, you wrote:
>
>>Hi Stephen,
>>
>>I?ve recently set up a new front end with Ubuntu 21.10 does your script work with that, or do you have a manual set of steps to set up lira?
>>
>>Regards,
>>Dave
>
>I had to make adjustments to the script between 18.04 and 20.04, so
>unfortunately it is likely there would need to be some changes for
>21.10. If we are really lucky the packager might have actually fixed
>the packaging problems and the script will be largely unnecessary, but
>I would have to try it out to see. I will see if I can find time in
>the next day or so to have a look.

So I have now tried installing lirc on a 21.10 VirtualBox machine and
it still has the packaging bug were a .so file is missing. I will
need to create a new version of my script to fix this. It will likely
not be too different from the 20.04 script, so it should not take too
long.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
> On 9 Nov 2021, at 09:36, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>
> ?On Tue, 09 Nov 2021 01:57:54 +1300, you wrote:
>
>>> On Mon, 8 Nov 2021 12:46:49 +0000, you wrote:
>>>
>>> Hi Stephen,
>>>
>>> I’ve recently set up a new front end with Ubuntu 21.10 does your script work with that, or do you have a manual set of steps to set up lira?
>>>
>>> Regards,
>>> Dave
>>
>> I had to make adjustments to the script between 18.04 and 20.04, so
>> unfortunately it is likely there would need to be some changes for
>> 21.10. If we are really lucky the packager might have actually fixed
>> the packaging problems and the script will be largely unnecessary, but
>> I would have to try it out to see. I will see if I can find time in
>> the next day or so to have a look.
>
> So I have now tried installing lirc on a 21.10 VirtualBox machine and
> it still has the packaging bug were a .so file is missing. I will
> need to create a new version of my script to fix this. It will likely
> not be too different from the 20.04 script, so it should not take too
> long.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

Thanks Stephen,

That would be great

Regards,
Dave
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
On 09/11/2021 09:36, Stephen Worthington wrote:

> On Tue, 09 Nov 2021 01:57:54 +1300, you wrote:
>
>> On Mon, 8 Nov 2021 12:46:49 +0000, you wrote:
>>
>>> Hi Stephen,
>>>
>>> I’ve recently set up a new front end with Ubuntu 21.10 does your script work with that, or do you have a manual set of steps to set up lira?
>>>
>>> Regards,
>>> Dave
>> I had to make adjustments to the script between 18.04 and 20.04, so
>> unfortunately it is likely there would need to be some changes for
>> 21.10. If we are really lucky the packager might have actually fixed
>> the packaging problems and the script will be largely unnecessary, but
>> I would have to try it out to see. I will see if I can find time in
>> the next day or so to have a look.
> So I have now tried installing lirc on a 21.10 VirtualBox machine and
> it still has the packaging bug were a .so file is missing. I will
> need to create a new version of my script to fix this. It will likely
> not be too different from the 20.04 script, so it should not take too
> long.


Are the Ubuntu lirc package maintainers aware of this problem?


Paul H.

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
On Tue, 9 Nov 2021 12:15:42 +0000, you wrote:

>Thanks Stephen,
>
>That would be great
>
>Regards,
>Dave

The script for Ubuntu 21.10 is here:

http://www.jsw.gen.nz/mythtv/lirc-ubuntu-21.10-install.sh

The only change from the 20.04 version is a slightly different
download location for the lirc source code. I have tested this in a
VirtualBox virtual machine where I set up mythfrontend only and
connected it to my main MythTV box. I was using a Pinnacle PCTV 73e
USB DVB-T tuner as my IR device, and a Hauppague RC5 remote.

Once you get lirc working with the script, there are still quite a few
steps to get it working with mythfrontend, such as getting the right
.lircrc files and making mythfrontend find them. So what sort of
remote are you using?
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
> On 11 Nov 2021, at 10:12, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>
> ?On Tue, 9 Nov 2021 12:15:42 +0000, you wrote:
>
>> Thanks Stephen,
>>
>> That would be great
>>
>> Regards,
>> Dave
>
> The script for Ubuntu 21.10 is here:
>
> http://www.jsw.gen.nz/mythtv/lirc-ubuntu-21.10-install.sh
>
> The only change from the 20.04 version is a slightly different
> download location for the lirc source code. I have tested this in a
> VirtualBox virtual machine where I set up mythfrontend only and
> connected it to my main MythTV box. I was using a Pinnacle PCTV 73e
> USB DVB-T tuner as my IR device, and a Hauppague RC5 remote.
>
> Once you get lirc working with the script, there are still quite a few
> steps to get it working with mythfrontend, such as getting the right
> .lircrc files and making mythfrontend find them. So what sort of
> remote are you using?
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

Thanks Stephen,

The script worked fine and I’m getting the correct responses in irw now, just need to get the lord file in the right place for mythfrontend to use it. I have a file that worked for my Hauppauge MCE remote before, so I should be able to use it here, but I cannot remember exactly where it needed to be.

Regards,
Dave
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
On Thu, 11 Nov 2021 12:54:06 +0000, you wrote:

>
>> On 11 Nov 2021, at 10:12, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>>
>> ?On Tue, 9 Nov 2021 12:15:42 +0000, you wrote:
>>
>>> Thanks Stephen,
>>>
>>> That would be great
>>>
>>> Regards,
>>> Dave
>>
>> The script for Ubuntu 21.10 is here:
>>
>> http://www.jsw.gen.nz/mythtv/lirc-ubuntu-21.10-install.sh
>>
>> The only change from the 20.04 version is a slightly different
>> download location for the lirc source code. I have tested this in a
>> VirtualBox virtual machine where I set up mythfrontend only and
>> connected it to my main MythTV box. I was using a Pinnacle PCTV 73e
>> USB DVB-T tuner as my IR device, and a Hauppague RC5 remote.
>>
>> Once you get lirc working with the script, there are still quite a few
>> steps to get it working with mythfrontend, such as getting the right
>> .lircrc files and making mythfrontend find them. So what sort of
>> remote are you using?

>Thanks Stephen,
>
>The script worked fine and I?m getting the correct responses in irw now, just need to get the lord file in the right place for mythfrontend to use it. I have a file that worked for my Hauppauge MCE remote before, so I should be able to use it here, but I cannot remember exactly where it needed to be.
>
>Regards,
>Dave

You need a $(HOME)/.lircrc file which contains includes that point to
the files in $(HOME)/.lirc. There is normally a mythtv file in .lirc
where all the MythTV settings are, and another file for each program
that is using lirc (eg mplayer). Here is mine:

root@mypvr:/home/stephen# cat .lircrc
#Custom lircrc generated via mythbuntu-lirc-generator
#All application specific lircrc files are within ~/.lirc
include ~/.lirc/mythtv
include ~/.lirc/mplayer
include ~/.lirc/xine
include ~/.lirc/vlc
include ~/.lirc/xmame
include ~/.lirc/xmess
include ~/.lirc/totem
include ~/.lirc/elisa
include ~/.lirc/irexec

Then you need a link to the .lircrc file from $(HOME)/.mythtv/lircrc
(no . in this case), which is where MythTV programs find their lirc
configuration. So do this:

cd $(HOME)/.mythtv
ln -s ../.lircrc lircrc

In the $(HOME/.lirc/mythtv file, the remote= lines must use the same
name as the remote name in the file you have in
/etc/lirc/lircd.conf.d. In my case for my MCE remote, the file is
devinput.lircd.conf and I had to modify it as it the remote in that
file that lirc was using was named "devinput-32", but my
$(HOME)/.lirc/mythtv file was using "remote=devinput". Rather than
changing all the "remote=" lines, I just changed the
devinput.lircd.conf "name devinput-32" line to "name devinput". You
need to restart lirc after making a change to that file:

sudo systemctl restart lircd
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
-----Original message-----
From: Stephen Worthington <stephen_agent@jsw.gen.nz>
Sent: Thursday 11th November 2021 13:50
To: Discussion about MythTV <mythtv-users@mythtv.org>
Subject: Re: [mythtv-users] Fix for broken lirc package in Ubuntu 20.04


On Thu, 11 Nov 2021 12:54:06 +0000, you wrote:

>
>> On 11 Nov 2021, at 10:12, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>>
>> ?On Tue, 9 Nov 2021 12:15:42 +0000, you wrote:
>>
>>> Thanks Stephen,
>>>
>>> That would be great
>>>
>>> Regards,
>>> Dave
>>
>> The script for Ubuntu 21.10 is here:
>>
>> http://www.jsw.gen.nz/mythtv/lirc-ubuntu-21.10-install.sh
>>
>> The only change from the 20.04 version is a slightly different
>> download location for the lirc source code. I have tested this in a
>> VirtualBox virtual machine where I set up mythfrontend only and
>> connected it to my main MythTV box. I was using a Pinnacle PCTV 73e
>> USB DVB-T tuner as my IR device, and a Hauppague RC5 remote.
>>
>> Once you get lirc working with the script, there are still quite a few
>> steps to get it working with mythfrontend, such as getting the right
>> .lircrc files and making mythfrontend find them. So what sort of
>> remote are you using?

>Thanks Stephen,
>
>The script worked fine and I?m getting the correct responses in irw now, just need to get the lord file in the right place for mythfrontend to use it. I have a file that worked for my Hauppauge MCE remote before, so I should be able to use it here, but I cannot remember exactly where it needed to be.
>
>Regards,
>Dave

You need a $(HOME)/.lircrc file which contains includes that point to
the files in $(HOME)/.lirc. There is normally a mythtv file in .lirc
where all the MythTV settings are, and another file for each program
that is using lirc (eg mplayer). Here is mine:

root@mypvr:/home/stephen# cat .lircrc
#Custom lircrc generated via mythbuntu-lirc-generator
#All application specific lircrc files are within ˜/.lirc
include ˜/.lirc/mythtv
include ˜/.lirc/mplayer
include ˜/.lirc/xine
include ˜/.lirc/vlc
include ˜/.lirc/xmame
include ˜/.lirc/xmess
include ˜/.lirc/totem
include ˜/.lirc/elisa
include ˜/.lirc/irexec

Then you need a link to the .lircrc file from $(HOME)/.mythtv/lircrc
(no . in this case), which is where MythTV programs find their lirc
configuration. So do this:

cd $(HOME)/.mythtv
ln -s ../.lircrc lircrc

In the $(HOME/.lirc/mythtv file, the remote= lines must use the same
name as the remote name in the file you have in
/etc/lirc/lircd.conf.d. In my case for my MCE remote, the file is
devinput.lircd.conf and I had to modify it as it the remote in that
file that lirc was using was named "devinput-32", but my
$(HOME)/.lirc/mythtv file was using "remote=devinput". Rather than
changing all the "remote=" lines, I just changed the
devinput.lircd.conf "name devinput-32" line to "name devinput". You
need to restart lirc after making a change to that file:

sudo systemctl restart lircd
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org



Hi Stephen,



Thanks for the advice, unfortunately I must be missing something as my Myth Frontend doesn't respond to the config file. I do recall that I had a lot of trouble getting it to work on my previous frontend, but I will get there.



Regards,

Dave.
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
On Fri, 12 Nov 2021 14:57:44 +0000, you wrote:

>-----Original message-----
>From: Stephen Worthington?<stephen_agent@jsw.gen.nz>
>Sent: Thursday 11th November 2021 13:50
>To: Discussion about MythTV <mythtv-users@mythtv.org>
>Subject: Re: [mythtv-users] Fix for broken lirc package in Ubuntu 20.04
>
>
>On Thu, 11 Nov 2021 12:54:06 +0000, you wrote:
>
>>
>>> On 11 Nov 2021, at 10:12, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>>>
>>> ?On Tue, 9 Nov 2021 12:15:42 +0000, you wrote:
>>>
>>>> Thanks Stephen,
>>>>
>>>> That would be great
>>>>
>>>> Regards,
>>>> Dave
>>>
>>> The script for Ubuntu 21.10 is here:
>>>
>>> http://www.jsw.gen.nz/mythtv/lirc-ubuntu-21.10-install.sh
>>>
>>> The only change from the 20.04 version is a slightly different
>>> download location for the lirc source code. I have tested this in a
>>> VirtualBox virtual machine where I set up mythfrontend only and
>>> connected it to my main MythTV box. I was using a Pinnacle PCTV 73e
>>> USB DVB-T tuner as my IR device, and a Hauppague RC5 remote.
>>>
>>> Once you get lirc working with the script, there are still quite a few
>>> steps to get it working with mythfrontend, such as getting the right
>>> .lircrc files and making mythfrontend find them. So what sort of
>>> remote are you using?
>
>>Thanks Stephen,
>>
>>The script worked fine and I?m getting the correct responses in irw now, just need to get the lord file in the right place for mythfrontend to use it. I have a file that worked for my Hauppauge MCE remote before, so I should be able to use it here, but I cannot remember exactly where it needed to be.
>>
>>Regards,
>>Dave
>
>You need a $(HOME)/.lircrc file which contains includes that point to
>the files in $(HOME)/.lirc. There is normally a mythtv file in .lirc
>where all the MythTV settings are, and another file for each program
>that is using lirc (eg mplayer). Here is mine:
>
>root@mypvr:/home/stephen# cat .lircrc
>#Custom lircrc generated via mythbuntu-lirc-generator
>#All application specific lircrc files are within ?/.lirc
>include ?/.lirc/mythtv
>include ?/.lirc/mplayer
>include ?/.lirc/xine
>include ?/.lirc/vlc
>include ?/.lirc/xmame
>include ?/.lirc/xmess
>include ?/.lirc/totem
>include ?/.lirc/elisa
>include ?/.lirc/irexec
>
>Then you need a link to the .lircrc file from $(HOME)/.mythtv/lircrc
>(no . in this case), which is where MythTV programs find their lirc
>configuration. So do this:
>
>cd $(HOME)/.mythtv
>ln -s ../.lircrc lircrc
>
>In the $(HOME/.lirc/mythtv file, the remote= lines must use the same
>name as the remote name in the file you have in
>/etc/lirc/lircd.conf.d. In my case for my MCE remote, the file is
>devinput.lircd.conf and I had to modify it as it the remote in that
>file that lirc was using was named "devinput-32", but my
>$(HOME)/.lirc/mythtv file was using "remote=devinput". Rather than
>changing all the "remote=" lines, I just changed the
>devinput.lircd.conf "name devinput-32" line to "name devinput". You
>need to restart lirc after making a change to that file:
>
>sudo systemctl restart lircd

>
>Hi Stephen,
>
>
>
>Thanks for the advice, unfortunately I must be missing something as my Myth Frontend doesn't respond to the config file. I do recall that I had a lot of trouble getting it to work on my previous frontend, but I will get there.
>
>
>
>Regards,
>
>Dave.

If mythfrontend is successfully connecting to lirc, you should get a
line in mythfrontend.log that looks like this:

Nov 9 00:20:34 mypvr mythfrontend.real: mythfrontend[3023969]: I
CoreContext lirc.cpp:310 (Init) LIRC: Successfully initialized
'/dev/lircd' using '/home/stephen/.mythtv/lircrc' config

So if you do this command:

grep -i lirc /var/log/mythtv/mythfrontend.log

what do you see?
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
> On 12 Nov 2021, at 16:49, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>
> ?On Fri, 12 Nov 2021 14:57:44 +0000, you wrote:
>
>> -----Original message-----
>> From: Stephen Worthington <stephen_agent@jsw.gen.nz>
>> Sent: Thursday 11th November 2021 13:50
>> To: Discussion about MythTV <mythtv-users@mythtv.org>
>> Subject: Re: [mythtv-users] Fix for broken lirc package in Ubuntu 20.04
>>
>>
>>> On Thu, 11 Nov 2021 12:54:06 +0000, you wrote:
>>>
>>>
>>>> On 11 Nov 2021, at 10:12, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>>>>
>>>> ?On Tue, 9 Nov 2021 12:15:42 +0000, you wrote:
>>>>
>>>>> Thanks Stephen,
>>>>>
>>>>> That would be great
>>>>>
>>>>> Regards,
>>>>> Dave
>>>>
>>>> The script for Ubuntu 21.10 is here:
>>>>
>>>> http://www.jsw.gen.nz/mythtv/lirc-ubuntu-21.10-install.sh
>>>>
>>>> The only change from the 20.04 version is a slightly different
>>>> download location for the lirc source code. I have tested this in a
>>>> VirtualBox virtual machine where I set up mythfrontend only and
>>>> connected it to my main MythTV box. I was using a Pinnacle PCTV 73e
>>>> USB DVB-T tuner as my IR device, and a Hauppague RC5 remote.
>>>>
>>>> Once you get lirc working with the script, there are still quite a few
>>>> steps to get it working with mythfrontend, such as getting the right
>>>> .lircrc files and making mythfrontend find them. So what sort of
>>>> remote are you using?
>>
>>> Thanks Stephen,
>>>
>>> The script worked fine and I?m getting the correct responses in irw now, just need to get the lord file in the right place for mythfrontend to use it. I have a file that worked for my Hauppauge MCE remote before, so I should be able to use it here, but I cannot remember exactly where it needed to be.
>>>
>>> Regards,
>>> Dave
>>
>> You need a $(HOME)/.lircrc file which contains includes that point to
>> the files in $(HOME)/.lirc. There is normally a mythtv file in .lirc
>> where all the MythTV settings are, and another file for each program
>> that is using lirc (eg mplayer). Here is mine:
>>
>> root@mypvr:/home/stephen# cat .lircrc
>> #Custom lircrc generated via mythbuntu-lirc-generator
>> #All application specific lircrc files are within ˜/.lirc
>> include ˜/.lirc/mythtv
>> include ˜/.lirc/mplayer
>> include ˜/.lirc/xine
>> include ˜/.lirc/vlc
>> include ˜/.lirc/xmame
>> include ˜/.lirc/xmess
>> include ˜/.lirc/totem
>> include ˜/.lirc/elisa
>> include ˜/.lirc/irexec
>>
>> Then you need a link to the .lircrc file from $(HOME)/.mythtv/lircrc
>> (no . in this case), which is where MythTV programs find their lirc
>> configuration. So do this:
>>
>> cd $(HOME)/.mythtv
>> ln -s ../.lircrc lircrc
>>
>> In the $(HOME/.lirc/mythtv file, the remote= lines must use the same
>> name as the remote name in the file you have in
>> /etc/lirc/lircd.conf.d. In my case for my MCE remote, the file is
>> devinput.lircd.conf and I had to modify it as it the remote in that
>> file that lirc was using was named "devinput-32", but my
>> $(HOME)/.lirc/mythtv file was using "remote=devinput". Rather than
>> changing all the "remote=" lines, I just changed the
>> devinput.lircd.conf "name devinput-32" line to "name devinput". You
>> need to restart lirc after making a change to that file:
>>
>> sudo systemctl restart lircd
>
>>
>> Hi Stephen,
>>
>>
>>
>> Thanks for the advice, unfortunately I must be missing something as my Myth Frontend doesn't respond to the config file. I do recall that I had a lot of trouble getting it to work on my previous frontend, but I will get there.
>>
>>
>>
>> Regards,
>>
>> Dave.
>
> If mythfrontend is successfully connecting to lirc, you should get a
> line in mythfrontend.log that looks like this:
>
> Nov 9 00:20:34 mypvr mythfrontend.real: mythfrontend[3023969]: I
> CoreContext lirc.cpp:310 (Init) LIRC: Successfully initialized
> '/dev/lircd' using '/home/stephen/.mythtv/lircrc' config
>
> So if you do this command:
>
> grep -i lirc /var/log/mythtv/mythfrontend.log
>
> what do you see?
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

Hi Stephen,

We’ll this is an unexpected result:

Nov 12 16:05:31 giga01 mythfrontend.real: mythfrontend[1646]: E CoreContext lirc.cpp:233 (Init) LIRC: Failed to parse IP address ''

I’m not really sure why it would be using an IP address?

Regards,
Dave
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
On Fri, 12 Nov 2021 16:59:02 +0000, you wrote:

>
>> On 12 Nov 2021, at 16:49, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>>
>> ?On Fri, 12 Nov 2021 14:57:44 +0000, you wrote:

>>> Hi Stephen,
>>>
>>>
>>>
>>> Thanks for the advice, unfortunately I must be missing something as my Myth Frontend doesn't respond to the config file. I do recall that I had a lot of trouble getting it to work on my previous frontend, but I will get there.
>>>
>>>
>>>
>>> Regards,
>>>
>>> Dave.
>>
>> If mythfrontend is successfully connecting to lirc, you should get a
>> line in mythfrontend.log that looks like this:
>>
>> Nov 9 00:20:34 mypvr mythfrontend.real: mythfrontend[3023969]: I
>> CoreContext lirc.cpp:310 (Init) LIRC: Successfully initialized
>> '/dev/lircd' using '/home/stephen/.mythtv/lircrc' config
>>
>> So if you do this command:
>>
>> grep -i lirc /var/log/mythtv/mythfrontend.log
>>
>> what do you see?

>Hi Stephen,
>
>We?ll this is an unexpected result:
>
>Nov 12 16:05:31 giga01 mythfrontend.real: mythfrontend[1646]: E CoreContext lirc.cpp:233 (Init) LIRC: Failed to parse IP address ''
>
>I?m not really sure why it would be using an IP address?
>
>Regards,
>Dave

I can't say I have ever seen that before. It is possible to use lirc
over a network connection, but that is normally the lirc daemon doing
that using the listen and connect options in
/etc/lirc/lirc_options.conf (one lirc daemon listens for connections,
the other connects to the listening daemon and gets to use its
hardware). A lirc client like mythfrontend can also connect to a
listening lirc daemon directly, with the right configuration. So what
do you have in Setup > General > Remote Control > LIRC daemon socket?
If you have a typo there, mythfrontend might be thinking it is
supposed to be doing a network connection. It should be set to
"/dev/lirc". Using "/var/run/lirc/lircd" or "/run/lirc/lircd" should
also work.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
> On 12 Nov 2021, at 17:21, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>
> ?On Fri, 12 Nov 2021 16:59:02 +0000, you wrote:
>
>>
>>>> On 12 Nov 2021, at 16:49, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>>>
>>> ?On Fri, 12 Nov 2021 14:57:44 +0000, you wrote:
>
>>>> Hi Stephen,
>>>>
>>>>
>>>>
>>>> Thanks for the advice, unfortunately I must be missing something as my Myth Frontend doesn't respond to the config file. I do recall that I had a lot of trouble getting it to work on my previous frontend, but I will get there.
>>>>
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Dave.
>>>
>>> If mythfrontend is successfully connecting to lirc, you should get a
>>> line in mythfrontend.log that looks like this:
>>>
>>> Nov 9 00:20:34 mypvr mythfrontend.real: mythfrontend[3023969]: I
>>> CoreContext lirc.cpp:310 (Init) LIRC: Successfully initialized
>>> '/dev/lircd' using '/home/stephen/.mythtv/lircrc' config
>>>
>>> So if you do this command:
>>>
>>> grep -i lirc /var/log/mythtv/mythfrontend.log
>>>
>>> what do you see?
>
>> Hi Stephen,
>>
>> We’ll this is an unexpected result:
>>
>> Nov 12 16:05:31 giga01 mythfrontend.real: mythfrontend[1646]: E CoreContext lirc.cpp:233 (Init) LIRC: Failed to parse IP address ''
>>
>> I’m not really sure why it would be using an IP address?
>>
>> Regards,
>> Dave
>
> I can't say I have ever seen that before. It is possible to use lirc
> over a network connection, but that is normally the lirc daemon doing
> that using the listen and connect options in
> /etc/lirc/lirc_options.conf (one lirc daemon listens for connections,
> the other connects to the listening daemon and gets to use its
> hardware). A lirc client like mythfrontend can also connect to a
> listening lirc daemon directly, with the right configuration. So what
> do you have in Setup > General > Remote Control > LIRC daemon socket?
> If you have a typo there, mythfrontend might be thinking it is
> supposed to be doing a network connection. It should be set to
> "/dev/lirc". Using "/var/run/lirc/lircd" or "/run/lirc/lircd" should
> also work.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

Thanks Stephen,

That was exactly it, I had to set /dev/lircd in that setting, then it was just a case of setting up the lircrc file correctly in .MythTV.

All I have to do now is a little bit of mapping in mythfrontend for a couple of the keys to enable me to bring up the context menus.

Thanks again for your help with this.

Dave
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
Hi Stephen,

Yes, this is a new 20.04 install.
However, it appears the issue is deeper than the MythTV response. It turns
out, as soon as I start Mythfrontend, the lircd daemon shuts down.
In other words, I can restart lircd.service, and the syslog shows that
everything starts up OK and /etc/lirc/lircd.conf.d/mceusb.lircd.conf is
read:
Nov 13 13:20:45 mediaserver lircd-0.10.1[4262]: Info: Using remote:
mceusb_hauppauge.
Nov 13 13:20:45 mediaserver lircd-0.10.1[4262]: Notice:
/etc/lirc/lircd.conf.d/mceusb.lircd.conf: mceusb_hauppauge: Multiple
definitions of: KEY_TV
Nov 13 13:20:45 mediaserver lircd-0.10.1[4262]: Info: Using remote:
vista_mce.
Nov 13 13:20:45 mediaserver lircd[4262]: lircd-0.10.1[4262]: Notice:
lircd(devinput) ready, using /var/run/lirc/lircd
Nov 13 13:20:45 mediaserver lircd-0.10.1[4262]: Notice: lircd(devinput)
ready, using /var/run/lirc/lircd
Nov 13 13:20:45 mediaserver systemd[1]: Started Flexible IR remote
input/output application support.

However upon launching Mythfrontend, I see this in the log:
Nov 13 13:21:08 mediaserver lircd[4262]: lircd-0.10.1[4262]: Notice:
accepted new client on /var/run/lirc/lircd
Nov 13 13:21:08 mediaserver lircd[4262]: lircd-0.10.1[4262]: Info:
initializing '/dev/input/event4'
Nov 13 13:21:08 mediaserver lircd[4262]: lircd-0.10.1[4262]: Info: Using
device: /dev/input/event4
Nov 13 13:21:08 mediaserver lircd-0.10.1[4262]: Notice: accepted new client
on /var/run/lirc/lircd
Nov 13 13:21:08 mediaserver lircd[4262]: lircd-0.10.1[4262]: Info: removed
client
Nov 13 13:21:08 mediaserver lircd[4262]: lircd-0.10.1[4262]: Info: closing
'/dev/input/event4'
Nov 13 13:21:08 mediaserver lircd-0.10.1[4262]: Info: initializing
'/dev/input/event4'
Nov 13 13:21:08 mediaserver lircd-0.10.1[4262]: Info: Using device:
/dev/input/event4
Nov 13 13:21:08 mediaserver lircd-0.10.1[4262]: Info: removed client
Nov 13 13:21:08 mediaserver lircd-0.10.1[4262]: Info: closing
'/dev/input/event4'
At this point only the arrow keys work, and irw shows only the keyboard
input from the arrow keys.

Any ideas why mythfrontend would trigger lircd to shut down?

Thanks-
Steve


On Mon, Nov 8, 2021 at 12:57 AM Stephen Worthington <
stephen_agent@jsw.gen.nz> wrote:

> On Sun, 7 Nov 2021 18:03:43 -0800, you wrote:
>
> >Hi Stephen,
> >
> >I've finally just upgraded from 18.04 to 20.04. I've run your helpful
> >script to install and fix the lirc packages.
> >I ran lirc-setup and successfully selected my IR receiver and remote type
> >(mceusb).
> >Following, I copied the lirc_options.conf to /etc/lirc and verified the
> >mceusb.lirc.conf file was in ~/lirc-setup.conf.d
> >Finally, I copied my working lircrc file from ~/.mythtv/ in my 18.04 to
> the
> >new 20.04 installation.
> >
> >I can run irw and see that all of the remote buttons are properly
> received.
> >I do sudo systemctl status lircd-dev.service and see that it has run
> >successfully to create the softlink for /dev/lircd
> >I checked that /dev/lircd is what is specified in the mythfrontend setup.
> >However, Mythfrontend does not respond to the remote input. Can you think
> >of anything I might be missing?
> >
> >Thanks,
> >Steve
>
> So this is not actually an upgrade in place - you are installing on a
> new 20.04 system by copying from a working 18.04 on another PC - is
> that right? If you were upgrading in place, it should have been
> working immediately after running my script.
>
> As irw is working, the lirc side of things is likely to be all good,
> so it is the mythfrontend side that is not working yet. To check
> that, shut down mythfrontend and run:
>
> ircat mythtv
>
> as your normal user (not as root).
>
> The "mythtv" there is the name that all MythTV programs provide to
> lirc when connecting to it, and is the same "mythtv" string that
> should be in your $(HOME)/.lirc/mythtv file in the "prog =" lines:
>
> begin
> remote = devinput
> prog = mythtv
> button = KEY_EXIT
> config = Escape
> repeat = 0
> delay = 0
> end
>
> So for the above, when you use the Back button on your MCE remote, it
> will produce KEY_EXIT in irw, and lirc will translate that to "Escape"
> and that is what "ircat mythtv" should then display. If that is not
> working, then check that you have copied your $(HOME)/.lirc directory
> to the new PC. Lirc capable programs load their lirc configuration by
> loading $(HOME/.lircrc, and in a MythTV created .lircrc, all you will
> find is a set of includes for files in $(HOME)/.lirc, which all need
> to be there.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>


--
________________________
"destroying the fundamental underpinnings of the broadcast television
ecosystem"
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
On Sat, 13 Nov 2021 13:43:09 -0800, you wrote:

>Hi Stephen,
>
>Yes, this is a new 20.04 install.
>However, it appears the issue is deeper than the MythTV response. It turns
>out, as soon as I start Mythfrontend, the lircd daemon shuts down.
>In other words, I can restart lircd.service, and the syslog shows that
>everything starts up OK and /etc/lirc/lircd.conf.d/mceusb.lircd.conf is
>read:
>Nov 13 13:20:45 mediaserver lircd-0.10.1[4262]: Info: Using remote:
>mceusb_hauppauge.
>Nov 13 13:20:45 mediaserver lircd-0.10.1[4262]: Notice:
>/etc/lirc/lircd.conf.d/mceusb.lircd.conf: mceusb_hauppauge: Multiple
>definitions of: KEY_TV
>Nov 13 13:20:45 mediaserver lircd-0.10.1[4262]: Info: Using remote:
>vista_mce.
>Nov 13 13:20:45 mediaserver lircd[4262]: lircd-0.10.1[4262]: Notice:
>lircd(devinput) ready, using /var/run/lirc/lircd
>Nov 13 13:20:45 mediaserver lircd-0.10.1[4262]: Notice: lircd(devinput)
>ready, using /var/run/lirc/lircd
>Nov 13 13:20:45 mediaserver systemd[1]: Started Flexible IR remote
>input/output application support.
>
>However upon launching Mythfrontend, I see this in the log:
>Nov 13 13:21:08 mediaserver lircd[4262]: lircd-0.10.1[4262]: Notice:
>accepted new client on /var/run/lirc/lircd
>Nov 13 13:21:08 mediaserver lircd[4262]: lircd-0.10.1[4262]: Info:
>initializing '/dev/input/event4'
>Nov 13 13:21:08 mediaserver lircd[4262]: lircd-0.10.1[4262]: Info: Using
>device: /dev/input/event4
>Nov 13 13:21:08 mediaserver lircd-0.10.1[4262]: Notice: accepted new client
>on /var/run/lirc/lircd
>Nov 13 13:21:08 mediaserver lircd[4262]: lircd-0.10.1[4262]: Info: removed
>client
>Nov 13 13:21:08 mediaserver lircd[4262]: lircd-0.10.1[4262]: Info: closing
>'/dev/input/event4'
>Nov 13 13:21:08 mediaserver lircd-0.10.1[4262]: Info: initializing
>'/dev/input/event4'
>Nov 13 13:21:08 mediaserver lircd-0.10.1[4262]: Info: Using device:
>/dev/input/event4
>Nov 13 13:21:08 mediaserver lircd-0.10.1[4262]: Info: removed client
>Nov 13 13:21:08 mediaserver lircd-0.10.1[4262]: Info: closing
>'/dev/input/event4'
>At this point only the arrow keys work, and irw shows only the keyboard
>input from the arrow keys.
>
>Any ideas why mythfrontend would trigger lircd to shut down?
>
>Thanks-
>Steve

Having the arrow keys only working is the normal symptom for not
having lirc working - the kernel drivers are providing the arrow keys
(and a couple of others) as keystrokes via the keyboard path, rather
than via the remote control path.

To run through the full set of checks to see things are working
properly, first shut down mythfrontend and then use ir-keytable to
make sure that the remote is working at that level. Shut down lirc:

sudo systemctl stop lircd
sudo systemctl stop lircd.socket

These days lirc is set up to run in the background (lircd.service),
but also to be started automatically if something connects to its
socket (lircd.socket). Your log above suggests that lircd.service was
not running, and lircd got started via lircd.socket when mythfrontend
connected to the socket.

Run ir-keytable. This is what I see with my MCE remote:

root@mypvr:/etc/rc_keymaps# ir-keytable
Found /sys/class/rc/rc0/ with:
Name: Media Center Ed. eHome Infrared Remote Transceiver
(0609:031d)
Driver: mceusb
Default keymap: rc-rc6-mce
Input device: /dev/input/event5
LIRC device: /dev/lirc0
Attached BPF protocols: Operation not supported
Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec
sanyo mce_kbd rc-6 sharp xmp imon rc-mm
Enabled kernel protocols: lirc rc-6
bus: 3, vendor/product: 0609:031d, version: 0x0000
Repeat delay = 500 ms, repeat period = 125 ms

If you are like me and have only one IR remote, then the automatic
selection will work to find the remote receiver. If you have more
than one remote receiver listed by ir-keytable, then you will likely
be having the problem my mother's MythTV box has where the receivers
move around on each boot and you will need to use a specific address
in /etc/lirc/lirc_options.conf on the "device=" line. Let me know if
that is the problem and I can tell you how to find the correct
address. With only one receiver, "device=auto" works.

Run "ir-keytable -t" - if necessary, use the -s to select the correct
IR receiver. Then try pressing the keys on the remote.

You should see events for each key. The possible valid values for
these events are defined in a kernel file input-event-codes.h, which
you will find somewhere under your /usr/include directory and also in
the kernel headers for your current kernel - mine are in
/usr/src/linux-headers-5.4.0-90/include/uapi/linux. The mapping from
your remote's input to the keycodes is defined in the *.toml files
found in /lib/udev/rc_keymaps. You can edit the .toml files and put
your edited copy in /etc/rc_keymaps, and then edit /etc/rc_maps.cfg to
load your edited copy instead of the standard one. For my MCE remote,
it uses the rc6_mce.toml file. If there are any keys that do not
produce events in ir-keytable -t, then you will need to create a
customised .toml file to make them work. At this point, if you try to
run irw, it should not connect as lirc is shut down.

When that is working, the next thing to try is to start lircd:

sudo systemctl start lircd.socket
sudo systemctl start lircd

and run irw. Check that each key produces a keycode. This is what I
get:

root@mypvr:~# irw
0000000080010160 00 KEY_OK devinput
0000000080010192 00 KEY_CHANNELUP devinput
0000000080010179 00 KEY_TV devinput
000000008001008e 00 KEY_SLEEP devinput
0000000080010073 00 KEY_VOLUMEUP devinput
0000000080010072 00 KEY_VOLUMEDOWN devinput
^C

I am using devinput.lircd.conf in /etc/lirc/lircd.conf.d. You seem to
be using a different file, mceusb.lircd.conf, presumably to match your
remote. The "devinput" on the end of the irw lines is the name of the
remote that lirc is using in the file you have installed in
/etc/lirc/lircd.conf.d. These files often have multiple variants of
remotes in them, each starting with a "begin remote" line. Just after
"begin remote", there is a "name" line. In my case, there are two
remotes in my devinput.lircd.conf file, with the names "devinput-64"
and "devinput". The standard version of devinput.lircd.conf has the
second of these remotes with a name of "devinput-32", but I have
modified that to "devinput" so that it matches all the "remote=" lines
in my lirc mapping files in $(HOME)/.lirc. I chose to modify
devinput.lircd.conf in one place, rather than having to modify all my
"remote=" lines in multiple files in $(HOME)/.lirc. That is another
possible place where you may be having the same problem as I did - the
names not matching.

When irw is working, you can next try running ircat. From your
normally MythTV user, run:

ircat mythtv

The "mythtv" is the lirc client name that all MythTV programs (eg
mythfrontend, mythavtest, mythtv-setup.real, ...) use when they
connect to lirc as a client. So by using the same name with ircat,
you get to test the same configuration that mythfrontend uses. The
output you should see from ircat mythtv is the mapping specified on
the "config=" line in your $(HOME)/.lirc/mythtv file for the entry
with the matching "remote=", "prog=" and "button=" lines. The
"remote=" name has to match the name on the end of the irw lines. The
"prog=" name has to be "mythtv" and the "button=" has to match the
KEY_ name that irw showed for that key.

The final level of configuration is in mythfrontend - the output seen
from ircat for a key is matched by mythfrontend against its internal
remote configuration to cause it to do something. Those matches are
configured in mythfrontend > Setup > Edit Keys and you may have edited
those settings to customise things at some point.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
Hi,

On 14/11/2021 04:30, Stephen Worthington wrote:
> I am using devinput.lircd.conf in /etc/lirc/lircd.conf.d. You seem to
> be using a different file, mceusb.lircd.conf, presumably to match your
> remote.


To use mceusb.lircd.conf instead of devinput.lircd.conf is actually not
just about matching the remote. It also about the driver and device used.

When using devinput, lircd takes it's input from the kernel decoding.
This is, it trusts and uses the decoding done by the kernel. This is the
easy path as long as it works.

Using mceusb.lircd.conf means that lircd takes it's input directly from
the IR device driver and decodes the signals itself. This is only
possible if using an input device like /dev/lirc0 -- devinput uses one
of the devices under /dev/input.

TL:DR Using mceusb.lircd.conf can only work if paired with a suitable
driver and device, usually the 'default' driver and the /dev/lirc0 device.

A more complete story can be found at
https://www.lirc.org/html/configuration-guide.html

Cheers!
--alec
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
On Sun, 14 Nov 2021 16:08:04 +0100, you wrote:

>Hi,
>
>On 14/11/2021 04:30, Stephen Worthington wrote:
>> I am using devinput.lircd.conf in /etc/lirc/lircd.conf.d. You seem to
>> be using a different file, mceusb.lircd.conf, presumably to match your
>> remote.
>
>
>To use mceusb.lircd.conf instead of devinput.lircd.conf is actually not
>just about matching the remote. It also about the driver and device used.
>
>When using devinput, lircd takes it's input from the kernel decoding.
>This is, it trusts and uses the decoding done by the kernel. This is the
>easy path as long as it works.
>
>Using mceusb.lircd.conf means that lircd takes it's input directly from
>the IR device driver and decodes the signals itself. This is only
>possible if using an input device like /dev/lirc0 -- devinput uses one
>of the devices under /dev/input.
>
>TL:DR Using mceusb.lircd.conf can only work if paired with a suitable
>driver and device, usually the 'default' driver and the /dev/lirc0 device.
>
>A more complete story can be found at
>https://www.lirc.org/html/configuration-guide.html
>
>Cheers!
>--alec

So mceusb.lircd.conf not going to work then - the log snippet shows
the input is coming from the kernel driver on /dev/input/event4, so
that means that devinput.lircd.conf is required.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
On Sun, 14 Nov 2021 11:03:12 -0500, you wrote:

>On 2021-11-13 10:30 p.m., Stephen Worthington wrote:
>
> Big snip
>> You should see events for each key. The possible valid values for
>> these events are defined in a kernel file input-event-codes.h, which
>> you will find somewhere under your /usr/include directory and also in
>> the kernel headers for your current kernel - mine are in
>> /usr/src/linux-headers-5.4.0-90/include/uapi/linux.
>
>
>Stephen, this is a masterclass for installing lirc. Kudos.
>
>I have been using the devinput driver on Fedora for a couple of years
>now, and ran across one quirk which may have an impact on lirc.
>On Fedora, there are 2 slightly different versions of
>input-event-codes.h installed. One in /usr/include/linux and another in
>/usr/src/kernels/5.xxx.etc/include/uapi/linux/input-event-codes.h
>
># diff /usr/include/linux/input-event-codes.h
>/usr/src/kernels/5.11.22-100.fc32.x86_64/include/uapi/linux/input-event-codes.h
>16,17c16,17
>< #ifndef _INPUT_EVENT_CODES_H
>< #define _INPUT_EVENT_CODES_H
>---
> > #ifndef _UAPI_INPUT_EVENT_CODES_H
> > #define _UAPI_INPUT_EVENT_CODES_H
>
>The first is included by a call in ../linux/input.h. The second by an
>include in ../uapi/linux/input.h.
>
>I have no idea which one is preferred, nor whether it makes any
>difference, (I suspect it might) but I do remember that at one point I
>had to do something with these files for lirc to work. ??Copy the
>/usr/src/ version to /usr/include??? Cannot remember.
>
>
>Geoff

Yes, I noticed that problem on Ubuntu also, then when I thought about
it, I dismissed it as the contents of the files are identical, it is
just the controlling defines which are different. So all the keycodes
are identical, and there is no problem. Changing those files will not
change anything unless you are compiling the kernel yourself, or
compiling driver code against the kernel headers (eg DKMS automatic
compiles for the Nvidia drivers or VirtualBox or ...). And changes to
kernel files are best left to the kernel developers anyway.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
On Sun, 14 Nov 2021 10:40:32 -0800, you wrote:

>Stephen, Alec,
>
>Thanks again for your help and advice. I was finally able to track down
>the issues and get LIRC working with Mythfrontend in 20.04.
>There were two key issues that I hope to explain here in sufficient detail
>for any others coming across this thread:
>1) DO NOT run lirc-setup. lirc-setup created two unnecessary files:
>mceusb.lircd.conf, and another version of lirc_options.conf. As Alec
>points out, mceusb.lircd.conf is not going to work. And the
>lirc_options.conf that was created contained the "device =
>/dev/input/event4" line that was indeed breaking LIRC. The README file
>that was created by lirc-setup contained the unhelpful advice to copy the
>newly created lirc_options.conf to /etc/lirc/ and the mceusb.lircd.conf to
>/etc/lirc/lircd.conf.d/. Once again, I should have ignored what was in the
>README file...

Using lirc-setup does work, but you have to tell it to select the
right options.

If you have multiple IR receivers, then although lirc may be working
today, it may fail on the next boot as the "device = auto" line in
lirc_options.conf always uses the first IR receiver it finds, and they
can change order each boot. So run "ir-keytable" and check that there
is only one IR receiver listed.

>2)LIRC does not look for the mapping file in $HOME/.lirc/mythtv. Running
>ircat mythtv indicated it was looking for a file named $HOME/.lircrc.
>Creating a softlink of $HOME/.lirc/mythtv to $HOME/.lircrc is what got LIRC
>working in Mythfrontend. And as Stephen points out, the first line of each
>block in the mapping file must be "remote = devinput-32" or "remote =
>devinput" if you have modified the devinput.lircd.conf file as Stephen has.
>
>Best,
>Steve

The normal setup for a MythTV $(HOME)/.lircrc is that it is a file
containing include statements that includes each of the files in
$(HOME)/.lirc. Using a link to $(HOME)/.lirc/mythtv will work, but
only for MythTV, so if you want to use lirc with other programs (eg
mplayer, irexec), you will have to incorporate their settings as well.
This is what my $(HOME)/.lircrc file currently looks like:

root@mypvr:/home/stephen# cat .lircrc
#Custom lircrc generated via mythbuntu-lirc-generator
#All application specific lircrc files are within ~/.lirc
include ~/.lirc/mythtv
include ~/.lirc/mplayer
include ~/.lirc/irexec
include ~/.lirc/epgdiff

include ~/.lirc/xine
include ~/.lirc/vlc
include ~/.lirc/xmame
include ~/.lirc/xmess
include ~/.lirc/totem
include ~/.lirc/elisa

The first group of include lines are all for programs I am actively
using (epgdiff is my current programming project). The rest are ones
that were originally installed when my lirc setup was created (by the
old Mythbuntu Control Center, I think), and I have not kept them up to
date, although I have used VLC and xine occasionally.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
Hi all,

On 15/11/2021 02:41, Stephen Worthington wrote:
> On Sun, 14 Nov 2021 10:40:32 -0800, you wrote:
As Alec points out, mceusb.lircd.conf is not going to work.

That's not what I said. I said it can only be used when paired with a
suitable driver and device.

As long the default, devinput setup works for you all is fine.

However, other user-cases actually requires the use of the
mceusb.lircd.conf file -- the most common is when using irsend to send
ir commands to devices like a TV set using lircd. This is only possible
when using /dev/lirc0 and the correct driver, often the silly-named
'default'.

On 14/11/2021 16:52, Stephen Worthington wrote:

> So mceusb.lircd.conf not going to work then - the log snippet shows
> the input is coming from the kernel driver on /dev/input/event4, so
> that means that devinput.lircd.conf is required.


Although the conclusion is fine, the arguments is perhaps somewhat
misleading. A correctly coded driver (all are not) can be configured to
deliver data in /dev/lirc0 instead, effectively creating another data
path where the raw data is decoded by lircd rather than the kernel.

Details (some of which handled by lirc-setup) are in the lirc.org docs.

But then again, in this case the simple, default setup using the kernel
decoding read from /dev/input/eventXXX by the devinput driver seems to
work fine so all are happy.

lircd is a complex beast which can be taught to do really amazing stuff.
Being the teacher is sometimes frustrating, though.


Cheers!
--alec
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Fix for broken lirc package in Ubuntu 20.04 [ In reply to ]
Hi again,

On 15/11/2021 02:41, Stephen Worthington wrote:

> Using lirc-setup does work, but you have to tell it to select the
> right options.


Indeed.

And the problem with this is that understanding what options to choose
is about a pretty complicated model involving IR decoding, kernel IR
drivers, devinput devices, /dev/lirc[0-9] devices, lircd drivers,
application interfaces and what not. It would *perhaps*, theoretically,
be possible to create some more advanced GUI where different components
was handled in a more intuitive way.

But without that, the only route is documentation. And since we don't
actually read docs, this route is not that effective.

Sigh
--alec
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org