Kodi v18.1 hangs 20 seconds during startup on Philips Oreo TV
#1
Hi
I'm running Kodi v18.1 on a Philips 55pos9002, with android Oreo. During startup I initially get a black screen for ca 20 seconds, before the startup splash screen occurs. After that everything runs smoothly 
I enabled debug logging. After checking the log file, I'm quite positive that this is a network delay caused by looking up the "local Hostname".  Instead of retrieving the TV set  network name (note: "woonkamer" was configured in the network section of the Philips settings menu and as such published to the router), it reports a composed hostname that is even not consistent for each startup. Please note two logging snapshots below reporting different local hostnames:

Code:
2019-03-09 11:53:02.357 T:8217  NOTICE: -----------------------------------------------------------------------
2019-03-09 11:53:02.358 T:8217  NOTICE: Starting Kodi (18.1 Git:20190228-80b339717e). Platform: Android ARM 32-bit
2019-03-09 11:53:02.358 T:8217  NOTICE: Using Release Kodi x32 build
2019-03-09 11:53:02.358 T:8217  NOTICE: Kodi compiled 2019-02-28 by Clang 7.0.2 (https://android.googlesource.com/toolchain/clang 003100370607242ddd5815e4a043907ea9004281) (https://android.googlesource.com/toolchain/llvm 1d739ffb0366421d383e04ff80ec2ee591315116) for Android ARM 32-bit API level 21 (API level 21)
2019-03-09 11:53:02.358 T:8217  NOTICE: Running on Philips TPM171E with Android 8.0.0 API level 26, kernel: Linux ARM 32-bit version 3.10.79
2019-03-09 11:53:02.358 T:8217  NOTICE: FFmpeg version/source: 4.0.3-Kodi
2019-03-09 11:53:02.358 T:8217  NOTICE: Host CPU: ARMv7 Processor rev 2 (v7l), 4 cores available
2019-03-09 11:53:02.358 T:8217  NOTICE: Product: PH7M_EU_5596, Device: PH7M_EU_5596, Board: TPM17XE_96 - Manufacturer: Philips, Brand: Philips, Model: TPM171E, Hardware: mt5891
2019-03-09 11:53:02.362 T:8217  NOTICE: External storage path = /storage/emulated/0; status = ok
2019-03-09 11:53:02.362 T:8217  NOTICE: ARM Features: Neon enabled
2019-03-09 11:53:02.362 T:8217  NOTICE: special://xbmc/ is mapped to: /data/user/0/org.xbmc.kodi/cache/apk/assets
2019-03-09 11:53:02.362 T:8217  NOTICE: special://xbmcbin/ is mapped to: /data/user/0/org.xbmc.kodi/cache/apk/assets
2019-03-09 11:53:02.362 T:8217  NOTICE: special://xbmcbinaddons/ is mapped to: /data/user/0/org.xbmc.kodi/cache/apk/assets/addons
2019-03-09 11:53:02.362 T:8217  NOTICE: special://masterprofile/ is mapped to: /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/userdata
2019-03-09 11:53:02.362 T:8217  NOTICE: special://envhome/ is mapped to: /storage/emulated/0/Android/data/org.xbmc.kodi/files
2019-03-09 11:53:02.362 T:8217  NOTICE: special://home/ is mapped to: /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi
2019-03-09 11:53:02.362 T:8217  NOTICE: special://temp/ is mapped to: /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/temp
2019-03-09 11:53:02.362 T:8217  NOTICE: special://logpath/ is mapped to: /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/temp
2019-03-09 11:53:02.363 T:8217  NOTICE: The executable running is: /data/app/org.xbmc.kodi-SIt5hqKQs8UMmTwT0nyQIA==/lib/arm/libkodi.so
2019-03-09 11:53:22.390 T:8217  NOTICE: Local hostname: Android-4.fritz.box
2019-03-09 11:53:22.390 T:8217  NOTICE: Log File is located: /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/temp/kodi.log
2019-03-09 11:53:22.391 T:8217  NOTICE: -----------------------------------------------------------------------
2019-03-09 11:53:22.391 T:8217    INFO: loading settings

and the second:

Code:
2019-03-10 14:43:41.914 T:8919 NOTICE: The executable running is: /data/app/org.xbmc.kodi-SIt5hqKQs8UMmTwT0nyQIA==/lib/arm/libkodi.so
2019-03-10 14:44:01.938 T:8919 NOTICE: Local hostname: Android-2.fritz.box
2019-03-10 14:44:01.938 T:8919 NOTICE: Log File is located: /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/temp/kodi.log
2019-03-10 14:44:01.938 T:8919 NOTICE: -----------------------------------------------------------------------
2019-03-10 14:44:01.938 T:8919 INFO: loading settings

As this occurs before reading the configuration (files), I presume it is not setting related!

The Philips version of Android Oreo definitely screwed up something with respect looking up network settings like the hostname. When I  tried to retrieve the local hostname by using Python in the autoexec.py, I noticed both the commands platform.node and sockets.gethostname return "localhost" instead of the configured networkname "woonkamer".

My suggestion: If the local hostname can't be assessed via this Android version, it would be much better to take a locally configured hostname instead of looking this up via the router. That would avoid a black screen for 20 seconds during startup
 
Thanks for all the great efforts as I really enjoy using Kodi. If this can be fixed as well would be great.
Best Regards
Eric
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi v18.1 hangs 20 seconds during startup on Philips Oreo TV0