No output on screen after startup

So my OSMC installation on a RPi4B device has failed in a strange way.
When it boots up the blue screen with the OSMC logo is shown for a couple of seconds, then disappears and replaced by a black screen followed by the TV saying there is no signal…

This OSMC has been powered up for a long time but for several weeks I have been using the older OSMC on an RPi3 so I have not noted anything strange.
I can access the failing system via PuTTY SSH and give commands there.
If I check the status I get this:

$ sudo systemctl status mediacenter
* mediacenter.service - media center application
     Loaded: loaded (/lib/systemd/system/mediacenter.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-11-14 11:54:13 CET; 11min ago
   Main PID: 455 (mediacenter)
      Tasks: 52 (limit: 3931)
        CPU: 2min 5.785s
     CGroup: /system.slice/mediacenter.service
             |-455 /bin/bash /usr/bin/mediacenter
             |-505 sudo -u osmc LIRC_SOCKET_PATH=/var/run/lirc/lircd /usr/lib/kodi/kodi.bin --standalone -fs
             `-512 /usr/lib/kodi/kodi.bin --standalone -fs

Nov 14 11:54:15 osmc-rpi4 sudo[541]:     osmc : PWD=/ ; USER=root ; COMMAND=/bin/cp /usr/share/zoneinfo/Europe/Stockholm /etc/localtime.dpkg-new
Nov 14 11:54:15 osmc-rpi4 sudo[541]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
Nov 14 11:54:15 osmc-rpi4 sudo[541]: pam_unix(sudo:session): session closed for user root
Nov 14 11:54:15 osmc-rpi4 sudo[544]:     osmc : PWD=/ ; USER=root ; COMMAND=/bin/mv /etc/localtime.dpkg-new /etc/localtime
Nov 14 11:54:15 osmc-rpi4 sudo[544]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
Nov 14 11:54:15 osmc-rpi4 sudo[544]: pam_unix(sudo:session): session closed for user root
Nov 14 11:54:48 osmc-rpi4 sudo[716]:     osmc : PWD=/ ; USER=root ; COMMAND=/usr/bin/mv /var/tmp/config-user.txt /boot/config-user.txt
Nov 14 11:54:48 osmc-rpi4 sudo[716]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
Nov 14 11:54:48 osmc-rpi4 mediacenter[717]: mv: failed to preserve ownership for '/boot/config-user.txt': Operation not permitted
Nov 14 11:54:48 osmc-rpi4 sudo[716]: pam_unix(sudo:session): session closed for user root

Still there is no video on the HDMI connector shown on the TV.
What could I do on the command line to check what is going on?
For instance, where are the logs from Kodi located?

Later
I found logs here:
~/.kodi/temp/kodi.log
~/.kodi/temp/kodi.old.log
Can I upload them somewhere you can reach them? Obviously I cannot use the built-in log handling in Kodi…

grab-logs -A

I tried grab-logs -A after rebooting the RPi4.
This is the start and end part of the output shown on screen:

$ grab-logs -A
Grabbing log UNAME ...
Grabbing log cmdline ...
Grabbing log Debian version ...
Grabbing log OSMC Build Information ...
Grabbing log Pi config ...
Grabbing log Pi config-user ...
Grabbing log GUI Settings (abridged) ...
Grabbing log guisettings.xml ...
Masking private information ...
Grabbing log advancedsettings.xml ...
An error occurred while grabbing advancedsettings.xml:
 FileNotFoundError: [Errno 2] No such file or directory: '/home/osmc/.kodi/userdata/advancedsettings.xml'
Grabbing log sources.xml ...
Masking private information ...
Grabbing log fstab ...
....cut...
Grabbing log edid-decode ...
An error occurred while grabbing edid-decode:
 subprocess.CalledProcessError: Command '['/usr/bin/edid-decode', '/sys/class/drm/card1-HDMI-A-1/edid']' returned non-zero exit status 255.
Grabbing log ifconfig ...
Grabbing log Kodi Log ...
Masking private information ...
Grabbing log Kodi Old Log ...
Masking private information ...
Writing logs to temp file ...
Dispatching logs ...
Exception Details:

Traceback (most recent call last):
  File "/usr/bin/grab-logs", line 1051, in dispatch_logs
    raise Exception('Log file too large for upload')
Exception: Log file too large for upload

Failed to upload log files, copying to /boot instead. (Unable to verify)

So this is after a reboot, not much should have happened provided the log starts at the boot time of course.
I executed this inside /home/osmc/temp thinking that the files would wind up in the current dir but they did not.

Tere is lots of space on the drives too, so it should not be a disk overrun problem:

$ df -h
Filesystem                             Size  Used Avail Use% Mounted on
devtmpfs                               1.6G     0  1.6G   0% /dev
tmpfs                                  1.9G  756K  1.9G   1% /run
/dev/mmcblk0p2                         3.7G  1.6G  2.0G  45% /
tmpfs                                  1.9G     0  1.9G   0% /dev/shm
tmpfs                                  5.0M     0  5.0M   0% /run/lock
/dev/mmcblk0p1                         316M  113M  204M  36% /boot
/dev/mmcblk0p3                          25G   28K   24G   1% /media/media
tmpfs                                  380M     0  380M   0% /run/user/1000

You should reboot twice

Wrong folder. Please provide output of ls -lah /home/osmc/.kodi/temp/

While I assume your double reboot should fix it

Here you go:

$ ls -lah /home/osmc/.kodi/temp/
total 26M
drwxr-xr-x 4 osmc osmc 4.0K Nov 14 16:51 .
drwxr-xr-x 7 osmc osmc 4.0K May 26  2022 ..
drwxr-xr-x 2 osmc osmc 4.0K Nov 14 16:51 archive_cache
-rw-r--r-- 1 osmc osmc 4.7M Nov 14 17:58 kodi.log
-rw-r--r-- 1 osmc osmc  21M Nov 14 16:51 kodi.old.log
drwxr-xr-x 2 osmc osmc 4.0K May 26  2022 temp

Can I gzip and upload manually?

I did this again after rebooting twice in quick succession.
And this time there were logs apparently sent.

Logs available at https://paste.osmc.tv/ewunecacac

Have you tried a different HDMI cable, or if your using an HDMI adapter, a different adapter or preferably a proper cable that doesn’t need an adapter that is prone to causing issues?

I only have a micro → normal HDMI adapter plus a normal HDMI cable to connect to the RPi4…
But it has worked fine for many months and when the system starts up I can see the blue screen with the logo for a couple of seconds before it all goes black…

Most items that are broken only become so after a period of time when they are not broken. Those adapters suck and are prone to failure. Just because it is working when outputting one screen mode does not mean it is currently able to support one that requires a higher bandwidth even when there was a period of time in which it could.

Does this mean that you have located information in the log files indicating a problem with the HDMI connection?
The RPi4 has 2 such connectors, which is the one Kodi uses? Maybe it has moved over to the other one???

The HDMI connection should be the one closest the power input. I think you should have output on both but CEC only works on that one and the second output seems to cause issues for some people. Also if you enable 4K60hz then the second output gets disabled. In your logs I’m not seeing where Kodi is talking to the display.

Seriously though, those Kinds of HDMI adapters are highly prone to encapsulating an oversized amount of suck. Get a proper cable. They can be found at very reasonable prices.

How does one update the OSMC from the command line interface of the RPi4?

Will this work:
sudo apt update && sudo apt full-upgrade

Or are you using another update system on these devices?

never run full-upgrade

sudo apt-get update && sudo apt-get dist-upgrade

Hi gurus!
I now ransacked my boxes with various cables and lo-and-behold!
In one of them almost at the bottom I found one 2m HDMI cable that had a micro in one end and a normal in the other! Did not know I had one of these…

Anyway with this cable I get video on my TV from OSMC/Kodi!

So you were right, the adapter is probably faulty.

Thanks for your comments and explanations!
Much appreciated!

2 Likes