Kodi - Unable to create GUI

Hi,

I am quite a noob in the Linux world so please excuse me if I ask a stupid question :slight_smile:

I have installed DietPi x64 on rPi4. All good, no problem at all.
I have configured network access, passwords, hostname, etc. and finished the minimal install without any additional software.

After that, I ran dietpi-software and selected Kodi.
That went all OK apart of one message:

G_THREAD_ERROR:
- Command = curl- sSfL https://rawgithubusercontent.com/MichaIng/DietPi/master/.conf/desktop/icons/kodi-icon.png
-o /var/lib/dietpi/dietpi-software/installed/desktop/icons/kodi-icon.png
- Exit code = 23
curl: (23) Failed writing body (0 != 873)

I assume this is nothing important as this points to some Kodi icon.

I have chosen not to boot to Kodi and left the default setting (manual login).

As root user I ran “kodi” command and was returned a message “Unable to create GUI. Exiting”, and the path to the log.

Log is here:

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

################ SYSTEM INFO ################
 Date: Mon May 17 22:12:19 BST 2021
 Kodi Options:
 Arch: aarch64
 Kernel: Linux 5.10.17-v8+ #1414 SMP PREEMPT Fri Apr 30 13:23:25 BST 2021
 Release: Debian GNU/Linux 10 (buster)
############## END SYSTEM INFO ##############

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

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

22:11:49.391 T:547780318528  NOTICE: special://profile/ is mapped to: special://masterprofile/
22:11:49.391 T:547780318528  NOTICE: -----------------------------------------------------------------------
22:11:49.391 T:547780318528  NOTICE: Starting Kodi from Debian (17.6 Debian package version: 2:17.6+dfsg1-4+b1). Platform: Linux ARM 64-bit
22:11:49.391 T:547780318528  NOTICE: Using Release Kodi from Debian x64 build
22:11:49.391 T:547780318528  NOTICE: Kodi from Debian compiled from 2:17.6+dfsg1-4+b1 by GCC 8.2.0 for Linux ARM 64-bit version 4.19.16 (267024)
22:11:49.391 T:547780318528  NOTICE: Running on Debian GNU/Linux 10 (buster), kernel: Linux ARM 64-bit version 5.10.17-v8+
22:11:49.391 T:547780318528  NOTICE: FFmpeg version/source: 4.1.6-1~deb10u1+rpt1
22:11:49.391 T:547780318528  NOTICE: 4 CPU cores available
22:11:49.391 T:547780318528  NOTICE: ARM Features: Neon disabled
22:11:49.391 T:547780318528  NOTICE: special://xbmc/ is mapped to: /usr/share/kodi
22:11:49.391 T:547780318528  NOTICE: special://xbmcbin/ is mapped to: /usr/lib/aarch64-linux-gnu/kodi
22:11:49.391 T:547780318528  NOTICE: special://xbmcbinaddons/ is mapped to: /usr/lib/aarch64-linux-gnu/kodi/addons
22:11:49.391 T:547780318528  NOTICE: special://masterprofile/ is mapped to: /root/.kodi/userdata
22:11:49.391 T:547780318528  NOTICE: special://envhome/ is mapped to: /root
22:11:49.391 T:547780318528  NOTICE: special://home/ is mapped to: /root/.kodi
22:11:49.391 T:547780318528  NOTICE: special://temp/ is mapped to: /root/.kodi/temp
22:11:49.391 T:547780318528  NOTICE: special://logpath/ is mapped to: /root/.kodi/temp
22:11:49.391 T:547780318528  NOTICE: The executable running is: /usr/lib/aarch64-linux-gnu/kodi/kodi.bin
22:11:49.391 T:547780318528  NOTICE: Local hostname: Kodi
22:11:49.391 T:547780318528  NOTICE: Log File is located: /root/.kodi/temp//kodi.log
22:11:49.391 T:547780318528  NOTICE: -----------------------------------------------------------------------
22:11:49.395 T:547780318528   ERROR: DBus: Error org.freedesktop.DBus.Error.ServiceUnknown - The name org.freedesktop.UPower was not provided by any .service files
22:11:49.404 T:547780318528  NOTICE: load settings...
22:11:49.428 T:547780318528   ERROR: PulseAudio: Failed to connect context
22:11:49.428 T:547780318528  NOTICE: PulseAudio might not be running. Context was not created.
22:11:49.476 T:547780318528  NOTICE: Found 1 Lists of Devices
22:11:49.476 T:547780318528  NOTICE: Enumerated ALSA devices:
22:11:49.476 T:547780318528  NOTICE:     Device 1
22:11:49.477 T:547780318528  NOTICE:         m_deviceName      : @:CARD=vc4hdmi0,DEV=0
22:11:49.477 T:547780318528  NOTICE:         m_displayName     : vc4-hdmi-0
22:11:49.477 T:547780318528  NOTICE:         m_displayNameExtra: MAI PCM vc4-hdmi-hifi-0
22:11:49.477 T:547780318528  NOTICE:         m_deviceType      : AE_DEVTYPE_PCM
22:11:49.477 T:547780318528  NOTICE:         m_channels        : FL,FR,LFE,UNKNOWN1,FC,BC,BL,BR,BLOC,BROC,FLOC,FROC
22:11:49.477 T:547780318528  NOTICE:         m_sampleRates     : 32000,44100,48000,88200,96000,176400,192000
22:11:49.477 T:547780318528  NOTICE:         m_dataFormats     :
22:11:49.477 T:547780318528  NOTICE:         m_streamTypes     : No passthrough capabilities
22:11:49.477 T:547780318528  NOTICE:     Device 2
22:11:49.477 T:547780318528  NOTICE:         m_deviceName      : iec958:CARD=vc4hdmi0,DEV=0
22:11:49.477 T:547780318528  NOTICE:         m_displayName     : vc4-hdmi-0
22:11:49.477 T:547780318528  NOTICE:         m_displayNameExtra: MAI PCM vc4-hdmi-hifi-0 S/PDIF
22:11:49.477 T:547780318528  NOTICE:         m_deviceType      : AE_DEVTYPE_IEC958
22:11:49.477 T:547780318528  NOTICE:         m_channels        : FL,FR,LFE,UNKNOWN1,FC,BC,BL,BR,BLOC,BROC,FLOC,FROC
22:11:49.477 T:547780318528  NOTICE:         m_sampleRates     : 32000,44100,48000,88200,96000,176400,192000
22:11:49.477 T:547780318528  NOTICE:         m_dataFormats     : AE_FMT_RAW,AE_FMT_S24NE3,AE_FMT_S24NE4,AE_FMT_S32NE,AE_FMT_S16NE,AE_FMT_S16LE,AE_FMT_S16BE,AE_FMT_U8
22:11:49.477 T:547780318528  NOTICE:         m_streamTypes     : STREAM_TYPE_AC3,STREAM_TYPE_DTSHD_CORE,STREAM_TYPE_DTS_1024,STREAM_TYPE_DTS_2048,STREAM_TYPE_DTS_512
22:11:49.485 T:547780318528  NOTICE: No settings file to load (special://xbmc/system/advancedsettings.xml)
22:11:49.485 T:547780318528  NOTICE: No settings file to load (special://masterprofile/advancedsettings.xml)
22:11:49.485 T:547780318528  NOTICE: Default Video Player: VideoPlayer
22:11:49.485 T:547780318528  NOTICE: Default Audio Player: paplayer
22:11:49.485 T:547780318528  NOTICE: Disabled debug logging due to GUI setting. Level 0.
22:11:49.485 T:547780318528  NOTICE: Log level changed to "LOG_LEVEL_NORMAL"
22:11:49.485 T:547780318528  NOTICE: Loading player core factory settings from special://xbmc/system/playercorefactory.xml.
22:11:49.485 T:547780318528  NOTICE: Loaded playercorefactory configuration
22:11:49.485 T:547780318528  NOTICE: Loading player core factory settings from special://masterprofile/playercorefactory.xml.
22:11:49.485 T:547780318528  NOTICE: special://masterprofile/playercorefactory.xml does not exist. Skipping.
22:11:49.518 T:547780318528  NOTICE: Running database version Addons27
22:11:49.547 T:547474105856   ERROR: CAESinkALSA::InitializeHW - Unable to find a suitable output format
22:11:49.561 T:547754751488   ERROR: Previous line repeats 1 times.
22:11:49.561 T:547754751488 WARNING: ActiveAE::Configure - sink returned large buffer of 249 ms, reducing to 100 ms
22:11:49.587 T:547780318528   ERROR: X11 Error: No Display found
22:11:49.587 T:547780318528   FATAL: CApplication::Create: Unable to init windowing system


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

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

The “No display found” suggest there is no display connected to the rPi4 but it is connected via HDMI to AV and then to the TV. The whole installation was done like this.

I have tried to reinstall Kodi and X.Org. The result is the same.
I know that Kodi wasn’t supported on the x64 build but that note disappeared from the download page so I am assuming it is supported now.
Am I correct?

Thanks for any help.
M.

Hi,

what version of DietPi you are running?

Basically the error message regarding the missing desktop item can be ignored, it’s know but will not have any impact on your system. We will change this behaviour on next release https://github.com/MichaIng/DietPi/pull/4362

The error message X11 Error: No Display found doesn’t mean you don’t have a physical monitor connected :wink:
It’s an error that there is no Xserver running kodi can connect to.

pls try to use startkodi if you like to launch kodi from CLI. See as well our online docs https://dietpi.com/docs/software/media/#kodi

Regarding Kodi in general. DietPi is using Raspberry OS as base image. Means we don’t install an own Kodi version, we use the official one provided via Raspberrypi apt package.

I am using DietPi v7.1.2 x64.

did you tried running startkodi? Does it work?

Yes,

The output is the same.
Here is the kodi crash log:

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

################ SYSTEM INFO ################
 Date: Thu May 20 08:49:38 BST 2021
 Kodi Options:
 Arch: aarch64
 Kernel: Linux 5.10.17-v8+ #1414 SMP PREEMPT Fri Apr 30 13:23:25 BST 2021
 Release: Debian GNU/Linux 10 (buster)
############## END SYSTEM INFO ##############

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

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

08:49:08.238 T:547693622592  NOTICE: special://profile/ is mapped to: special://masterprofile/
08:49:08.238 T:547693622592  NOTICE: -----------------------------------------------------------------------
08:49:08.238 T:547693622592  NOTICE: Starting Kodi from Debian (17.6 Debian package version: 2:17.6+dfsg1-4+b1). Platform: Linux ARM 64-bit
08:49:08.238 T:547693622592  NOTICE: Using Release Kodi from Debian x64 build
08:49:08.238 T:547693622592  NOTICE: Kodi from Debian compiled from 2:17.6+dfsg1-4+b1 by GCC 8.2.0 for Linux ARM 64-bit version 4.19.16 (267024)
08:49:08.238 T:547693622592  NOTICE: Running on Debian GNU/Linux 10 (buster), kernel: Linux ARM 64-bit version 5.10.17-v8+
08:49:08.238 T:547693622592  NOTICE: FFmpeg version/source: 4.1.6-1~deb10u1+rpt1
08:49:08.238 T:547693622592  NOTICE: 4 CPU cores available
08:49:08.238 T:547693622592  NOTICE: ARM Features: Neon disabled
08:49:08.238 T:547693622592  NOTICE: special://xbmc/ is mapped to: /usr/share/kodi
08:49:08.238 T:547693622592  NOTICE: special://xbmcbin/ is mapped to: /usr/lib/aarch64-linux-gnu/kodi
08:49:08.238 T:547693622592  NOTICE: special://xbmcbinaddons/ is mapped to: /usr/lib/aarch64-linux-gnu/kodi/addons
08:49:08.238 T:547693622592  NOTICE: special://masterprofile/ is mapped to: /root/.kodi/userdata
08:49:08.238 T:547693622592  NOTICE: special://envhome/ is mapped to: /root
08:49:08.238 T:547693622592  NOTICE: special://home/ is mapped to: /root/.kodi
08:49:08.238 T:547693622592  NOTICE: special://temp/ is mapped to: /root/.kodi/temp
08:49:08.238 T:547693622592  NOTICE: special://logpath/ is mapped to: /root/.kodi/temp
08:49:08.238 T:547693622592  NOTICE: The executable running is: /usr/lib/aarch64-linux-gnu/kodi/kodi.bin
08:49:08.238 T:547693622592  NOTICE: Local hostname: Kodi
08:49:08.239 T:547693622592  NOTICE: Log File is located: /root/.kodi/temp//kodi.log
08:49:08.239 T:547693622592  NOTICE: -----------------------------------------------------------------------
08:49:08.242 T:547693622592   ERROR: DBus: Error org.freedesktop.DBus.Error.ServiceUnknown - The name org.freedesktop.UPower was not provided by any .service files
08:49:08.248 T:547693622592  NOTICE: load settings...
08:49:08.269 T:547693622592   ERROR: PulseAudio: Failed to connect context
08:49:08.269 T:547693622592  NOTICE: PulseAudio might not be running. Context was not created.
08:49:08.299 T:547693622592  NOTICE: Found 1 Lists of Devices
08:49:08.299 T:547693622592  NOTICE: Enumerated ALSA devices:
08:49:08.299 T:547693622592  NOTICE:     Device 1
08:49:08.299 T:547693622592  NOTICE:         m_deviceName      : @:CARD=vc4hdmi0,DEV=0
08:49:08.299 T:547693622592  NOTICE:         m_displayName     : vc4-hdmi-0
08:49:08.299 T:547693622592  NOTICE:         m_displayNameExtra: MAI PCM vc4-hdmi-hifi-0
08:49:08.299 T:547693622592  NOTICE:         m_deviceType      : AE_DEVTYPE_PCM
08:49:08.299 T:547693622592  NOTICE:         m_channels        : FL,FR,LFE,UNKNOWN1,FC,BC,BL,BR,BLOC,BROC,FLOC,FROC
08:49:08.299 T:547693622592  NOTICE:         m_sampleRates     : 32000,44100,48000,88200,96000,176400,192000
08:49:08.299 T:547693622592  NOTICE:         m_dataFormats     :
08:49:08.299 T:547693622592  NOTICE:         m_streamTypes     : No passthrough capabilities
08:49:08.299 T:547693622592  NOTICE:     Device 2
08:49:08.299 T:547693622592  NOTICE:         m_deviceName      : iec958:CARD=vc4hdmi0,DEV=0
08:49:08.299 T:547693622592  NOTICE:         m_displayName     : vc4-hdmi-0
08:49:08.299 T:547693622592  NOTICE:         m_displayNameExtra: MAI PCM vc4-hdmi-hifi-0 S/PDIF
08:49:08.299 T:547693622592  NOTICE:         m_deviceType      : AE_DEVTYPE_IEC958
08:49:08.299 T:547693622592  NOTICE:         m_channels        : FL,FR,LFE,UNKNOWN1,FC,BC,BL,BR,BLOC,BROC,FLOC,FROC
08:49:08.299 T:547693622592  NOTICE:         m_sampleRates     : 32000,44100,48000,88200,96000,176400,192000
08:49:08.299 T:547693622592  NOTICE:         m_dataFormats     : AE_FMT_RAW,AE_FMT_S24NE3,AE_FMT_S24NE4,AE_FMT_S32NE,AE_FMT_S16NE,AE_FMT_S16LE,AE_FMT_S16BE,AE_FMT_U8
08:49:08.299 T:547693622592  NOTICE:         m_streamTypes     : STREAM_TYPE_AC3,STREAM_TYPE_DTSHD_CORE,STREAM_TYPE_DTS_1024,STREAM_TYPE_DTS_2048,STREAM_TYPE_DTS_512
08:49:08.303 T:547693622592  NOTICE: No settings file to load (special://xbmc/system/advancedsettings.xml)
08:49:08.303 T:547693622592  NOTICE: No settings file to load (special://masterprofile/advancedsettings.xml)
08:49:08.303 T:547693622592  NOTICE: Default Video Player: VideoPlayer
08:49:08.303 T:547693622592  NOTICE: Default Audio Player: paplayer
08:49:08.303 T:547693622592  NOTICE: Disabled debug logging due to GUI setting. Level 0.
08:49:08.303 T:547693622592  NOTICE: Log level changed to "LOG_LEVEL_NORMAL"
08:49:08.303 T:547693622592  NOTICE: Loading player core factory settings from special://xbmc/system/playercorefactory.xml.
08:49:08.304 T:547693622592  NOTICE: Loaded playercorefactory configuration
08:49:08.304 T:547693622592  NOTICE: Loading player core factory settings from special://masterprofile/playercorefactory.xml.
08:49:08.304 T:547693622592  NOTICE: special://masterprofile/playercorefactory.xml does not exist. Skipping.
08:49:08.311 T:547693622592  NOTICE: Running database version Addons27
08:49:08.339 T:547524429312   ERROR: CAESinkALSA::InitializeHW - Unable to find a suitable output format
08:49:08.349 T:547532822016   ERROR: Previous line repeats 1 times.
08:49:08.349 T:547532822016 WARNING: ActiveAE::Configure - sink returned large buffer of 249 ms, reducing to 100 ms
08:49:08.365 T:547693622592   ERROR: X11 Error: No Display found
08:49:08.365 T:547693622592   FATAL: CApplication::Create: Unable to init windowing system


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

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

For the testing purpose, I have installed XFCE and I was able to start it with no problem.
I have tried to run Kodi after XFCE installation and still the same.

TBH I am a little bit fed up already and I am close to installing the 32-bit version of DietPi…

After installing 32-bit DietPi, Kodi works like a charm.
I believe there is still some issue with Kodi on the x64 platform.

Basically you changed from Raspberry OS 64bit to Raspberry OS 32bit. Kodi package is pulled from global apt package source. This is not really DietPi is providing. We simply pull the package and do some configs.

But there is one huge difference between 64bit and 32bit.

On 32bit Kodi is installed from archive.raspberrypi.org with version 18.7
While 64bit is pulling the package from deb.debian.org in an old version 17.6

But it looks like Raspberry Foundation is still working on it as there is already a 64bit version 18.7. But it’s lacking some dependency packages like kodi-bin. I guess something they are working on. Yeah Raspberry OS is still beta :slight_smile:

Thanks for that info.
I used to run Kodi on DietPi before and it was the x86 version. But there was an info on the downloading site that Kodi is unsupported on x64 build. Now that info is gone and I thought that something has changed in that matter.

Maybe is worth to put that info back next to the x64 image download link.

M.

MichaIng
what do you think?

Sorry for the late reply. Milemar can you try to start Kodi as root user like that:

xinit /usr/bin/kodi --standalone

While we switched on RPi x64 to the Debian repo Kodi, we forgot to adjust out started script so that it invokes Kodi via X server (xinit). The RPi x32 Kodi build does not use X, so it can be started like kodi --standalone instead.

Sorry for the late update.
I have managed to run Kodi by using the command provided.

When run as a root it displayed a blank screen for the very first time. I had to kill the process via an ssh session.
Then I have rebooted and run it again without the “–standalone” switch and it works. Now works with and without the switch.

When I set up to run Kodi at startup as root, then it works, but then I am choosing “dietpi” as a user then it fails with:

[    51.610] (EE)
Fatal server error:
[    51.610] (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
[    51.610] (EE)
[    51.610] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[    51.610] (EE) Please also check the log file at "/home/dietpi/.local/share/xorg/Xorg.0.log" for additional information.
[    51.611] (EE)
[    51.611] (WW) xf86CloseConsole: KDSETMODE failed: Bad file descriptor
[    51.611] (WW) xf86CloseConsole: VT_GETMODE failed: Bad file descriptor
[    51.611] (EE) Server terminated with error (1). Closing log file.

yes user dietpi do not have permissions.

Cannot open /dev/tty0 (Permission denied)

Sorted by adding dietpi user to the TTY group.
Shouldn’t be added automatically?

Which board and image are you trying this on? As currently it is started via X server, this indeed is difficult to reliably achieve, and I’m working on a generic solution for this via LightDM auto-login. But on RPi 32-bit, Kodi can be executed without the X server which makes it easier to grant permissions for that to any user (video and render group).

MichaIng
first post

I have installed DietPi x64 on rPi4

Whoops, thanks, I missed that this is the second page of a thread already. Jep then it all makes sense and similar to Chromium we need to implement a LightDM-based autostart option for non-root users. I’m on it.

I found that CEC is not working.
Kodi doesn’t respond on my TV remote and while running “cec-client -l” I am receiving:

libvcos.so: cannot open shared object file: No such file or directory

I have confirmed that libcec is installed:

root@DietPi:/# cec-client -l
libvcos.so: cannot open shared object file: No such file or directory
root@DietPi:/# apt-get install libcec4
Reading package lists... Done
Building dependency tree
Reading state information... Done
libcec4 is already the newest version (4.0.4+dfsg1-2+rpi1+rpt1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@DietPi:/#

Interesting, that library is part of the Raspberry Pi firmware. I’m wondering that the Debian build of Kodi even tries to use it :thinking:. Can you check:

ls -l /usr/lib/aarch64-linux-gnu/libvcos.so*

Ah, cec-utils and libcec4 is installed from the RPi repository, which ships an arm64 build as well: https://archive.raspberrypi.org/debian/pool/main/libc/libcec/
So that’s the reason it uses RPi-specific libraries. That should not be an issue as the library is shipped with the arm64 firmware as well, but it might have something to do with those being shipped in a different directory. The 32-bit/armhf firmware build uses /opt/vc/lib/libvcos.so instead.

And ah lol, another simple reason might be the .0 appendix it has on the arm64 build. Please try:

ln -s libvcos.so.0 /usr/lib/aarch64-linux-gnu/libvcos.so

Thanks MichaIng

I had to add several other links to get this to work:

ln -s libvchiq_arm.so.0 /usr/lib/aarch64-linux-gnu/libvchiq_arm.so
ln -s libbcm_host.so.0 /usr/lib/aarch64-linux-gnu/libbcm_host.so

Okay, when it works now, we should report this to the RPi repo/userland guys, as such symlinks are pretty common for shared libraries to allow software finding then regardless of specific version appendix.