I am running OSMC Version February 2024.02-1 on a Raspberry pi model B. I have been using it for ages without problems, but my CEC-enabled TV has died. The replacement I have doesn’t support CEC, so I thought I would be able to get an IR receiver and easily get similar results. God, was I wrong! I am unable to get it to work at all. I bought a TSOP4838 IR receiver, and I can’t get it to do anything in OSMC. The hardware works fine, the driver(s) if needed are also OK but the OSMC software doesn’t recognise it. The guide I tried to use is out of date but I couldn’t find anything else relevent, and the options for setting the GPIO are different in the OSMC menu, so I can’t set them up. So in the end, I guessed them.
Here’s what I have done, and I now need the help of an expert. I think what I need is commands to set the GPIO correctly from a terminal, because the options I keep seeing on articles on the web are no longer available in the Hardware section of My OSMC. Most of the articles I have seen are around 10 years old.
dmesg shows the following:
[ 14.780522] rc_core: IR keymap rc-lirc not found
[ 14.780583] Registered IR keymap rc-empty
[ 14.780951] rc rc0: gpio_ir_recv as /devices/platform/ir-receiver@12/rc/rc0
[ 14.781581] rc rc0: lirc_dev: driver gpio_ir_recv registered at minor = 0, raw IR receiver, no transmitter
The first entry is in red.
Following procedure for OSMC (wiki.sunfounder.cc/index.php?title=IR_Remore_Controller_Configuration_for_OSMC). It says to go to Menu → My OSMC → Pi Config → Hardware Support and enable LIRC GPIO support. My menu doesn’t have that option. It also says to set output on pin 23 and input on pin 18. I don’t have those either, I only have “gpio_pin (0 for default).” It was at 0, I set it to 18. My menu also has an entry for “w1gpio” which can be none, w1-gpio=pullup-overlay, or w1-gpio-overlay. It was set at none, left it there. Also there’s an entry for Enable SPI support. It was disabled, I left it as such. I will try to attach a screenshot.
I ran:
sudo vi /etc/modules
(There were only comments in there)
Added:
lirc_dev
lirc_rpi gpio_in_pin=18
Ran:
pgrep -l lircd
Got:
218 eventlircd
410 lircd
which seems correct.
Ran:
sudo kill 218
Ran:
sudo lircd --permission 666
sudo /run/lirc/lircd-lirc0.sh
The system has created a symbolic link from /etc/lirc/ to the file that irrecord created in osmc’s home directory.
I ran:
irrecord -d /dev/lirc0 test.conf
It created a file for my remote, however it doesn’t actually control the OSMC. I did attempt to add it from My OSMC → Remotes → Browse. (The config file was in osmc’s home directory.) There was a popup asking me to confirm or revert, I selected confirm but still the Pi does not respond to any of the remote’s keypresses.
The article I was following says that’s it (but it doesn’t include the part about getting the codes for the remote), but it doesn’t work. Clearly the ir receiver is working and the OS has configured it and can accept and process signals from the remote. However, it seems that these signals are not being passed to the OSMC media server software.
If I run sudo systemctl status, I get this:
● osmc
State: degraded [This is in red]
Jobs: 1 queued
Failed: 1 units
Since: Thu 1970-01-01 01:00:05 CET; 54 years 3 months ago
CGroup: /
├─user.slice
│ └─user-1000.slice
│ ├─user@1000.service …
│ │ └─init.scope
│ │ ├─745 /lib/systemd/systemd --user
│ │ └─746 (sd-pam)
│ └─session-1.scope
│ ├─742 sshd: osmc [priv]
│ ├─755 sshd: osmc@pts/0
│ ├─756 -bash
│ ├─780 sudo su
│ ├─781 su
│ ├─782 bash
│ ├─800 systemctl status
│ └─801 less
├─init.scope
│ └─1 /sbin/init
└─system.slice
├─irqbalance.service
│ └─213 /usr/sbin/irqbalance
├─udisks.service
│ ├─389 /usr/lib/udisks/udisks-daemon --no-debug
│ └─390 udisks-daemon: not polling any devices
├─systemd-tmpfiles-clean.service
│ └─802 systemd-tmpfiles --clean
├─dbus.service
│ └─196 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
├─ssh.service
│ └─319 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
├─avahi-daemon.service
│ ├─194 avahi-daemon: running [osmc.local]
│ └─202 avahi-daemon: chroot helper
├─system-lircd_helper.slice
│ └─lircd_helper@lirc0.service
│ └─412 /usr/sbin/lircd --driver=default --device=/dev/lirc0 --uinput --output=/var/run/lirc/lircd-lirc0 --pidfile=/var/run/lirc/lircd-lirc0.pid /etc/lirc/lircd.conf
├─eventlircd.service
│ └─215 /usr/sbin/eventlircd --evmap=/etc/eventlircd.d --socket=/var/run/lirc/lircd -f
├─ntp.service
│ └─574 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 105:109
├─wpa_supplicant.service
│ └─214 /sbin/wpa_supplicant -u -s -O /run/wpa_supplicant
├─connman.service
│ └─225 /usr/sbin/connmand -n --config=/etc/connman.conf
├─rpcbind.service
│ └─182 /sbin/rpcbind -f -w
├─systemd-logind.service
│ └─207 /lib/systemd/systemd-logind
├─polkit.service
│ └─397 /usr/libexec/polkitd --no-debug
├─systemd-udevd.service
│ └─184 /lib/systemd/systemd-udevd
├─systemd-journald.service
│ └─164 /lib/systemd/systemd-journald
├─udisks-glue.service
│ └─361 /usr/bin/udisks-glue --foreground
└─mediacenter.service
├─261 /bin/bash /usr/bin/mediacenter
├─355 sudo -u osmc LIRC_SOCKET_PATH=/var/run/lirc/lircd /usr/lib/kodi/kodi.bin --standalone -fs
└─360 /usr/lib/kodi/kodi.bin --standalone -fs
╔root@osmc:/home/osmc
╚>#
The clock is not set as I am not currently connected to the Internet. It says state degraded (why?), one unit failed (which one?) I don’t know how to get further information and I suspect I have more than one problem.
I have spent longer on this than it took to connect the hardware. What have I missed?
Any help would be appreciated. I really don’t want to do a fresh install, but I am thinking it might be my only option. Additionally, the Pi doesn’t shut down any more when I try to power it off (since the last update). I can both ping it, and also ssh into it after selecting “Power off system” from the menu. Nothing is logged in dmesg after trying to shut down. Are these problems related?
Unfortunately I cannot attach a screenshot of the hardware menu
PS - I have just installed the April update, and it is exactly the same. The log is here:
https://paste.osmc.tv/jiyamuzuvu.xml