Solved Kodi - error while loading shared libraries: li`X11-xcb.so.1
#1
Hello,

my Raspberry OS install (Raspbian GNU/Linux 10 (buster)) on Raspberry PI 4 (4GB) can't seem to be running Kodi (2:18.7-1~buster) anymore, since it fails with (sudo systemctl status kodi):

https://paste.kodi.tv/dinamutacu

I first had the same issue back in April, but somehow after couple reboots, it managed to start again. I basically still watched a movie on Sunday.

The Kodi runs at boot with the /lib/systemd/system/kodi.service:

https://paste.kodi.tv/uwazejuwoq

User kodi is a member of all the needed groups:

kodi : kodi adm dialout cdrom sudo audio video plugdev games users input netdev


I already tried reinstalling the "libxcb1" package because of the "missing library", but no changes. I've also reinstalled kodi via "apt reinstall".

I get this message when doing ldd with the Kodi binary:

https://paste.kodi.tv/usanoxopeq

System is up to date, Kernel is:

Linux pi 5.10.17-v7l+ #1421 SMP Thu May 27 14:00:13 BST 2021 armv7l GNU/Linux

I've made the advancedsettings.xml file under /home/kodi/.kodi/userdata with the <loglevel>2</loglevel>, but no logs are being written after trying to start kodi via "kodi-standalone" or systemctl.


Please for some tips or other indications what could I try (without preferably trying a new install, which should be the last case).
Reply
#2
(2021-06-04, 09:53)thed0g Wrote: Please for some tips or other indications what could I try (without preferably trying a new install, which should be the last case).

I hate to be that guy, but ... doing backups of a good running system is priority #1 in my book. It saves you a boatload of time when reinstalling everything or when things go wrong.

You may want to (also) contact the Raspbian developers, as they are doing their own operating system, as well as their own compiling and packaging of Kodi.
The last time I used Buster + Kodi (half a year ago), it was a straight-on install and things worked™.
Reply
#3
(2021-06-04, 10:25)Klojum Wrote:
(2021-06-04, 09:53)thed0g Wrote: Please for some tips or other indications what could I try (without preferably trying a new install, which should be the last case).

I hate to be that guy, but ... doing backups of a good running system is priority #1 in my book. It saves you a boatload of time when reinstalling everything or when things go wrong.

You may want to (also) contact the Raspbian developers, as they are doing their own operating system, as well as their own compiling and packaging of Kodi.
The last time I used Buster + Kodi (half a year ago), it was a straight-on install and things worked™.

Thank you for the reply. It's not an issue for reinstalling everything, but generally you don't reinstall/throw away stuff immediately that breaks without troubleshooting and trying to fix it. 

I've posted the same question on the "Troubleshooting" section of the raspberrypi.org Forums, where it's still pending approval. I hope they don't think that Kodi is the problem and I should ask on the Kodi forums, because I don't think it's a Kodi issue either, but rather something with the system libraries/configuration. I just thought that in the mean time I could try my chance here, since there might be some more experienced raspi users with Kodi. 

Buster+kodi worked for 2 years now after the install until now, which I'm trying to figure out why not and possibly easily it in the future if it happens again.
Reply
#4
Hmm I suspect corruption of some sorts, it's totally fine it can't load "li`X11-xcb.so.1" because file with that name shouldn't exists. It should be loading libX11-xcb.so.1 .

There are several possibilities.
1) Have you done any overclocking via config.txt? If the answer is yes then try removing it.
2) Have you tried reinstalling Kodi? May help if the message you showed us is to be trusted.
3) Your sd-card may be failing, backup the data you need while you still can and replace the sd-card.
4) Your pi may be faulty but I don't think this is actually the case.

And, yes, questions and issues with Rpi (raspbian) OS and pi hardware are better asked at raspberry pi official forums
Reply
#5
(2021-06-04, 17:45)asavah Wrote: Hmm I suspect corruption of some sorts, it's totally fine it can't load "li`X11-xcb.so.1" because file with that name shouldn't exists. It should be loading libX11-xcb.so.1 .

Yeah, this looks odd in console (I use mobaxterm), the output is like this when displaying the kodi.service status with systemctl. When redirecting to a file it's: https://paste.kodi.tv/ajosohejot

No, no overclocking or any tweaking in the raspi4. When I saw that kodi works, I didn't want to change anything. Kodi reinstallation via apt: https://paste.kodi.tv/atiqoyehir , no changes, same error as above.

I've ran "sudo ldconfig -v" (https://paste.kodi.tv/yabuhofoqa) and checked if the actual libraries are there : https://paste.kodi.tv/qefonimuvu

I tried renaming the library in question (libX11-xcb.so.1.0.0), then reinstalling the package (libx11-xcb1) so an actual new library would be copied there: https://paste.kodi.tv/dukipaqovi

Yeah, I'll probably install a clean raspberry os lite on a different SD card and transfer the configuration there. Probably just needs the files in /home/kodi/.kodi/ (kodi is the user Kodi always ran as)? I just wanted to make sure if there's something to be done to deal with the linkage issue. Usually in such cases you install a missing library, but in this case they seem to be there.
Reply
#6
(2021-06-04, 19:37)thed0g Wrote: Probably just needs the files in /home/kodi/.kodi/ (kodi is the user Kodi always ran as)?

If you run Kodi as a service it will be the user that's written in the .service file.
In this it's kodi , yes, so /home/kodi/.kodi is correct.
 
(2021-06-04, 19:37)thed0g Wrote: I just wanted to make sure if there's something to be done to deal with the linkage issue. Usually in such cases you install a missing library, but in this case they seem to be there.

Yep, that's why I suspected corruption of some kind, lets hope it is the sd-card. Grab a new sd-card and hope everything is ok, it could be the RAM, in which case you would probably need a new pi.
Reply
#7
(2021-06-04, 20:22)asavah Wrote:
(2021-06-04, 19:37)thed0g Wrote: Probably just needs the files in /home/kodi/.kodi/ (kodi is the user Kodi always ran as)?

If you run Kodi as a service it will be the user that's written in the .service file.
In this it's kodi , yes, so /home/kodi/.kodi is correct.
 
(2021-06-04, 19:37)thed0g Wrote: I just wanted to make sure if there's something to be done to deal with the linkage issue. Usually in such cases you install a missing library, but in this case they seem to be there.

Yep, that's why I suspected corruption of some kind, lets hope it is the sd-card. Grab a new sd-card and hope everything is ok, it could be the RAM, in which case you would probably need a new pi.

Well, good and bad news - Kodi ran normally on a new sd card install (Sandisk Extreme), but I don't have any passthrough sound now. I use the same configuration as mentioned here : https://forum.kodi.tv/showthread.php?tid=347279 , basically HDMI from raspi4->this adapter->TV (HDMI)/AV Receiver (Toslink). I've tested the Toslink cable from TV->Receiver and played back media via USB, the DD sound was played normally, so it's not the cable.

Kodi settings:

channels: 2.0
output device: PI HDMI
passthrough: on
pass of DTS: on
pass of DD: on
pass of DD+ off

I've also booted libreelec 9.2.7, but same result, nothing comes to the receiver. Were there any changes regarding this passthrough functionaliy? Or if there's any extra output seen regarding passthrough in the logs? The adapter was working fine one week ago, I mean I can order a new one from Amazon, but I highly doubt that it suddenly died. Also I probably wouldn't get video on the TV if the adapter was dead.
Reply
#8
This is the audiooutput section in the guisettings.xml: https://paste.kodi.tv/cocuvepigo

I've briefly seen something about pulseaudio becoming standard instead of alsa in december 2020, was perhaps something changed there regarding passthrough?
Reply
#9
@thed0g provide a fresh debug log reproducing the problem, someone might have a clue about what's going on.

To receive meaningful assistance you will need to provide a full debug log.

The instructions are here... debug log (wiki)

If you are using the Basic Method, then ensure the following is applied...
1.Enable debugging in Settings>System Settings>Logging,
2.Restart Kodi
3.Replicate the problem.
4.Upload the log to Kodi Paste Site manually or use the Kodi Logfile Uploader. (wiki) With either method post the link to the log back here.

If you are using the Advanced Method ensure you have correctly created and applied the advancedsettings.xml file (wiki)

In both instances, you should see the word DEBUG throughout the log.

Note: Full logs only. No partial or redacted logs
Do NOT post your logs directly into the forum. Use the Kodi Paste Site. Post the link to your pasted log in the forum
Reply
#10
Thank you, you're right.

I've loaded the freshly installed raspberry os + Kodi install on the new card, which now runs Kodi at boot normally. I've enabled debugging in the System and got the LOG/MEM/CPU indicators on the screen. Then I rebooted the raspi4 from Kodi, when it ran automatically again, the debug mode was on (indicators on screen). Then I went to play 2 movies, one with DD5.1 another with DTS. In both cases video was played on TV, but no sound was sent to the receiver. After that I copied the content from /home/kodi/.kodi/temp/kodi.log to the paste.kodi.tv site.

Debug Log: https://paste.kodi.tv/editigacij.kodi
Kodi Audio Settings from guisettings.xml: https://paste.kodi.tv/yatopuguxi
Reply
#11
(2021-06-05, 23:02)thed0g Wrote: I've briefly seen something about pulseaudio becoming standard instead of alsa in december 2020, was perhaps something changed there regarding passthrough?

From your debug log it is clear that you are not using pulseaudio but standard Pi alsa sink.
Sadly I have no receiver and I have no idea about passthrough shenanigans.
May be someone else with experience in this topic can clarify whether it's possible and what's needed to enable passthrough on pi4.

Given that you are using raspios a good way to find an answer would be to ask on their official forums, there should be a Kodi thread somewhere.
Reply
#12
Thanks, I'll do the same debug tomorrow on the libreelec as well, to see if it's the same behaviour.
Reply
#13
(2021-06-06, 00:37)thed0g Wrote: Thanks, I'll do the same debug tomorrow on the libreelec as well, to see if it's the same behaviour.

Try their version 10 beta, it has Kodi 19.x Matrix and should be much better for pi4 than LE 9.x
Reply
#14
(2021-06-06, 01:08)asavah Wrote:
(2021-06-06, 00:37)thed0g Wrote: Thanks, I'll do the same debug tomorrow on the libreelec as well, to see if it's the same behaviour.

Try their version 10 beta, it has Kodi 19.x Matrix and should be much better for pi4 than LE 9.x
Good news! The issue was that when I unplugged everything from raspi4 I replugged it into the hdmi1 port. But now I tried hdmi0 and the sound is coming through the adapter to the AV Receiver. I initially tried libreelec 10 beta, but when I saw the "PCM" on the receiver display, I thought that it must have been the wrong HDMI output used all along. Thank you for all the assistance.

So, if anyone ever looks this up: make sure you use hdmi0 (nearest to USB power port) for audio passthrough to work!
Reply
#15
Thread marked solved.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi - error while loading shared libraries: li`X11-xcb.so.10