# SDL\_gpu on RPi5 and KMSDRM

**URL:** <https://discourse.libsdl.org/t/sdl-gpu-on-rpi5-and-kmsdrm/58194>\
**Category:** SDL Development\
**Created:** [February 27, 2025, 12:09pm UTC](https://discourse.libsdl.org/t/sdl-gpu-on-rpi5-and-kmsdrm/58194 "2025-02-27T12:09:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefanovic](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@stefanovic](https://discourse.libsdl.org/u/stefanovic)\
**Post date:** [February 27, 2025, 12:09pm UTC](https://discourse.libsdl.org/t/sdl-gpu-on-rpi5-and-kmsdrm/58194/1 "2025-02-27T12:09:52Z")

</div>

Hi,

I successfully ran SDL\_gpu on my mac, and try to port my stuff onto rpi5 with no X11, only kmsdrm. However, SDL fails to open vulkan, and it seems it’s related to rpi5 supposedly not supporting VK\_KHR\_SURFACE\_EXTENSION\_NAME.

Have anyone succeeded in using SDL\_gpu in this context?

Best,

Stéphane

---

<div class="post-metadata">

**Author:** ![stefanovic](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@stefanovic](https://discourse.libsdl.org/u/stefanovic)\
**Post date:** [March 3, 2025, 8:38am UTC](https://discourse.libsdl.org/t/sdl-gpu-on-rpi5-and-kmsdrm/58194/2 "2025-03-03T08:38:40Z")

</div>

so I installed libdrm, mesa, SDL fresh from github.  
Now I get an SDL error `Vulkan can't find any displays.`, presumably because `vkGetPhysicalDeviceDisplayPropertiesKHR`returns 0.

Still investigating.

This is what SDL says with `SDL_LOGGING` set to `verbose`:

```auto
App name: SDL Application
App version: <unspecified>
App ID: <unspecified>
SDL revision: SDL3-3.3.0-113eb6f
/dev/dri/card1 connector, encoder and CRTC counts are: 2 4 4
/dev/dri/card1 connector, encoder and CRTC counts are: 2 4 4
KMSDRM_VideoInit()
Opening device /dev/dri/card1
Opened DRM FD (5)
WARNING: Validation layers not found, continuing without validation
SDL_GPU Driver: Vulkan
Vulkan Device: V3D 7.1.7.0
Vulkan Driver: V3DV Mesa Mesa 25.1.0-devel (git-b6b8193534)
Vulkan Conformance: 1.3.3

```

---

<div class="post-metadata">

**Author:** ![stefanovic](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@stefanovic](https://discourse.libsdl.org/u/stefanovic)\
**Post date:** [August 26, 2026, 2:28pm UTC](https://discourse.libsdl.org/t/sdl-gpu-on-rpi5-and-kmsdrm/58194/3 "2026-08-26T14:28:27Z")

</div>

still no luck at this time… Now with V3DV 7.1.7.0, MESA 26.1.6. Even though

`vkcube --wsi display`

works.

According to Gemini:

`The Raspberry Pi 5’s Broadcom driver does not implement the window-less VK_KHR_display extension inside its native layer. While vkcube has custom fallback code to draw pixels directly to a Linux console, SDL3’s SDL_GPU subsystem enforces strict Vulkan compliance. It refuses to construct a valid pipeline layout if a windowing structure is missing from the physical device query.`

---

<div class="post-metadata">

**Author:** ![stefanovic](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/2bfe46/32.png) [@stefanovic](https://discourse.libsdl.org/u/stefanovic)\
**Post date:** [October 5, 2026, 12:13pm UTC](https://discourse.libsdl.org/t/sdl-gpu-on-rpi5-and-kmsdrm/58194/4 "2026-10-05T12:13:28Z")

</div>

The only way I found so far is using `cage`:

```auto
sudo apt update
sudo apt install cage

```

Then switch to a text terminal with Atl+F1, then:

```auto
sudo systemctl stop lightdm # if running rpios desktop 
cage -s -- /path/to/your/binary # -s allows for switching to another text terminal to kill cage and stop the app, -- to pass options to your binary

```

I still cannot figure out how to run an rpi5 vulkan SDL\_gpu app on kmsdrm without any other layer (such as `cage`)…
