Kodi fails to launch on rPi4 with PulseAudio and X11 errors

Hi, I have a fresh install of Buster from the Experimental Image on a Raspberry Pi 4, the only thing I have done since the initial install and update is install Kodi using dietpi-launcher.

The installation appeared to go well with dependencies being installed, however after reboot I get the error that Kodi cannot start the GUI.

Here’s the log:

############## Kodi CRASH LOG ###############

################ SYSTEM INFO ################
 Date: Sat 27 Jul 16:31:21 BST 2019
 Kodi Options:
 Arch: armv7l
 Kernel: Linux 4.19.58-v7l+ #1245 SMP Fri Jul 12 17:31:45 BST 2019
 Release: Raspbian GNU/Linux 10 (buster)
############## END SYSTEM INFO ##############

############### STACK TRACE #################
gdb not installed, can't get stack trace.
############# END STACK TRACE ###############

################# LOG FILE ##################

16:30:59.658 T:2904463920  NOTICE: special://profile/ is mapped to: special://masterprofile/
16:30:59.658 T:2904463920  NOTICE: -----------------------------------------------------------------------
16:30:59.658 T:2904463920  NOTICE: Starting Kodi from Debian (17.6 Debian package version: 2:17.6+dfsg1-4+b1). Platform: Linux ARM 32-bit
16:30:59.658 T:2904463920  NOTICE: Using Release Kodi from Debian x32 build
16:30:59.659 T:2904463920  NOTICE: Kodi from Debian compiled from 2:17.6+dfsg1-4+b1 by GCC 8.2.0 for Linux ARM 32-bit version 4.18.20 (266772)
16:30:59.659 T:2904463920  NOTICE: Running on Raspbian GNU/Linux 10 (buster), kernel: Linux ARM 32-bit version 4.19.58-v7l+
16:30:59.659 T:2904463920  NOTICE: FFmpeg version/source: 4.1.3-1+rpt1
16:30:59.659 T:2904463920  NOTICE: Host CPU: ARMv7 Processor rev 3 (v7l), 4 cores available
16:30:59.659 T:2904463920  NOTICE: ARM Features: Neon disabled
16:30:59.659 T:2904463920  NOTICE: special://xbmc/ is mapped to: /usr/share/kodi
16:30:59.659 T:2904463920  NOTICE: special://xbmcbin/ is mapped to: /usr/lib/arm-linux-gnueabihf/kodi
16:30:59.659 T:2904463920  NOTICE: special://xbmcbinaddons/ is mapped to: /usr/lib/arm-linux-gnueabihf/kodi/addons
16:30:59.659 T:2904463920  NOTICE: special://masterprofile/ is mapped to: /root/.kodi/userdata
16:30:59.659 T:2904463920  NOTICE: special://envhome/ is mapped to: /root
16:30:59.659 T:2904463920  NOTICE: special://home/ is mapped to: /root/.kodi
16:30:59.659 T:2904463920  NOTICE: special://temp/ is mapped to: /root/.kodi/temp
16:30:59.659 T:2904463920  NOTICE: special://logpath/ is mapped to: /root/.kodi/temp
16:30:59.659 T:2904463920  NOTICE: The executable running is: /usr/lib/arm-linux-gnueabihf/kodi/kodi.bin
16:30:59.659 T:2904463920  NOTICE: Local hostname: DietPi
16:30:59.659 T:2904463920  NOTICE: Log File is located: /root/.kodi/temp//kodi.log
16:30:59.659 T:2904463920  NOTICE: -----------------------------------------------------------------------
16:30:59.662 T:2904463920   ERROR: DBus: Error org.freedesktop.DBus.Error.ServiceUnknown - The name org.freedesktop.UPower was not provided by any .service files
16:30:59.668 T:2904463920  NOTICE: load settings...
16:30:59.690 T:2904463920   ERROR: PulseAudio: Failed to connect context
16:30:59.690 T:2904463920  NOTICE: PulseAudio might not be running. Context was not created.
16:30:59.704 T:2904463920  NOTICE: No Devices found - retry: 4
16:31:01.205 T:2904463920   ERROR: PulseAudio: Failed to connect context
16:31:01.205 T:2904463920  NOTICE: PulseAudio might not be running. Context was not created.
16:31:01.232 T:2904463920  NOTICE: No Devices found - retry: 3
16:31:02.733 T:2904463920   ERROR: PulseAudio: Failed to connect context
16:31:02.733 T:2904463920  NOTICE: PulseAudio might not be running. Context was not created.
16:31:02.745 T:2904463920  NOTICE: No Devices found - retry: 2
16:31:04.247 T:2904463920   ERROR: PulseAudio: Failed to connect context
16:31:04.252 T:2904463920  NOTICE: PulseAudio might not be running. Context was not created.
16:31:04.275 T:2904463920  NOTICE: No Devices found - retry: 1
16:31:05.776 T:2904463920   ERROR: PulseAudio: Failed to connect context
16:31:05.776 T:2904463920  NOTICE: PulseAudio might not be running. Context was not created.
16:31:05.788 T:2904463920  NOTICE: Found 0 Lists of Devices
16:31:05.789 T:2904463920   ERROR: PulseAudio: Failed to connect context
16:31:05.789 T:2904463920  NOTICE: PulseAudio might not be running. Context was not created.
16:31:05.836 T:2904463920  NOTICE: No Devices found - retry: 4
16:31:07.338 T:2904463920   ERROR: PulseAudio: Failed to connect context
16:31:07.338 T:2904463920  NOTICE: PulseAudio might not be running. Context was not created.
16:31:07.363 T:2904463920  NOTICE: No Devices found - retry: 3
16:31:08.864 T:2904463920   ERROR: PulseAudio: Failed to connect context
16:31:08.864 T:2904463920  NOTICE: PulseAudio might not be running. Context was not created.
16:31:08.877 T:2904463920  NOTICE: No Devices found - retry: 2
16:31:10.378 T:2904463920   ERROR: PulseAudio: Failed to connect context
16:31:10.383 T:2904463920  NOTICE: PulseAudio might not be running. Context was not created.
16:31:10.412 T:2904463920  NOTICE: No Devices found - retry: 1
16:31:11.913 T:2904463920   ERROR: PulseAudio: Failed to connect context
16:31:11.913 T:2904463920  NOTICE: PulseAudio might not be running. Context was not created.
16:31:11.925 T:2904463920  NOTICE: Found 0 Lists of Devices
16:31:11.930 T:2904463920  NOTICE: No settings file to load (special://xbmc/system/advancedsettings.xml)
16:31:11.930 T:2904463920  NOTICE: No settings file to load (special://masterprofile/advancedsettings.xml)
16:31:11.930 T:2904463920  NOTICE: Default Video Player: VideoPlayer
16:31:11.930 T:2904463920  NOTICE: Default Audio Player: paplayer
16:31:11.930 T:2904463920  NOTICE: Disabled debug logging due to GUI setting. Level 0.
16:31:11.930 T:2904463920  NOTICE: Log level changed to "LOG_LEVEL_NORMAL"
16:31:11.931 T:2904463920  NOTICE: Loading player core factory settings from special://xbmc/system/playercorefactory.xml.
16:31:11.931 T:2904463920  NOTICE: Loaded playercorefactory configuration
16:31:11.931 T:2904463920  NOTICE: Loading player core factory settings from special://masterprofile/playercorefactory.xml.
16:31:11.931 T:2904463920  NOTICE: special://masterprofile/playercorefactory.xml does not exist. Skipping.
16:31:11.939 T:2904463920  NOTICE: Running database version Addons27
16:31:11.965 T:2202004112   ERROR: PulseAudio: Failed to connect context
16:31:11.965 T:2202004112  NOTICE: PulseAudio might not be running. Context was not created.
16:31:11.976 T:2202004112  NOTICE: No Devices found - retry: 4
16:31:13.478 T:2202004112   ERROR: PulseAudio: Failed to connect context
16:31:13.478 T:2202004112  NOTICE: PulseAudio might not be running. Context was not created.
16:31:13.510 T:2202004112  NOTICE: No Devices found - retry: 3
16:31:15.011 T:2202004112   ERROR: PulseAudio: Failed to connect context
16:31:15.011 T:2202004112  NOTICE: PulseAudio might not be running. Context was not created.
16:31:15.023 T:2202004112  NOTICE: No Devices found - retry: 2
16:31:16.525 T:2202004112   ERROR: PulseAudio: Failed to connect context
16:31:16.525 T:2202004112  NOTICE: PulseAudio might not be running. Context was not created.
16:31:16.557 T:2202004112  NOTICE: No Devices found - retry: 1
16:31:18.057 T:2202004112   ERROR: PulseAudio: Failed to connect context
16:31:18.057 T:2202004112  NOTICE: PulseAudio might not be running. Context was not created.
16:31:18.070 T:2202004112  NOTICE: Found 0 Lists of Devices
16:31:18.076 T:2202004112 WARNING: ActiveAE::Configure - sink returned large buffer of 249 ms, reducing to 100 ms
16:31:18.094 T:2904463920   ERROR: X11 Error: No Display found
16:31:18.094 T:2904463920   FATAL: CApplication::Create: Unable to init windowing system


############### END LOG FILE ################

############ END Kodi CRASH LOG #############

Any ideas on how to debug and fix this issue?

For what it’s worth, I’m having the same problem.

12:21:19.152 T:2904087088  NOTICE: The executable running is: /usr/lib/arm-linux-gnueabihf/kodi/kodi.bin
12:21:19.152 T:2904087088  NOTICE: Local hostname: office-kodi
12:21:19.152 T:2904087088  NOTICE: Log File is located: /root/.kodi/temp//kodi.log
12:21:19.152 T:2904087088  NOTICE: -----------------------------------------------------------------------
12:21:19.155 T:2904087088   ERROR: DBus: Error org.freedesktop.DBus.Error.ServiceUnknown - The name org.freedesktop.UPower was not provided by any .service files
12:21:19.162 T:2904087088  NOTICE: load settings...
12:21:19.185 T:2904087088   ERROR: PulseAudio: Failed to connect context
12:21:19.185 T:2904087088  NOTICE: PulseAudio might not be running. Context was not created.
12:21:19.204 T:2904087088  NOTICE: Found 1 Lists of Devices
12:21:19.204 T:2904087088  NOTICE: Enumerated ALSA devices:
12:21:19.204 T:2904087088  NOTICE:     Device 1
12:21:19.205 T:2904087088  NOTICE:         m_deviceName      : @
12:21:19.205 T:2904087088  NOTICE:         m_displayName     : Default (bcm2835 ALSA bcm2835 ALSA)
12:21:19.205 T:2904087088  NOTICE:         m_displayNameExtra:
12:21:19.205 T:2904087088  NOTICE:         m_deviceType      : AE_DEVTYPE_PCM
12:21:19.205 T:2904087088  NOTICE:         m_channels        : FL,FR
12:21:19.205 T:2904087088  NOTICE:         m_sampleRates     : 8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,176400,192000
12:21:19.205 T:2904087088  NOTICE:         m_dataFormats     : AE_FMT_S16NE,AE_FMT_S16LE,AE_FMT_U8
12:21:19.205 T:2904087088  NOTICE:         m_streamTypes     : No passthrough capabilities
12:21:19.209 T:2904087088  NOTICE: No settings file to load (special://xbmc/system/advancedsettings.xml)
12:21:19.210 T:2904087088  NOTICE: No settings file to load (special://masterprofile/advancedsettings.xml)
12:21:19.210 T:2904087088  NOTICE: Default Video Player: VideoPlayer
12:21:19.210 T:2904087088  NOTICE: Default Audio Player: paplayer
12:21:19.210 T:2904087088  NOTICE: Disabled debug logging due to GUI setting. Level 0.
12:21:19.210 T:2904087088  NOTICE: Log level changed to "LOG_LEVEL_NORMAL"
12:21:19.210 T:2904087088  NOTICE: Loading player core factory settings from special://xbmc/system/playercorefactory.xml.
12:21:19.210 T:2904087088  NOTICE: Loaded playercorefactory configuration
12:21:19.210 T:2904087088  NOTICE: Loading player core factory settings from special://masterprofile/playercorefactory.xml.
12:21:19.210 T:2904087088  NOTICE: special://masterprofile/playercorefactory.xml does not exist. Skipping.
12:21:19.218 T:2904087088  NOTICE: Running database version Addons27
12:21:19.266 T:2904087088   ERROR: X11 Error: No Display found
12:21:19.266 T:2904087088   FATAL: CApplication::Create: Unable to init windowing system

I’m having the same problem. :roll_eyes:
Raspberry pi 4B 4GB and kodi

The version of Kodi being run (at least in the original post, as that has a full and non-chopped log so is of some use) is the generic default one from Debian, rather than anything that’s optimised for the Pi.

Have a look at the link below and try that one instead. It’s more optimised for the Pi4, and might be of use at least until the version in the Foundation repo catches up. Given it needs a text terminal to launch I’m not sure how well it will work with DietPi, but the general background may explain why some aspects aren’t working at the moment.

https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=246837