Kodi Community Forum

Full Version: Kodi v18 slow launch with OSX Mojave
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Just upgraded to OSX Mojave and installed a fresh version of the latest Kodi v18 beta.  The app appears to freeze during the launch for about 20 seconds before finally starting.
Log here.

You can see that the startup process hangs for quite a while (20 seconds or so) at this point before continuing:

20:45:06.183 T:4910646720  NOTICE: Checking resolution 15
20:45:26.172 T:4910646720    INFO: RetroPlayer[PROCESS]: Registering process control for macOS
Does the same happen, if you install a real Kodi beta or only with retroplayer test builds?
I've tried Kodi v17 and the last nightly Beta.  v17 has a pause in the same spot, but it only appears to be ~2 seconds:

08:31:16.370 T:4636755392  NOTICE: -----------------------------------------------------------------------
08:31:16.370 T:4636755392  NOTICE: Starting Kodi (17.6 Git:20171114-a9a7a20). Platform: OS X x86 64-bit
08:31:16.370 T:4636755392  NOTICE: Using Release Kodi x64 build
08:31:16.832 T:4636755392  NOTICE: Found possible resolution for display 0 with 640 x 480 @ 60.000000 Hz
08:31:16.832 T:4636755392  NOTICE: Checking resolution 16
08:31:18.767 T:4636755392  NOTICE: GL_VENDOR = Intel Inc.
08:31:18.767 T:4636755392  NOTICE: GL_RENDERER = Intel® Iris™ Graphics 6100

The latest nightly has the same pause (seems to vary a lot in timing each start):

08:36:00.914 T:4687795648  NOTICE: -----------------------------------------------------------------------
08:36:00.914 T:4687795648  NOTICE: Starting Kodi (18.0-BETA3 Git:20181001-6fb44a8512). Platform: OS X x86 64-bit
08:36:00.914 T:4687795648  NOTICE: Using Debug Kodi x64 build
08:39:00.697 T:4917036480  NOTICE: Checking resolution 15
08:39:13.214 T:4917036480    INFO: RetroPlayer[PROCESS]: Registering process control for macOS

The hang seems to 'take over' the computer as well.  I can't bring anything else into focus when this pause is happening, the only thing I can do is move my mouse around.  Looking at the activity monitor, there is no jump in CPU corresponding to this pause.
Could you try to disable that setting in OS X that results in each screen having its own space? Not sure how exactly it is called - not near at a Mac atm.
(2018-10-04, 20:19)Memphiz Wrote: [ -> ]Could you try to disable that setting in OS X that results in each screen having its own space? Not sure how exactly it is called - not near at a Mac atm.
 I'm guessing its referring to the Mission Control "Displays have separate spaces"?  I turned it off with no real change.  The mac I'm using is a laptop with no other displays connected if it makes a difference:

12:39:04.092 T:4750505408  NOTICE: Checking resolution 15
12:39:04.241 T:123145353801728   DEBUG: CCoreAudioStream::Close: Restoring original physical format for stream 0x002f. ([lpcm] Mixable Interleaved 2 Channel 24-bit Signed Integer LE (44100Hz))
12:39:04.529 T:123145353801728   DEBUG: CCoreAudioStream::SetPhysicalFormat: Physical format for stream 0x002f. now active ([lpcm] Mixable Interleaved 2 Channel 32-bit Floating Point LE (44100Hz))
12:39:04.529 T:123145353801728   DEBUG: CCoreAudioStream::Close: Closed stream 0x002f.
12:39:23.355 T:4750505408    INFO: RetroPlayer[PROCESS]: Registering process control for macOS

I also note now that when using a launcher type addon (IAGL or Advanced Emulator Launcher), there's an appreciable delay in the launch of the new process (via python's subprocess).  Example:

12:42:38.618 T:123145358708736  NOTICE: IAGL:  Sending Launch Command: "/Applications/RetroArch.app/Contents/MacOS/RetroArch"  -L "/Applications/RetroArch.app/Contents/Resources/cores/puae_libretro.dylib" "/Users/zc/Library/Application Support/Kodi/userdata/addon_data/plugin.program.iagl/temp_iagl/Lemmings/Lemmings.m3u"
12:42:55.321 T:4750505408   DEBUG: ------ Window Init (Pointer.xml) ------
12:42:56.435 T:4750505408   DEBUG: ------ Window Deinit (Pointer.xml) ------
12:42:57.282 T:4750505408   DEBUG: WinSystemOSX: Fullscreen window RetroArch obscures XBMC!
I think i have the same odd behavior. And even more strange behavior whenever i compile kodi with newest Xcode 10. Mojave has a really strange behavior when it comes to full screen apps. They changed something [tm]
Same issue as you describe. Also, have you noticed fonts in other apps get bold while Kodi (nightly from yesterday, but also before) is running full screen? e.g. names in Telegram Messenger app, titles in the iTunes mini player.

Mojave hasn't been good for me so far. A lot of issues.
I at least found one of the causes of the delay and freeze. Its deep down into an OpenGL call (NSOpenGLContext setview) were everything freezes for 6 seconds here. I fear this has something to do with the fact that apple deprecated OpenGL in Mojave and forces all developers to transition to Metal. I also think the other behaviors we see have to do with this. I don't think there will be a quick fix for Kodi atm. Transition to Metal is such a big undertaking, that it even might kill mac os as platform for Kodi if nobody has the needed time, skills and motivation to do this.
Hi !

So would this mean to buy a new Mac Mini with Mojave isn't a good idea atm ? My old one is damaged and i plan to buy a new one. I got the Mini only for using Kodi ... and the new one should take over the Kodi Task ...

Do it or not ?
If only for Kodi I would go for a nuc and put libreelec on it. Much cheaper and does the job better (because it supports more audio formats then Mac and better refresh rate switching)
Ups ... now i bought a late 2014 Mac Mini ...  Confused
I have the same problem. Kodi v17.6 and v18 until RC5 takes 10 seconds to show its UI.
Just after Mojave update. (Mac mini 2012, 16 gb, SSD - Kodi on it)
Is that something devs are aware of ?
It’s not a big thing in terms of use but it’s about to know why I ;-)

Info : tried kodi update, tried complete uninstall, reinstall... no success.
Yes i am aware off. Mojave does some thing strange when Kodi starts (firing display disconnected/connected events).

As other apps don’t seem to show the issue is have all hopes up that rewriting the whole windowing system for OSX and getting rid of SDL will cure the issue. This is a long standing task which i was not able to finish yet. My Kodi time is not likely to increase in the next year though.
Thank you for your time and I'm crossing my fingers ;-)
SOLVED ! finally !

Quit Kodi
Go to Mac preferences > Mac Security Preference Pane > Confidentiality > Accessibility 
Remove all Kodi entries
Restart Kodi and cancel the message warning for allow kodi manage accessibility prefs
Kodi is so fast at start now.
Pages: 1 2