[mythtv-users] Remote control issue after Ubuntu upgrade

Dave Pearson (Lists) lists at the-pearsons.co.uk
Thu Oct 4 17:03:09 UTC 2018


You, sir, are an absolute genius! I am, finally almost there with my MCE remote on Ubuntu 18.10.

I can see all of the correct key presses when I monitor my remote with irw, so that’s good.

The final piece is to get it to work in mythfrontend - I’ve put my lircrc file in ~/.mythtv, but nothing happens in the front end when I use the control. I can only assume I’ve named the file wrong or it needs to be in a different location - any ideas?

Regards,
Dave

Sent from my iPad

> On 4 Oct 2018, at 15:07, Stephen Worthington <stephen_agent at jsw.gen.nz> wrote:
> 
>> On Thu, 4 Oct 2018 20:10:59 +1000, you wrote:
>> 
>> I know lots of people have been having remote control problems after
>> upgrading to 18.04 and I'm yet another one. But I think I'm very close.
>> 
>> I use a Harmony universal remote which worked fine on my 16.04 Ubuntu
>> frontend. I had it set up with devinput so I didn't need to run lirc .
>> After upgrading to Ubuntu 18.04 the only buttons that generate a response
>> in MythTV are up, down, left, and right.
>> 
>> When I run ir-keytable I get a list of mappings as per below, and when I
>> run ir-keytable -t in a terminal window I get key responses.
>> 
>> ~$ sudo ir-keytable --read --device=/dev/input/event4
>> scancode 0x800f0400 = KEY_NUMERIC_0 (0x200)
>> scancode 0x800f0401 = KEY_NUMERIC_1 (0x201)
>> scancode 0x800f0402 = KEY_NUMERIC_2 (0x202)
>> scancode 0x800f0403 = KEY_NUMERIC_3 (0x203)
>> scancode 0x800f0404 = KEY_NUMERIC_4 (0x204)
>> scancode 0x800f0405 = KEY_NUMERIC_5 (0x205)
>> scancode 0x800f0406 = KEY_NUMERIC_6 (0x206)
>> scancode 0x800f0407 = KEY_NUMERIC_7 (0x207)
>> scancode 0x800f0408 = KEY_NUMERIC_8 (0x208)
>> scancode 0x800f0409 = KEY_NUMERIC_9 (0x209)
>> scancode 0x800f040a = KEY_DELETE (0x6f)
>> scancode 0x800f040b = KEY_ENTER (0x1c)
>> scancode 0x800f040c = KEY_SLEEP (0x8e)
>> scancode 0x800f040d = KEY_MEDIA (0xe2)
>> scancode 0x800f040e = KEY_MUTE (0x71)
>> scancode 0x800f040f = KEY_INFO (0x166)
>> scancode 0x800f0410 = KEY_VOLUMEUP (0x73)
>> scancode 0x800f0411 = KEY_VOLUMEDOWN (0x72)
>> scancode 0x800f0412 = KEY_CHANNELUP (0x192)
>> scancode 0x800f0413 = KEY_CHANNELDOWN (0x193)
>> scancode 0x800f0414 = KEY_FASTFORWARD (0xd0)
>> scancode 0x800f0415 = KEY_REWIND (0xa8)
>> scancode 0x800f0416 = KEY_PLAY (0xcf)
>> scancode 0x800f0417 = KEY_RECORD (0xa7)
>> scancode 0x800f0418 = KEY_PAUSE (0x77)
>> 
>> And my $HOME/.mythtv/lircrc looks like this:
>> ...
>> begin
>>   remote = devinput
>>   prog = mythtv
>>   button = KEY_NUMERIC_1
>>   config = 1
>>   repeat = 0
>>   delay = 10
>> end
>> 
>> begin
>>   remote = devinput
>>   prog = mythtv
>>   button = KEY_NUMERIC_0
>>   config = 0
>>   repeat = 0
>>   delay = 10
>> end
>> ...etc...
>> 
>> So devinput is getting the button presses and they're being mapped to keys
>> like KEY_NUMERIC_0, KEY_PAUSE etc but MythTv frontend doesn't seem to be
>> registering these button presses. So what have I omitted that will fill in
>> the final piece of the jigsaw and get MythTV to respond? Is there another
>> config file somewhere I have to modify?
>> 
>> Regards,
>> Phill
> 
> What you are seeing is what happens when lirc is not working and you
> are getting keystrokes directly from the devinput driver, but the
> devinput driver is using the standard key table.  If you were
> configuring things in the $HOME/.lircrc files, and that changing that
> configuration affected mythtv, then you were in fact using lirc.  So
> you will need to get it working again.  If you were using a custom
> keytable at the ir-keytable level and had lirc disabled, you will need
> to reinstall and use it.  There is not enough information in your post
> to tell me which way it used to work for you.
> 
> I have been through the process of getting lirc to work in 18.04, and
> it was a complete pain.  The basic problem is that the Python tools
> used by lirc for configuration (and also, I think, at startup of the
> lirc daemon, but I have not verified that) were completely broken as
> installed from the lirc package.  The package maintainer must have
> been testing the packages on his build system that had copies of
> various files already installed on accessible paths, because they were
> not installed correctly by the package.  To fix all of the mess, I
> have written a script, which works for me on my test 18.04.1 virtual
> machine and on my laptop after I upgraded it from 16.04 to 18.04.1. It
> is available for download from my web server:
> 
> http://www.jsw.gen.nz/mythtv/lirc-ubuntu-18.04-install.sh
> 
> To use it, download it, do a "chmod a+x" on it, and then run it as
> root.  It has to download the source code for the lirc package,
> compile it and then use the source code directories as the source of
> missing headers and libraries so that a pip3 install of part of the
> package will work.  To do all that, it may have to install several
> packages other than the lirc package, if they are not already
> installed, including a lot of other packages that are required for
> those packages.  It cleans up after itself, but will leave behind some
> newly installed packages.
> 
> Apart from fixing the lirc package installation, the script also
> disables the lircmd and lircd-uinput daemons, which are automatically
> enabled by the package.  Until I disabled them, although lirc was
> working, on autorepeating keys there were extra keystrokes leaking
> through from another path than lirc, but only some of the time.
> Disabling those two deamons fixes that.  The problem with those
> daemons is that as I was not using them, I had not configured them,
> and their default configurations as installed by the lirc package were
> causing the problem.
> 
> Once you have run my script, you should be able to run lirc-setup and
> use its GUI to configure your remote.  You may need to reboot first.
> 
> I use an MCE remote and three Hauppague HVR-900 and Win-TV Nova-T
> remotes (they are identical), using the kernel devinput driver.  In
> 16.04 that required some custom files in the /usr/share/lirc path that
> had the keystrokes in them fixed to exactly match my remotes.  Those
> files were not necessary in 18.04.1 as the standard lirc files now
> seem to have those fixes.  But the devinput config files that are
> loaded now have slightly different names for the devices.  After I
> configured lirc using the Python tools, I found that my remotes were
> coming up with the name "devinput-32", which did not match all the
> "devinput" names in my $HOME/.lircrc files.  I had to go into
> /etc/lirc/lircd.conf.d and edit the devinput.lircd.conf file there to
> change the "devinput-32" name to "devinput" to get them to match.  It
> would also be possible to change all the "devinput" names in the
> $HOME/.lircrc files to "devinput-32", but that would be a lot more
> work.
> 
> WARNING: If you upgrade a working lirc setup from 16.04 or before,
> where you have customised config files referenced in
> /etc/lirc/hardware.conf and stored under /usr/share/lirc, make sure
> you take copies of the customised files and put them somewhere safe
> before doing the upgrade to 18.04.  Somewhere under /root or
> /home/<username> is safe.  The 18.04 upgrade will delete all files
> under /usr/share/lirc!!!
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org



More information about the mythtv-users mailing list