[rpi 4 8gb] Can't start Kodi

I have a RPI 4 8 GB version

I have installed Kodi using dietpi-software helper and setup autostart with it (with dietpi-config)

When the RPI boot, I get the following error

libva error va_getdrivername() failed with unknown libva error driver_name=(null)

It’s the same with both the two display settings vc4-kms-v3d-pi4 and vc4-fkms-v3d

Am I missing some libraries or what?

Is of software that can be installed via dietpi-software supposed to work as is, specially on a RPI ?

Pls could you share some more information on your system

DietPi version | cat /boot/dietpi/.version
Distro version | echo $G_DISTRO_NAME $G_RASPBIAN
Kernel version | uname -a

jarvis@jarvis:~$ cat /boot/dietpi/.version
G_DIETPI_VERSION_CORE=7
G_DIETPI_VERSION_SUB=5
G_DIETPI_VERSION_RC=2
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
G_LIVE_PATCH_STATUS[0]='applied'
jarvis@jarvis:~$ echo $G_DISTRO_NAME $G_RASPBIAN
bullseye 1
jarvis@jarvis:~$ uname -a
Linux jarvis 5.10.60-v7l+ #1449 SMP Wed Aug 25 15:00:44 BST 2021 armv7l GNU/Linux

If you like, you could try our current beta release 7.6 that will become office release this weekend. There we provide an own Kodi version that should work on Bullseye.

Followed this to update my dietpi to 7.6.1 beta version

Uninstalled and reinstalled kodi via dietpi-software

Same error

I also tried to launch apt update && apt upgrade && apt full-upgrade but nothing was updated

I don’t get it… I am the only person that can’t get work Kodi on the latest version of dietpi on a standard raspberry pi 4?

Hi, I’ve had this same error for a couple of days on my rpi 4. I just updated dietpi to the 7.6 version but the problem is still there.

The error is:

root@DietPi:~# startkodi
libva info: VA-API version 1.10.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)



root@DietPi:~# cat /boot/dietpi/.version
G_DIETPI_VERSION_CORE=7
G_DIETPI_VERSION_SUB=6
G_DIETPI_VERSION_RC=2
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
G_LIVE_PATCH_STATUS[0]='not applicable'
root@DietPi:~# echo $G_DISTRO_NAME $G_RASPBIAN
bullseye 1
root@DietPi:~# uname -a
Linux DietPi 5.10.60-v7l+ #1449 SMP Wed Aug 25 15:00:44 BST 2021 armv7l GNU/Linux

Do you guys have any ideas?

I had been hating every debian based distro

And now I remember why

  • If you install this version, you can’t get this
  • if you install that version, you can’ get that
  • if you want this, add this repo but it doesn’t work with that

DietPi is obviosly the same because it’s a Raspbian

Just found a quick way to create an Arch Arm aarch64 image for my pi4 and it works without any trouble and the aur repo is FULL of every latest version software. There is the official pi kernel too on arch official repo.

In just a couple of hours I managed to install kodi 19.1 with autostart, while you can’t install that on any based raspbian based os. Found that in every raspberry forums.

Sorry guys, DietPI is a nice project but… no

I’m trying to make this work. Googling didn’t give me an answer, but I think I have advanced a little bit. Following some comments I found here: https://github.com/intel/libva/issues/278 , I set LIBVA_TRACE=1 and then I forced libva to pick a driver (I don’t know what are the correct ones). This is the result:

root@DietPi:~# export  LIBVA_TRACE=1
root@DietPi:~# export LIBVA_DRIVER_NAME=i965
root@DietPi:~# startkodi
libva info: Open new log file 1.133217.thd-0x0000051f for the thread 0x0000051f
libva info: LIBVA_TRACE is on, save log into 1.133217.thd-0x0000051f
libva info: VA-API version 1.10.0
libva info: User environment variable requested driver 'i965'
libva info: Trying to open /usr/lib/arm-linux-gnueabihf/dri/i965_drv_video.so
libva info: va_openDriver() returns -1

Then I checked /usr/lib/arm-linux-gnueabihf/dri/ and I found that there are no files called *_drv_video.so:

root@DietPi:~# ls /usr/lib/arm-linux-gnueabihf/dri 
armada-drm_dri.so   kms_swrast_dri.so     panfrost_dri.so  st7735r_dri.so
etnaviv_dri.so      lima_dri.so           pl111_dri.so     stm_dri.so
exynos_dri.so       mcde_dri.so           r200_dri.so      sun4i-drm_dri.so
hx8357d_dri.so      mediatek_dri.so       r300_dri.so      swrast_dri.so
ili9225_dri.so      meson_dri.so          r600_dri.so      tegra_dri.so
ili9341_dri.so      mi0283qt_dri.so       radeon_dri.so    v3d_dri.so
imx-dcss_dri.so     msm_dri.so            radeonsi_dri.so  vc4_dri.so
imx-drm_dri.so      mxsfb-drm_dri.so      repaper_dri.so   virtio_gpu_dri.so
ingenic-drm_dri.so  nouveau_dri.so        rockchip_dri.so  zink_dri.so
kgsl_dri.so         nouveau_vieux_dri.so  st7586_dri.so

The original error said va_getdrivername() failed. My guess is that we are either not pointing to the path where the correct drivers are or something has changed (in the recent updates or as a result of something I did) and the file names are no longer the same.

Try the vc4_dri.so, with an Intel GPU driver of course it cannot work on an RPi :wink:. On RPi Zero it worked well. I’ll test it on other RPi models next week.

I thought of that and it didn’t work. It looks for the vc4_drv_video.so

root@DietPi:~# export LIBVA_DRIVER_NAME=vc4
root@DietPi:~# startkodi
libva info: Open new log file 1.185222.thd-0x00000809 for the thread 0x00000809
libva info: LIBVA_TRACE is on, save log into 1.185222.thd-0x00000809
libva info: VA-API version 1.10.0
libva info: User environment variable requested driver 'vc4'
libva info: Trying to open /usr/lib/arm-linux-gnueabihf/dri/vc4_drv_video.so
libva info: va_openDriver() returns -1

I tried a couple more things. I installed mesa-va-drivers via apt install and now I can see that some of the drivers have the *_drv_video.so, for example r600_drv_video.so but not vc4.

root@DietPi:~# ls /usr/lib/arm-linux-gnueabihf/dri/
armada-drm_dri.so   meson_dri.so          radeonsi_dri.so
etnaviv_dri.so      mi0283qt_dri.so       radeonsi_drv_video.so
exynos_dri.so       msm_dri.so            repaper_dri.so
hx8357d_dri.so      mxsfb-drm_dri.so      rockchip_dri.so
ili9225_dri.so      nouveau_dri.so        st7586_dri.so
ili9341_dri.so      nouveau_drv_video.so  st7735r_dri.so
imx-dcss_dri.so     nouveau_vieux_dri.so  stm_dri.so
imx-drm_dri.so      panfrost_dri.so       sun4i-drm_dri.so
ingenic-drm_dri.so  pl111_dri.so          swrast_dri.so
kgsl_dri.so         r200_dri.so           tegra_dri.so
kms_swrast_dri.so   r300_dri.so           v3d_dri.so
lima_dri.so         r600_dri.so           vc4_dri.so
mcde_dri.so         r600_drv_video.so     virtio_gpu_dri.so
mediatek_dri.so     radeon_dri.so         zink_dri.so

When I tried to use one of the drivers that end in _drv_video.so, this happened:

root@DietPi:~# export LIBVA_DRIVER_NAME=nouveau
root@DietPi:~# startkodi
libva info: Open new log file 1.185826.thd-0x00000973 for the thread 0x00000973
libva info: LIBVA_TRACE is on, save log into 1.185826.thd-0x00000973
libva info: VA-API version 1.10.0
libva info: User environment variable requested driver 'nouveau'
libva info: Trying to open /usr/lib/arm-linux-gnueabihf/dri/nouveau_drv_video.so
libva info: Found init function __vaDriverInit_1_10
vc4: driver missing
libva error: /usr/lib/arm-linux-gnueabihf/dri/nouveau_drv_video.so init failed
libva info: va_openDriver() returns 2

Thanks for looking at this.

It needs to be the correct diver for the RPi GPU. I wonder whether there was another breaking change in libraspberrypi0 or the DRM library on Bullseye RPi so that we need to rebuild Kodi (again). I’ll check the packages.

Could you try it with that workaround?

ln -s vc4_drv.so /usr/lib/arm-linux-gnueabihf/dri/vc4_drv_video.so

That didn’t work.

root@DietPi:~# ln -s vc4_drv.so /usr/lib/arm-linux-gnueabihf/dri/vc4_drv_video.so
root@DietPi:~# startkodi
libva info: Open new log file 1.173939.thd-0x00000b88 for the thread 0x00000b88
libva info: LIBVA_TRACE is on, save log into 1.173939.thd-0x00000b88
libva info: VA-API version 1.10.0
libva info: User environment variable requested driver 'vc4'
libva info: Trying to open /usr/lib/arm-linux-gnueabihf/dri/vc4_drv_video.so
libva info: va_openDriver() returns -1

I saw that apt showed some upgrades. I tested this workaround before and after installing them without success.

Same problem with Rpi4 2gb:

libva info: VA-API version 1.10.0
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)



root@DietPi:~# cat /boot/dietpi/.version
G_DIETPI_VERSION_CORE=7
G_DIETPI_VERSION_SUB=6
G_DIETPI_VERSION_RC=2
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
G_LIVE_PATCH_STATUS[0]='not applicable'
G_LIVE_PATCH_STATUS[1]='applied'
root@DietPi:~# echo $G_DISTRO_NAME $G_RASPBIAN
bullseye 0
root@DietPi:~# uname -a
Linux DietPi 5.10.60-v7l+ #1449 SMP Wed Aug 25 15:00:44 BST 2021 armv7l GNU/Linux
root@DietPi:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Live patch 1 is about LetsEncrypt, so I haven’t applied.

I just saw that the latest livepatch had something to do with kodi. I don’t think that it was related to this post’s issue but I wanted to say that the same message error appears when starting kodi after the patch.

yes correct, the Live Patch is to address a different issue

Any news on this issue?

I keep getting the same error even after a fresh install (ARMv7 32-bit image).

It starts fine here on RPi Zero, despite the fact that I’m seeing the same error. I’m currently testing driver/display settings to see whether I’m able to get at least 720p playing nicely, currently it is not playing well.

No joy on RPi Zero, at least not with 720p :frowning:. However, maybe this is totally expected, not sure how well this KMS driver works with the RPi 1/Zero SoC, but this Kodi build cannot run with legacy (framebuffer) driver. I’ll test on RPi 2 :slight_smile:.

However, it runs, the GUI works pretty well, so I guess we forgot to ask whether, aside of the error message, there are actually any issues with using Kodi?

I made it work on a fresh 64-bit dietpi (arm v8 if I remember correctly). There, everything works as you describe it. The error message appears but everything else works as expected.

However, with any of the 32-bit versions kodi doesn’t work after the message appears. I have observed two different behaviours:

  • if I’m connected to the pi via a usb keyboard and HDMI display, the terminal freezes. Then, when I move around with the keyboard arrows I hear kodi’s main menu sounds. It seems like it is actually running but being displayed somewhere else.

  • when I’m connected via ssh, after the message I can just Ctrl-C to stop the process.

Sorry if I’m not being clear enough, I’m writing this while commuting. I can run some tests and show you the error messages in the evening when I get back home.

On 64-bit the Debian Kodi package is used, which only starts from within a desktop session or via xinit, right?

Our 32-bit builds use DRM/KMS/GBM to display independently for an X session. As you are on RPi 4, may the reason be that it is shown on the second HDMI port? I.e. does it work when you attach a second screen to the second HDMI port, respectively switch the screen? As obviously you see the console on the currently used HDMI port, probably there is a way to force Kodi to use the same screen, while for some reason by default it uses the other one.

You are right, on 64-bit it initializes via xinit.

I don’t have a second HDMI cable at home so I don’t know if it works while using two screens. Changing the HDMI port shows the same behaviour I described earlier today: error message, console freezes and I can hear the main menu sounds when I move around with the arrow keys.