IR Not Working After October Update

Is this a problem on Raspbian?

Last time I tested Raspbian, it worked. But that was around January time, so things may have changed. Iā€™ll dig out my spare Pi and IR blaster later today/tomorrow and test again.

Cheers - would be good to confirm.

Ok, so Iā€™ve tested with a spare Pi 0, GPIO IR blaster and 3 SD cards. 1 SD has a fresh install of Raspbian Buster (image downloaded today), 1 has an older install of Raspbian Stretch and the final card has a fresh install of OSMC.

Both Raspbian installs send IR without issue, OSMC still has issues. As I found before, this only seems to affect certain IR protocols (nec is worst) and monitoring the IR space/pulse sequence shows something is sent, and parts of it look fairly close to what they should be, but other parts the timing is quite far off what it should be and the whole sequence is an inconsistent length. Iā€™ve tried using both ā€˜irsendā€™ and ā€˜ir-ctlā€™ with the same results.

output of ā€˜uname -aā€™ for each install
Raspbian Stretch - Linux raspberrypi 4.19.66+ #1253 Thu Aug 15 11:37:30 BST 2019 armv6l GNU/Linux
Raspbian Buster - Linux raspberrypi 4.19.118+ #1311 Mon Apr 27 14:16:15 BST 2020 armv6l GNU/Linux
OSMC - Linux osmc 4.19.122-1-osmc #1 PREEMPT Wed May 27 04:13:18 UTC 2020 armv6l GNU/Linux

Can you post the output of dpkg -l | grep lirc on Raspbian?
Perhaps they have some special patches for this.

Itā€™s also worth checking config.txt and lsmod for potential differences.

I think itā€™s something to do with Kodi. Just tried sudo systemctl stop mediacenter on OSMC and then IR codes sent perfectly, start Kodi again and the problems return.

there is no output, Raspbian doesnā€™t have lirc installed by default, rc-core and ir-ctl handles IR stuff. (I did install lirc so I could test irsend but uninstalled again after)

Thatā€™s an interesting data point.

Itā€™s possible that Kodi is hogging CPU time and causes some signals to be dropped / not handled in a timely enough manner.

Can you check CPU usage?

On my test system Kodi is sitting at around 37% CPU. With irsend repeatedly sending a key press lircd is using ~8.5%.

I have now tried installing Kodi on Raspbian. With Kodi running Raspbian has the same problems as OSMC. So it looks like this is not an OSMC issue and is instead a conflict between the gpio-ir-tx driver and Kodiā€¦ No idea where to go with this now, but i guess maybe the Kodi forums and/or contacting someone who knows more about the driver is the best bet. Iā€™m thinking it may be quicker and easier to build an ir blaster from one of the atmega chips I have hiding in a draw somewhere.

Can you try renice the irrecord process and see if that helps?