Nine Steps to Void Kodi on the Raspberry Pi

 

It turns out there may be an issue with the official VC Blobs for raspberry pi in 64-bit mode. Long story short we can’t run void aarch64 on the raspberry pi for graphical tasks until there is an upstream fix.

Because I wanted to use the raspberry pi partially for graphical tasks, I switched from void-rpi3-musl-PLATFORMFS-20181111.img (aarch64/musl) to void-rpi2-musl-PLATFORMFS-20181111.img (armv7/musl). My basic void install/configuration guide works with these images and should work with glibc rootfs images too. This guide assumes you followed that one.

Running prep_void_rpi.sh 2 script (linked in the basic void install/configuration guide) will install the armv7 image, but as always make sure you verify the script, mountpoints, etc. Using glibc (change LIBC from ‘-musl’ to ‘’) might make Kodi perform better but I haven’t tested this.

The Guide

  1. Install the minimal Xorg packages

    • Install the minimal xorg meta package and video driver
      • xbps-install -S xorg-minimal xf86-video-fbturbo
  2. (Optional) Test Xorg

    • This step is to test if basic graphical functionality works
    • Install the example programs used by the stock xinitrc
      • xbps-install -S xterm twm xclock
    • Run Xorg
      • startx
    • You should see xterm within a twm window and xclock running
    • Uninstall the example programs if desired
      • xbps-remove -R xterm twm xclock
  3. (Optional) Increase memory available to gpu

    • Increasing video memory is not strictly required but it could make media run better
    • Open /boot/config.txt
      • sudo vim /boot/config.txt
    • Add the following line, save, and reboot
      • gpu_mem=256
  4. (Optional) Install the exFAT kernel diver

    • The exFAT filesystem is currently the best option for cross platform (linux/windows/mac) usage and works well enough for media
      • xbps-install -S exfat-dkms
  5. Install Kodi

    • Install the Kodi package
      • xbps-install kodi-rpi
  6. Add the current user to various groups

    • This may be required to interface with Kodi
      • sudo usermod -a -G input,dialout,plugdev,tty <user>
  7. (Optional) Give Kodi keyboard access to the user

    • This is a hacky solution, but it’s the only one I’ve found that works
    • Open /etc/rc.local
      • sudo vim /etc/rc.local
    • Add the following line and save
      • chmod 0660 /dev/tty0
  8. Run Kodi Standalone

    • Running Kodi as a standalone graphical process makes more sense for me at this time because I’m not using any other graphical programs on this RPI

    • Open ~/.xinitrc

      • vim ~/.xinitrc
    • Add the following and save

      #!/bin/bash
      
      kodi --standalone
      sudo chvt 2
      sleep 1
      sudo chvt 1
      
    • Add execute permissions to ~/.xinitrc

      • chmod 755 ~/.xinitrc
    • Start Xorg to run Kodi

      • startx
  9. (Optional) Fit Kodi screen to display

    • My Kodi Window was too large for the display, here is what to do if you have this problem (assuming your /boot/config.txt overscan settings are already correct)
    1. Click on Settings (gear icon)
    2. Click on System (bottom right)
    3. Toggle the setting level on the bottom left (gear icon) until it reads ‘Expert’
    4. Go to the ‘Display’ Tab, scroll down to Calibration, and click on ‘Video calibration…’
    5. Calibrate the window so that it is within your display