Table of Contents

Vulkan on Wayland

VIM3 VIM3L VIM4 VIM1S with Ubuntu 22.04/24.04 Gnome Desktop and Wayland with 5.15 kernel supports Vulkan, you can follow this documentation to test Vulkan.

Only for VIM3/3L/4/1S with 5.15 kernel with Ubuntu 22.04/24.04 Gnome Desktop and Wayland.

Install Vulkan tools

Ubuntu 22.04

The default vulkan-tools doesn't support Wayland, so we rebuild it to support Wayland, you can follow the commands below to install vulkan-tools.

sudo apt update
sudo apt install vulkan-tools
wget https://dl.khadas.com/development/vulkan-tools_1.3.204.0%2Bdfsg1-1_arm64.deb
sudo dpkg -i vulkan-tools_1.3.204.0+dfsg1-1_arm64.deb 

Ubuntu 24.04

sudo apt update
sudo apt install vulkan-tools

Check Vulkan informations

You can use command vulkaninfo to get the Vulkan informations.

khadas@Khadas:~$ vulkaninfo | less
'DISPLAY' environment variable not set... skipping surface info
==========
VULKANINFO
==========
 
Vulkan Instance Version: 1.3.204
 
 
Instance Extensions: count = 10
===============================
        VK_EXT_debug_report                    : extension revision 10
        VK_EXT_debug_utils                     : extension revision 2
        VK_EXT_headless_surface                : extension revision 1
        VK_KHR_device_group_creation           : extension revision 1
        VK_KHR_external_fence_capabilities     : extension revision 1
        VK_KHR_external_memory_capabilities    : extension revision 1
        VK_KHR_external_semaphore_capabilities : extension revision 1
        VK_KHR_get_physical_device_properties2 : extension revision 2
        VK_KHR_surface                         : extension revision 25
        VK_KHR_wayland_surface                 : extension revision 6
 
Layers: count = 1
=================
VK_LAYER_window_system_integration (Window system integration layer) Vulkan version 1.3.204, layer version 1:
        Layer Extensions: count = 2
                VK_KHR_surface         : extension revision 25
                VK_KHR_wayland_surface : extension revision 6
        Devices: count = 1
                GPU id = 0 (Mali-G52)
                Layer-Device Extensions: count = 1
                        VK_KHR_swapchain : extension revision 70
 
Presentable Surfaces:
=====================
GPU id : 0 (Mali-G52):
        Surface type = VK_KHR_wayland_surface
        Formats: count = 5
                SurfaceFormat[0]:
                        format = FORMAT_R5G6B5_UNORM_PACK16
                        colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
                SurfaceFormat[1]:
                        format = FORMAT_R8G8B8A8_SRGB
                        colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
                SurfaceFormat[2]:
                        format = FORMAT_R8G8B8A8_UNORM
                        colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
                SurfaceFormat[3]:
                        format = FORMAT_B8G8R8A8_SRGB
                        colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
                SurfaceFormat[4]:
                        format = FORMAT_B8G8R8A8_UNORM
                        colorSpace = COLOR_SPACE_SRGB_NONLINEAR_KHR
        Present Modes: count = 2
                PRESENT_MODE_FIFO_KHR
                PRESENT_MODE_MAILBOX_KHR
        VkSurfaceCapabilitiesKHR:
...

Run Vulkan cube test program

You can run the Vulkan test program vkcube-wayland.

$ vkcube-wayland

You will see a rotating cube on the screen.