Kodi Steam Deck development

From Official Kodi Wiki
Revision as of 22:52, 20 February 2026 by Garbear (talk | contribs) (Update shortcut steps)
Jump to navigation Jump to search
Development:
  ▶ Development ▶ Kodi Steam Deck development

Kodi is easily installable on the Steam Deck via Flatpak, but if you're looking to do development on the Steam Deck, this article is for you.

Environment Setup

The first step is to disable the read-only filesystem. If you're reading this, it's assumed that you know what you're doing. If not, seek safety.

The following steps will allow you to compile Kodi on the Steam Deck:

Disable the read-only filesystem

sudo steamos-readonly disable

Initialize the pacman keyring

sudo pacman-key --init

Populate the pacman keyring with the default Arch Linux and Holo keys

sudo pacman-key --populate archlinux holo

Update the system packages

sudo pacman -Syu

Install required packages

Needed to build Kodi:

sudo pacman -S \
  audit \
  base-devel \
  ccache \
  curl \
  glibc \
  gperf \
  jre-openjdk \
  krb5 \
  libbsd \
  libcap-ng \
  libglvnd \
  libvdpau \
  libx11 \
  libxext \
  libxfixes \
  libxrandr \
  libxrender \
  linux-api-headers \
  lld \
  mesa \
  ncurses \
  net-tools \
  perl-parse-yapp \
  qt5-base \
  readline \
  rpcsvc-proto \
  systemd-libs \
  xorgproto \
  zlib

Needed to build game and VFS add-ons:

sudo pacman -S \
  acl \
  alsa-lib \
  cmake \
  glib2 \
  libaio \
  libmpeg2 \
  libpcap \
  libpng \
  nasm \
  ninja

Disable Baloo

Building Kodi and depends writes a few hundred thousand small files, so it's recommended that you disable the Baloo indexer:

balooctl suspend
balooctl disable
balooctl purge

Clone Kodi

git clone https://github.com/xbmc/xbmc.git ~/Documents/kodi

Bootstrap depends

cd ~/Documents/kodi/tools/depends
./bootstrap

Configure depends

./configure --prefix="$HOME/kodi-deps" --with-rendersystem=gl

Build depends (this takes about 25 minutes)

make -j8

Create CMake files

Optionally, link with LLD because ld.gold complains about newer DWARF formats:

cd ~/Documents/kodi
make -C tools/depends/target/cmakebuildsys CMAKE_EXTRA_ARGUMENTS="-DCORE_PLATFORM_NAME=wayland -DENABLE_LLD=ON"

Build Kodi (this takes about 18 minutes)

cd build
make -j8

Build binary add-ons

make -j8 binary-addons

Create launcher script

mkdir -p ~/bin

cat <<'EOL' > ~/bin/kodi-dev.sh
#!/usr/bin/env bash
set -euo pipefail

# Kodi needs this when running from the build tree
export SSL_CERT_FILE=/home/deck/Documents/kodi/system/certs/cacert.pem

# Disable SteamOS gamescope Vulkan implicit layer for this app
# (prevents CreateSwapchainKHR "bad Vulkan layer" popup in Gaming Mode)
export VK_LOADER_LAYERS_DISABLE="${VK_LOADER_LAYERS_DISABLE:-}:VK_LAYER_FROG_gamescope_wsi"

# Clear any explicit Vulkan layer env that may be set
unset VK_LAYER_PATH
unset VK_INSTANCE_LAYERS
unset ENABLE_GAMESCOPE_WSI

KODI_BIN="/home/deck/Documents/kodi/build/kodi-wayland"

# Gaming Mode: already inside gamescope (do NOT nest gamescope again)
if [[ -n "${STEAM_GAMEPADUI:-}" ]]; then
  export WAYLAND_DISPLAY="${WAYLAND_DISPLAY:-gamescope-0}"
  exec "${KODI_BIN}" -fs
fi

# Desktop Mode: provide a Wayland compositor via nested gamescope and force 4K
exec /usr/bin/gamescope --expose-wayland -f -b -W 3840 -H 2160 -- "${KODI_BIN}" -fs
EOL

chmod +x ~/bin/kodi-dev.sh

Create desktop entry

mkdir -p ~/.local/share/applications

cat <<'EOL' > ~/.local/share/applications/kodi-dev.desktop
[Desktop Entry]
Version=1.0
Name=Kodi (dev)
GenericName=Media Center
Comment=Manage and view your media (dev build)
Type=Application
Terminal=false
Categories=AudioVideo;Video;Player;TV;
Icon=/home/deck/Documents/kodi/tools/Linux/packaging/media/icon256x256.png

Exec=/home/deck/bin/kodi-dev.sh
EOL

chmod +x ~/.local/share/applications/kodi-dev.desktop
update-desktop-database ~/.local/share/applications 2>/dev/null || true
cp ~/.local/share/applications/kodi-dev.desktop ~/Desktop/
chmod +x ~/Desktop/kodi-dev.desktop

Add to Steam (Gaming Mode)

Switch to Desktop Mode.

Open Steam.

Select "Add a Game" -> "Add a Non-Steam Game..."

Click "Browse..." and select: /home/deck/bin/kodi-dev.sh

After it is added, open Properties and set:

  • Name: Kodi (dev)
  • Compatibility: ensure "Force the use of a specific Steam Play compatibility tool" is unchecked.

Force 4K in Gaming Mode

In Gaming Mode, select the shortcut Kodi (dev).

Open Properties (gear icon).

Set Game Resolution to 3840x2160 (or Native when docked to a 4K display).