Kodi wont start ?

I ran desktop-software to install kodi on top of dietpi
Install apparently carried out ok
Then I changed the appropriate tags inside /root/.kodi/userdata/guisettings.xml to enable remote web access.
Then I rebooted (as I could not find how to “simply” restart kodi)

  • can’t access kodi via web
  • kodi doesnt autostart even if enable in dietpi-whatever
  • running startkodi from terminal results in :
    /usr/bin/kodi: 1: /usr/bin/kodi: fbset: not found

I tried the above on TWO different raspberry pi (a 1B and a 3B) with identical result

Any idea what am I doing wrong ??

Thanks!

Alberto

Thanks for your report.

Note that on Raspberry Pi the (functional) Kodi binary is: kodi-standalone
Our wrapper that is used for autostart and desktop icon does nothing else on RPi: /DietPi/dietpi/misc/start_kodi

When you run dietpi-autostart from terminal, select Kodi (index 1), logout the session via exit and log in again, Kodi is not automatically starting?

For “restarting” Kodi it has a logout (or exit to terminal) button. Afterwards rerun kodi-standalone.

When you run dietpi-autostart from terminal, select Kodi (index 1), logout the session via exit and log in again, Kodi is not automatically starting?

No.

Note that on Raspberry Pi the (functional) Kodi binary is: kodi-standalone

Tried that. Same result as before:
/usr/bin/kodi: 1: /usr/bin/kodi: fbset: not found

You know what? I’m unistalling kodi and re-installing it. Let’s see what happenZ :slight_smile: I’ll post in a while

So:

  • unistalled Kodi
  • rebooted
  • reinstalled Kodi
  • set kodi to autorun
  • reboot

Kodi process was up and running. So far so good.

Then I went ahead and modified guisettings.xml to enable web access etc.

Then I needed to restart Kodi.

I presume (?) that your suggestion

For “restarting” Kodi it has a logout (or exit to terminal) button

refers to kodi’s gui, which I cannot get yet until I enable web access.

So I used the ol’ brute force method: kill the process.

After that, kodi-standalone

and back I have:

/usr/bin/kodi: 1: /usr/bin/kodi: fbset: not found

I suppose kodi did not like my killing…

How can I “more cleanly” proceed ?

Thanks for you continued help :slight_smile:

Alberto

Ah okay you have no local terminal access at all?

Cleanest way to kill it from SSH: killall kodi-standalone kodi
With your method you need to assure that the underlying X server (xinit) is down as well, e.g. check via htop.

Starting Kodi from SSH session is possible as well: xinit kodi-standalone & works on my test x86 machine to start Kodi on the local screen. Otherwise reboot + rely on autostart should work. Possibly on RPI kodi-standalone & (skipping xinit) will work as well from SSH, not sure.

However as of the error output it simply seems that Kodi requires the fbset package. That was not the case before, perhaps new with Kodi 18. And I just run Kodi 17.1 successfully here without fbset :thinking:.

Test G_AGI fbset and then try from SSH: kodi-standalone & or xinit kodi-standalone &
Otherwise reboot and rely on autostart.

If that indeed solves the problem, we will add fbset as dependency to Kodi install on RPi.

Update:

I plugged one of the two Raspis I am playing with on a tv (via hdmi of course) and it really seems that

  • without fbset the kodi process does start, but I get no kodi on the tv
  • install fbset, reboot, kodi is output to the TV

yes, I’m talking about Kodi 18 (i.e. the one that gets installed automatically by your script anyway)

BUT…

  1. Even installing fbset on the second Raspi, which I never connected to the TV, though, something keeps resetting guisettings.xml , in particular esallinterfaces and webserver are both reset to false, and kodi gui keeps being inaccessible via web.

  2. If I unplug the firts Raspi from TV & power, and repower it with the HDMI cable disconnected, the box turns on (as far as the leds say) but I cant ssh it.

  3. Unpower first Raspi, reconnect HDMI, repower it. Kodi comes up on the TV and I can again ssh it, and I can remote-web it too.

By googling around I found someone who packaged a so-called “headless kodi” in a docker container.
I played with that a bit too.

The matter is not fully clear to me yet but it seems that when you do succed firing kodi up at boot time, the app requires to find an HDMI target to complete its startup or it refuses to give control back to the underlying OS. Maybe there’s a switch inside the app/its xml files to allow for an hdmi-loose startup - maybe worth a look.

Overall, bloody Kodi in general seems not to like lower-level fiddling at all, or, better said, seems not a well layered / modular application at all. You can access its db, config files, etc, but most of those can’t be as freely modified as expected by their very accessibility. Which fundamentally means it seems not an “open” platform at all; it’s rather a “closed” base-system with an open-published plug-in development grammar (and in facts if you are looking for a kodi plugin to interface your toaster you’ll probably find it).

Ah well…

ciao
A.

Did you try to enable the web interface via the GUI: Settings → Services → Control → Allow remote control via HTTP
Ref: https://kodi.wiki/view/Web_interface

Perhaps the GUI is resetting the settings file, although it should read the settings from it on start. Not sure.

Okay so we need to install fbset with Kodi on RPi.

About SSH not working without HDMI. This is a bid strange since Kodi on TTY1 and SSH on PTS1 have nothing to do with each other. The SSH service starts way before the login script starts Kodi :thinking:. Did you give it some time to boot up (not just LEDs) before attempting SSH?
I will check how xinit/Kodi behaves when started without monitor attached. If indeed some issue happens then (although it should not matter) perhaps we can check for attached screen and otherwise prevent Kodi and generally graphical autostart options from being started.

I tried to change DietPi-Config > Display Options > Display Resolution and Kodi stopped working.

/usr/bin/kodi: 1: /usr/bin/kodi: fbset: not found

  • failed to add service - already in use?

This seems to be the same problem. I tried all the suggestions mentioned here but nothing helped.

Thanks.

Please try: G_AGI fbset

Thanks, this seemed to fix the first part. Why do I have to install it manually anyway?

I tried killall kodi-standalone kodi as well. But after restart or running kodi-standalone & I still get:

  • failed to add service - already in use?

And no Kodi starts.

xinit kodi-standalone & throws this error

MESA-LOADER: failed to retrieve device information

Any ideas?

kodi-standalone must not be started in background (with &), AFAIK, at least we never did. Our Kodi start wrapper btw: startkodi

And on RPi “standalone” it is meant to be executed without xinit.

Please try simply: kodi-standalone