Kodi - Unable to create GUI

Having issues with your DietPi installation or found a bug? Post it here.
Milemar
Posts: 10
Joined: Mon May 17, 2021 11:15 pm

Re: Kodi - Unable to create GUI

Post by Milemar »

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:

Code: Select all

[    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.
User avatar
Joulinar
Posts: 5149
Joined: Sat Nov 16, 2019 12:49 am

Re: Kodi - Unable to create GUI

Post by Joulinar »

yes user dietpi do not have permissions.

Code: Select all

Cannot open /dev/tty0 (Permission denied)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Milemar
Posts: 10
Joined: Mon May 17, 2021 11:15 pm

Re: Kodi - Unable to create GUI

Post by Milemar »

Sorted by adding dietpi user to the TTY group.
Shouldn't be added automatically?
User avatar
MichaIng
Site Admin
Posts: 3106
Joined: Sat Nov 18, 2017 6:21 pm

Re: Kodi - Unable to create GUI

Post by MichaIng »

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).
User avatar
Joulinar
Posts: 5149
Joined: Sat Nov 16, 2019 12:49 am

Re: Kodi - Unable to create GUI

Post by Joulinar »

@MichaIng
first post
I have installed DietPi x64 on rPi4
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3106
Joined: Sat Nov 18, 2017 6:21 pm

Re: Kodi - Unable to create GUI

Post by MichaIng »

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.
Milemar
Posts: 10
Joined: Mon May 17, 2021 11:15 pm

Re: Kodi - Unable to create GUI

Post by Milemar »

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

Code: Select all

libvcos.so: cannot open shared object file: No such file or directory
I have confirmed that libcec is installed:

Code: Select all

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:/#
User avatar
MichaIng
Site Admin
Posts: 3106
Joined: Sat Nov 18, 2017 6:21 pm

Re: Kodi - Unable to create GUI

Post by MichaIng »

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

Code: Select all

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/ ... bc/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:

Code: Select all

ln -s libvcos.so.0 /usr/lib/aarch64-linux-gnu/libvcos.so
Milemar
Posts: 10
Joined: Mon May 17, 2021 11:15 pm

Re: Kodi - Unable to create GUI

Post by Milemar »

Thanks @MichaIng

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

Code: Select all

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
User avatar
MichaIng
Site Admin
Posts: 3106
Joined: Sat Nov 18, 2017 6:21 pm

Re: Kodi - Unable to create GUI

Post by MichaIng »

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.
Post Reply