Stuck in sad face loop starting kodi

I’ve just burnt a brand new image of OSMC to a new SD card for my Pi 2B.

It was working fine initially, it expanded the partition, installed files, took me through the walkthrough etc.

Once the walkthrough was complete, I used the GUI to manually check for updates and agreed to their installation. Now I’m stuck in a sad face loop.

The following extract from jounalctl seems to be the issue:

Aug 03 13:47:28 wabewewwypi mediacenter[340]: Starting Kodi...
Aug 03 13:47:28 wabewewwypi sudo[1294]: root : TTY=unknown ; PWD=/ ; USER=osmc ; COMMAND=/usr/lib/kodi/kodi.bin --standalone -fs --lircdev /var/run/lirc/lircd
Aug 03 13:47:28 wabewewwypi sudo[1294]: pam_unix(sudo:session): session opened for user osmc by (uid=0)
Aug 03 13:47:28 wabewewwypi mediacenter[340]: /usr/lib/kodi/kodi.bin: error while loading shared libraries: libbrcmEGL.so: cannot open shared object file: No such file or directory
Aug 03 13:47:28 wabewewwypi sudo[1294]: pam_unix(sudo:session): session closed for user osmc
Aug 03 13:47:28 wabewewwypi mediacenter[340]: Kodi exited with return code 127 after 0 hours, 0 minutes and 0 seconds

Any ideas how I can resolve this?

I’ve done

sudo apt-get update
sudo apt-get -f -Y dist-upgrade

And still stuck.

Please provide full and complete set of logs. Snippets do no give us the big picture we need to address such an issue.

grab-logs -A

Need full logs (e.g. grab-logs -A).

To get a better understanding of the problem you are experiencing we need more information, including logs from you. Please see How to submit a useful support request - General - OSMC for advice on how to help us help you.

Don’t really see how any other logs will help as the issue is clearly that the file “libbrcmEGL.so” is missing, but you can find them here: http://paste.osmc.io/uvuvukigap

Incidentally, running find \ -iname "lobbrcmEGL.so" as root returns no result so the file isn’t on the system, yet kodi seems to depend on it. Seems to me that an update has either introduced a new version of kodi without all it’s dependencies or has removed a file without correctly checking that it has no active dependencies.

Looking at what was updated during the upgrade triggered from the GUI it would seem that kodi was replaced [rbp2-mediacenter-osmc:armhf (16.1.0-12, 16.1.0-16)]

Can I roll this package back? Is 16.1.0-16 broken?

While it may seem that way to you, you are certainly not accounting for the thousands of other users of OSMC that do not have this issue. 16.1.0-16 is not broken. Though something in your installation is broken. Corruption of the downloaded update? Existing data corruption on the system from improper shutdowns or other? Try downloading the install image and burning again would be my suggestion.

libbrcmEGL.so is brought in by rbp-userland-osmc. Your version of rbp-userland-osmc should be 1.2.0-6. Check dpkg -l to confirm this.

It seems like you have only partially upgraded your system (power loss, or a filesystem issue).

I was noticed that there is a new update (previously running June update), installed it and rebooted - black screen. Rpi2 not even starting to boot.

So I took out the sd card, downloaded osmc-installer, re-formatted the card and installed the latest OSMC again. Fired up the Rpi2 again, waited for the install to finish and on the next boot black screen again. I suspected that maybe the sd card is faulty so tried with a brand new Kingston, exactly the same thing happens.

Info
Raspberry Pi 2 model B
2A - 5V power supply (changed it as well for testing)
Sandisk Ultra 8gb
Kingston UHS1 - 8gb
Sony KDL 32bx420
Wired LAN

Nothing else.

Any idea what to check? With the card inserted, when connecting the power the red led lights up and the green one for a fraction of a second, then stops. The TV is picking up the signal, but it stays black. Mind you, OSMC install (formatting the device etc) works fine, the first reboot after that is giving me blank screen. Just to be sure, tested the latest OpenELEC and works fine. I can’t provide any logs as I can’t boot at all.

This happened to me too (fresh install of OSMC_TGT_rbp2_20160621.img) and then ran the upgrade to the July one and it went to a black screen I couldn’t get out of.

Re-formatted and repeated and this happened.

Can you connect to Pi by SSH and access the logs from there?

Avoid Kingston SD cards, always.

As an aside, SSH in and upload logs.

You said that you get a sad face loop, OP doesn’t, so not necessarily the same issue.

Just checked that the userland does have all the necessary libs

sam@sam-XPS-15-9550:/tmp$ wget http://ftp.fau.de/osmc/osmc/apt/pool/main/r/rbp-userland-osmc/rbp-userland-osmc_1.2.0-6_armhf.deb
--2016-08-03 15:58:40--  http://ftp.fau.de/osmc/osmc/apt/pool/main/r/rbp-userland-osmc/rbp-userland-osmc_1.2.0-6_armhf.deb
Resolving ftp.fau.de (ftp.fau.de)... 131.188.12.211, 2001:638:a000:1021:21::1
Connecting to ftp.fau.de (ftp.fau.de)|131.188.12.211|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2089072 (2.0M) [application/x-debian-package]
Saving to: ‘rbp-userland-osmc_1.2.0-6_armhf.deb’

rbp-userland-osmc_1 100%[===================>]   1.99M  4.70MB/s    in 0.4s    

2016-08-03 15:58:41 (4.70 MB/s) - ‘rbp-userland-osmc_1.2.0-6_armhf.deb’ saved [2089072/2089072]

sam@sam-XPS-15-9550:/tmp$ mkdir out2
sam@sam-XPS-15-9550:/tmp$ dpkg -x rbp-userland-osmc_1.2.0-6_armhf.deb out2/
sam@sam-XPS-15-9550:/tmp$ cd out2/
sam@sam-XPS-15-9550:/tmp/out2$ find . | grep brcm
./opt/vc/lib/libbrcmOpenVG.so
./opt/vc/lib/libbrcmEGL.so
./opt/vc/lib/libbrcmWFC.so
./opt/vc/lib/libbrcmGLESv2.so
./opt/vc/lib/pkgconfig/brcmegl.pc
./opt/vc/lib/pkgconfig/brcmglesv2.pc
./opt/vc/lib/pkgconfig/brcmvg.pc
sam@sam-XPS-15-9550:/tmp/out2$ find . | grep mmal
./opt/vc/bin/mmal_vc_diag
./opt/vc/lib/libmmal_core.so
./opt/vc/lib/libmmal_util.so
./opt/vc/lib/libmmal.so
./opt/vc/lib/libmmal_components.so
./opt/vc/lib/libmmal_vc_client.so
sam@sam-XPS-15-9550:/tmp/out2$

Try running

sudo apt-get install --reinstall rbp-userland-osmc

Sam

This is a clean install with one update from the GUI. There is no corruption from improper shutdowns etc.

Regardless, there could be any number of reasons that could introduce corruption. Point being, this issue is not yet “widespread”. We have 3 reports out of tens of thousands of installs. Has not been seen in any testing scenarios but, at this moment I’m installing and attempting to replicate. Please be calm and patient.

dpkg -l produces the following line for rbp-userland-osmc:

ii rbp-userland-o 1.2.0-6 armhf Raspberry Pi userland package

So the same version you quote. Again this is a brand new install with only 1 upgrade from the GUI. No power loss, just the one auto reboot at the end of the installation and another at the end of the update.

Result was:

root@wabewewwypi:/# apt-get install --reinstall rbp-userland-osmc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/2,089 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 22438 files and directories currently installed.)
Preparing to unpack .../rbp-userland-osmc_1.2.0-6_armhf.deb ...
Unpacking rbp-userland-osmc (1.2.0-6) over (1.2.0-6) ...
Setting up rbp-userland-osmc (1.2.0-6) ...
Processing triggers for libc-bin (2.19-18+deb8u4) ...

But still stuck in a sad face loop.

Do a ls -lah /opt/vc/lib/ and post the output. After that try sudo apt-get install --reinstall rbp-userland-osmc and post the ls output again.

Should look like this:

osmc@osmc:~$ ls -lah /opt/vc/lib/
total 3.1M
drwxrwxr-x 4 root root 4.0K Aug 1 18:17 .
drwxr-xr-x 4 root root 4.0K Jan 1 1970 …
-rw-rw-r-- 1 root root 94K Jul 8 16:21 libbcm_host.so
-rw-rw-r-- 1 root root 198K Jul 8 16:21 libbrcmEGL.so
-rw-rw-r-- 1 root root 104K Jul 8 16:21 libbrcmGLESv2.so
-rw-rw-r-- 1 root root 97K Jul 8 16:21 libbrcmOpenVG.so
-rw-rw-r-- 1 root root 77K Jul 8 16:21 libbrcmWFC.so
-rw-rw-r-- 1 root root 353K Jul 8 16:21 libcontainers.so
-rw-rw-r-- 1 root root 16K Jul 8 16:21 libdebug_sym.so
-rw-rw-r-- 1 root root 13K Jul 8 16:21 libdebug_sym_static.a
-rw-rw-r-- 1 root root 48K Jul 8 16:21 libdtovl.so
-rw-rw-r-- 1 root root 198K Jul 8 16:21 libEGL.so
-rw-rw-r-- 1 root root 238K Jul 8 16:21 libEGL_static.a
lrwxrwxrwx 1 root root 12 Jul 8 16:21 libGLESv1_CM.so → libGLESv2.so
-rw-rw-r-- 1 root root 104K Jul 8 16:21 libGLESv2.so
-rw-rw-r-- 1 root root 98K Jul 8 16:21 libGLESv2_static.a
-rw-rw-r-- 1 root root 14K Jul 8 16:21 libkhrn_client.a
-rw-rw-r-- 1 root root 439K Jul 8 16:21 libkhrn_static.a
-rw-rw-r-- 1 root root 68K Jul 8 16:21 libmmal_components.so
-rw-rw-r-- 1 root root 81K Jul 8 16:21 libmmal_core.so
-rw-rw-r-- 1 root root 14K Jul 8 16:21 libmmal.so
-rw-rw-r-- 1 root root 87K Jul 8 16:21 libmmal_util.so
-rw-rw-r-- 1 root root 44K Jul 8 16:21 libmmal_vc_client.so
-rw-rw-r-- 1 root root 33K Jul 8 16:21 libopenmaxil.so
-rw-rw-r-- 1 root root 97K Jul 8 16:21 libOpenVG.so
-rw-rw-r-- 1 root root 3.2K Jul 8 16:21 libvcfiled_check.a
-rw-rw-r-- 1 root root 30K Jul 8 16:21 libvchiq_arm.so
-rw-rw-r-- 1 root root 134K Jul 8 16:21 libvchostif.a
-rw-rw-r-- 1 root root 28K Jul 8 16:21 libvcilcs.a
-rw-rw-r-- 1 root root 170K Jul 8 16:21 libvcos.so
-rw-rw-r-- 1 root root 21K Jul 8 16:21 libvcsm.so
-rw-rw-r-- 1 root root 31K Jul 8 16:21 libvmcs_rpc_client.a
-rw-rw-r-- 1 root root 77K Jul 8 16:21 libWFC.so
drwxrwxr-x 2 root root 4.0K Aug 1 18:17 pkgconfig
drwxrwxr-x 2 root root 4.0K Aug 1 18:17 plugins

Hi ActionA,

I never implied that the issue was widespread, just that it happened on a clean install with a “successful” update which is worrying as it suggests it isn’t something related to my specific configuration (as I haven’t configured anything yet).

More than happy to be as patient as necessary. If no joy by the weekend though I’ll probably just reinstall again.

Here is the output atfer sudo apt-get install --reinstall rbp-userland-osmc (only saw your message after I ran it, but issue still ongoing after running that command and rebooting.

root@wabewewwypi:/home/osmc# ls -lah /opt/vc/lib/
total 3.1M
drwxrwxr-x 4 root root 4.0K Aug  3 16:15 .
drwxr-xr-x 4 root root 4.0K Jan  1  1970 ..
-rw-rw-r-- 1 root root  94K Jul  8 15:21 libbcm_host.so
-rw-rw-r-- 1 root root 198K Jul  8 15:21 libbrcmEGL.so
-rw-rw-r-- 1 root root 104K Jul  8 15:21 libbrcmGLESv2.so
-rw-rw-r-- 1 root root  97K Jul  8 15:21 libbrcmOpenVG.so
-rw-rw-r-- 1 root root  77K Jul  8 15:21 libbrcmWFC.so
-rw-rw-r-- 1 root root 353K Jul  8 15:21 libcontainers.so
-rw-rw-r-- 1 root root  16K Jul  8 15:21 libdebug_sym.so
-rw-rw-r-- 1 root root  13K Jul  8 15:21 libdebug_sym_static.a
-rw-rw-r-- 1 root root  48K Jul  8 15:21 libdtovl.so
-rw-rw-r-- 1 root root 198K Jul  8 15:21 libEGL.so
-rw-rw-r-- 1 root root 238K Jul  8 15:21 libEGL_static.a
lrwxrwxrwx 1 root root   12 Jul  8 15:21 libGLESv1_CM.so -> libGLESv2.so
-rw-rw-r-- 1 root root 104K Jul  8 15:21 libGLESv2.so
-rw-rw-r-- 1 root root  98K Jul  8 15:21 libGLESv2_static.a
-rw-rw-r-- 1 root root  14K Jul  8 15:21 libkhrn_client.a
-rw-rw-r-- 1 root root 439K Jul  8 15:21 libkhrn_static.a
-rw-rw-r-- 1 root root  68K Jul  8 15:21 libmmal_components.so
-rw-rw-r-- 1 root root  81K Jul  8 15:21 libmmal_core.so
-rw-rw-r-- 1 root root  14K Jul  8 15:21 libmmal.so
-rw-rw-r-- 1 root root  87K Jul  8 15:21 libmmal_util.so
-rw-rw-r-- 1 root root  44K Jul  8 15:21 libmmal_vc_client.so
-rw-rw-r-- 1 root root  33K Jul  8 15:21 libopenmaxil.so
-rw-rw-r-- 1 root root  97K Jul  8 15:21 libOpenVG.so
-rw-rw-r-- 1 root root 3.2K Jul  8 15:21 libvcfiled_check.a
-rw-rw-r-- 1 root root  30K Jul  8 15:21 libvchiq_arm.so
-rw-rw-r-- 1 root root 134K Jul  8 15:21 libvchostif.a
-rw-rw-r-- 1 root root  28K Jul  8 15:21 libvcilcs.a
-rw-rw-r-- 1 root root 170K Jul  8 15:21 libvcos.so
-rw-rw-r-- 1 root root  21K Jul  8 15:21 libvcsm.so
-rw-rw-r-- 1 root root  31K Jul  8 15:21 libvmcs_rpc_client.a
-rw-rw-r-- 1 root root  77K Jul  8 15:21 libWFC.so
drwxrwxr-x 2 root root 4.0K Aug  3 16:15 pkgconfig
drwxrwxr-x 2 root root 4.0K Aug  3 16:15 plugins

Interesting that the file is there and yet kodi can’t see it. Maybe an issue with my PATH?

That said the error in journalctl has changed now to…

Aug 03 16:22:47 wabewewwypi mediacenter[377]: Starting Kodi...
Aug 03 16:22:47 wabewewwypi mediacenter[377]: sudo: /usr/lib/kodi/kodi.bin: command not found
Aug 03 16:22:47 wabewewwypi mediacenter[377]: Kodi exited with return code 1 after 0 hours, 0 minutes and 0 seconds
Aug 03 16:22:58 wabewewwypi mediacenter[377]: Failed to set capabilities on file `/usr/lib/kodi/kodi.bin' (Invalid argument)
Aug 03 16:22:58 wabewewwypi mediacenter[377]: The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file

Maybe I have fixed one issue and exposed another besides?

osmc@osmc-ddorf:~$ export | grep PATH
declare -x PATH=“/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin:/usr/osmc/bin:/opt/vc/bin”