[mythtv-users] Fix for broken lirc package in Ubuntu 20.04

Stephen Worthington stephen_agent at jsw.gen.nz
Mon Nov 15 01:38:34 UTC 2021


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.


More information about the mythtv-users mailing list