Stuck on startup logo

Device: X96
OS version: 9.2.5 on a tf card
Problem: The box stuck on logo screen, can’t startup to Kodi, after a power down, though I can login with SSH.
When it’s normal: It runs hundreds days with no problems, and the latesd update is several days ago.
What I have done:

  • I logged in via SSH, do a manual update (9.2.5 to 9.2.5), problem stayed;
  • I do a fsck on the tf partion, no problem;
  • I run ps | grep kodi and found no kodi process, systemctl status kodi show it is inactive
  • I can run kodi manually with /usr/lib/kodi/kodi.sh
  • I found some inactived service as follow with systemctl list-units
CoreELEC:~ # systemctl list-units | grep -v "loaded active"
UNIT                                                                                LOAD   ACTIVE     SUB       JOB   DESCRIPTION
kodi-aml-hdmimonitor.service                                                        loaded inactive   dead      start Kodi Amlogic HDMI connection monitor
kodi-autostart.service                                                              loaded activating start     start Kodi user autostart script
kodi.service                                                                        loaded inactive   dead      start Kodi Media Center
openvfd.service                                                                     loaded inactive   dead      start OpenVFD Service
kodi.target                                                                         loaded inactive   dead      start Kodi Mediacenter Interface

I don’t know why kodi can’t run on startup, please help.

For a start run this comamnds and post links you get.

systemctl status kodi -l | paste
paste /storage/.kodi/temp/kodi.log
paste /storage/.kodi/temp/kodi.old.log

##############################################
#                  CoreELEC                  #
#            https://coreelec.org            #
##############################################

CoreELEC (official): 9.2.5 (Amlogic.arm)
CoreELEC:~ # systemctl status kodi -l | paste
http://ix.io/2GeO
CoreELEC:~ # paste /storage/.kodi/temp/kodi.log
http://ix.io/2GeP
CoreELEC:~ # paste /storage/.kodi/temp/kodi.old.log
http://ix.io/2GeQ

From kodi.log I see that kodi was started but then regularly stopped.
Try

systemctl enable kodi
systemctl start kodi
systemctl status kodi -l | paste
journalctl | paste

I can’t start kodi with systemctl start, I once waited several minutes but it just hang there.

CoreELEC:~ # systemctl enable kodi
Created symlink /storage/.config/system.d/kodi.target.wants/kodi.service → /usr/lib/systemd/system/kodi.service.
CoreELEC:~ # systemctl start kodi
^C
CoreELEC:~ # systemctl status kodi -l | paste
http://ix.io/2GeR
CoreELEC:~ # journalctl | paste
http://ix.io/2GeS

Never saw such issues :frowning:
What if you start kodi directly - does it start?

/usr/lib/kodi/kodi.bin -fs &

Also run this

find /storage/.config/system.d/ | grep kodi | paste

Yes, it starts, but I must run kodi-config first, or there will be error.

##############################################
#                  CoreELEC                  #
#            https://coreelec.org            #
##############################################

CoreELEC (official): 9.2.5 (Amlogic.arm)

CoreELEC:~ # /usr/lib/kodi/kodi
kodi-after      kodi-config     kodi-safe-mode  kodi.bin        kodi.sh

CoreELEC:~ # /usr/lib/kodi/kodi.bin -fs &

CoreELEC:~ # /usr/lib/kodi/kodi.bin: error while loading shared libraries: libcec.so.4: cannot open shared object file: No such file or directory
^C

CoreELEC:~ # /usr/lib/kodi/kodi.sh
/usr/lib/kodi/kodi.bin: error while loading shared libraries: libcec.so.4: cannot open shared object file: No such file or directory
[1]+  Done(127)                  /usr/lib/kodi/kodi.bin -fs

CoreELEC:~ # cat /usr/lib/systemd/system/kodi
kodi-aml-hdmimonitor.service    kodi-cleanpackagecache.service  kodi-poweroff.service           kodi.service                    kodi.target.wants/
kodi-autostart.service          kodi-halt.service               kodi-reboot.service             kodi.service.wants/
kodi-cleanlogs.service          kodi-lirc-suspend.service       kodi-waitonnetwork.service      kodi.target

CoreELEC:~ # cat /usr/lib/systemd/system/kodi.service
[Unit]
Description=Kodi Media Center
After=network-online.target graphical.target
Requires=graphical.target
Wants=network-online.target

[Service]
Environment=__GL_YIELD=USLEEP
Environment=DISPLAY=:0.0
Environment=WAYLAND_DISPLAY=wayland-0
Environment=SDL_MOUSE_RELATIVE=0
Environment=HOME=/storage
Environment=KODI_TEMP=/storage/.kodi/temp
Environment=KODI_HOME=/usr/share/kodi/
EnvironmentFile=-/run/libreelec/kodi.conf
EnvironmentFile=-/run/libreelec/debug/kodi.conf
ExecStartPre=-/usr/lib/kodi/aml-wait-for-dispcap.sh
ExecStartPre=-/usr/lib/kodi/kodi-config
ExecStart=/usr/lib/kodi/kodi.sh --standalone -fs $KODI_ARGS $KODI_DEBUG
ExecStop=/bin/kill -TERM $MAINPID
ExecStopPost=-/usr/lib/kodi/kodi-safe-mode
TimeoutStopSec=30
Restart=always
RestartSec=2
StartLimitInterval=0
LimitNOFILE=16384
TimeoutStartSec=300

[Install]
WantedBy=kodi.target

CoreELEC:~ # /usr/lib/kodi/kodi.sh
/usr/lib/kodi/kodi.bin: error while loading shared libraries: libcec.so.4: cannot open shared object file: No such file or directory

CoreELEC:~ # /usr/lib/kodi/aml-wait-for-dispcap.sh

CoreELEC:~ # /usr/lib/kodi/kodi.sh
/usr/lib/kodi/kodi.bin: error while loading shared libraries: libcec.so.4: cannot open shared object file: No such file or directory

CoreELEC:~ # /usr/lib/kodi/kodi-config

CoreELEC:~ # /usr/lib/kodi/kodi.sh
^[OBkillall: hd-idle: no process killed
^C

CoreELEC:~ # find /storage/.config/system.d/ | grep kodi
/storage/.config/system.d/kodi.target.wants
/storage/.config/system.d/kodi.target.wants/kodi.service

CoreELEC:~ #

It’s strange, I checked kodi.service and find requires graphical.target and network-online.target satisfied, and ExecStartPre scripts report no errors, no reason why service kodi stuck there.

CoreELEC:~ # systemctl list-units -t target

UNIT                  LOAD   ACTIVE   SUB    JOB   DESCRIPTION
basic.target          loaded active   active       Basic System
graphical.target      loaded active   active       Graphical Interface
kodi.target           loaded inactive dead   start Kodi Mediacenter Interface
local-fs.target       loaded active   active       Local File Systems
multi-user.target     loaded active   active       Multi-User System
network-online.target loaded active   active       Network is Online
network.target        loaded active   active       Network
paths.target          loaded active   active       Paths
rpcbind.target        loaded active   active       RPC Port Mapper
slices.target         loaded active   active       Slices
sockets.target        loaded active   active       Sockets
sound.target          loaded active   active       Sound Card
swap.target           loaded active   active       Swap
sysinit.target        loaded active   active       System Initialization
time-set.target       loaded active   active       System Time Set
time-sync.target      loaded active   active       System Time Synchronized
timers.target         loaded active   active       Timers

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
JOB    = Pending job for the unit.

17 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

Why do you have file /storage/.config/system.d/kodi.target.wants/kodi.service? I don’t think it should be there.
Try to move it and reboot

mv /storage/.config/system.d/kodi.target.wants/kodi.service /storage/
reboot

It’s generated just now, when I ran:

CoreELEC:~ # systemctl enable kodi
Created symlink /storage/.config/system.d/kodi.target.wants/kodi.service → /usr/lib/systemd/system/kodi.service.
CoreELEC:~ # systemctl start kodi
^C
CoreELEC:~ # systemctl status kodi -l | paste
http://ix.io/2GeR
CoreELEC:~ # journalctl | paste
http://ix.io/2GeS

Its timestamp:

CoreELEC:~ # ls -l .config/system.d/kodi.target.wants/kodi.service
lrwxrwxrwx    1 root     root            36 Dec  2 17:14 .config/system.d/kodi.target.wants/kodi.service -> /usr/lib/systemd/system/kodi.service
CoreELEC:~ # ls -l /usr/lib/systemd/system/kodi.service
-rw-rw-r--    1 root     root           848 Oct 29 03:20 /usr/lib/systemd/system/kodi.service

I run your cmds and nothing changed:

##############################################
#                  CoreELEC                  #
#            https://coreelec.org            #
##############################################

CoreELEC (official): 9.2.5 (Amlogic.arm)
CoreELEC:~ # ps | grep kodi
 2713 root      0:00 /storage/.kodi/addons/service.system.docker/bin/dockerd --exec-opt native.cgroupdriver=systemd --log-driver=journald --group=root --data-root=/storage/.kodi/userdata/addon_data/service.system.docker/docker --storage-driver=overlay2 --storage-opt overlay2.override_kernel_check=1
 3111 root      0:00 grep kodi

Sorry but I don’t understand what is going on :frowning:
If I’m correct kodi starts manually with this 2 commands but something is wrong with service?

/usr/lib/kodi/kodi-config
/usr/lib/kodi/kodi.sh

Yes, kodi will start and screen lightened with the 2 commands.
I’m also confused why the service not started with OS and failed to run even with systemctl start cmd. I know little about coreelec and its filesystem.

If the problem stays unsolved, I will make a script containing the 2 commands and run it when OS needs a restart.

Thank you for your time!

@Ashanti did you try another boot media with a clean install to?

Maybe your uSD card is faulty? You can also scan the card in another PC for like defect sectors?

1 Like

Also do you have any display (TV) connected?

I have one udisk, which was used before I write OS to the tf card, but I tried just now and found it broken.
Problem solved, after I plug the VGA cable out of my laptop.

My monitor have one VGA and one HDMI port, X96 connected with the HDMI port, and several days ago I connected the VGA port with my laptop. I just plugged the VGA cable out of my laptop and rebooted CoreElec, now it worked.

@vpeter @Portisch Thanks for your help! It really helps.

I will keep the VGA cable connected with my laptop because I use it more often. When one more device connected to a same monitor with another video port, kodi fails to start, is it a known bug, will it be fixed?

This is not a bug: Kodi needs working display. If there is no any it doesn’t start.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.