Initial Vulkan support under Ubuntu 22.04 Wayland desktop

Hello Folks,

We have some positive improgress about Vulkan support under Ubuntu 22.04 Wayland desktop.

If you want to experience Vulkan now, you can follow the steps below to upgrade your kernel & GPU libraries.

Note: You need to based on latest release 1.2-221018, if not you need to upgrade this version or install with OOWOW.

WARNING: As we need to use a new version of kernel to support Vulkan, and it is not release version, so we suggest you to backup your important data before you start.

Upgrade new kernel & GPU libraries

cd /tmp
wget https://dl.khadas.com/.test/linux-image-amlogic-5.4_1.2.2_arm64.deb
wget https://dl.khadas.com/.test/linux-gpu-mali-wayland_1.1-r37p0-202208_arm64.deb
sudo dpkg -i linux-image-amlogic-5.4_1.2.2_arm64.deb
sudo dpkg -i linux-gpu-mali-wayland_1.1-r37p0-202208_arm64.deb
sync
sudo reboot

Install vukan test program

After reboot, you can install the vulkan test program.

cd /tmp
wget https://dl.khadas.com/.test/vulkan-tools_1.3.204.0%2Bdfsg1-1_arm64.deb
sudo dpkg -i vulkan-tools_1.3.204.0+dfsg1-1_arm64.deb 
sync

Note: We have rebuilt the vulkan-tools package, please don’t use apt to install this package, no it may not work.

Check vulkan information

You can use command vulkaninfo to get the Vulkan support informations.

$ vulkaninfo
==========
VULKANINFO
==========

Vulkan Instance Version: 1.3.204


Instance Extensions: count = 11
===============================
        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_display                         : extension revision 23
        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

Device Groups:
==============
Group 0:
        Properties:
                physicalDevices: count = 1
                        Mali-G52 (ID: 0)
                subsetAllocation = 0

        Present Capabilities:
                Mali-G52 (ID: 0):
                        Can present images from the following devices: count = 1
                                Mali-G52 (ID: 0)
                Present modes: count = 1
                        DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR

Run vulkan test program

We have rebuilt the vulkan test program, you can run the test program vkcube-wayland test the vulkan. If everything is ok, you can see the rotating cube as below.

4 Likes

Does this also work on VIM3 Pro? Thanks

It doesn’t support for current 4.9 kernel images, but VIM3 will supports Vulkan in the next 5.15 kernel images.

Do you have any timeline for it? Also I just purchased Edge2, any plan to get vulkan support for it? (ubuntu). Thanks

It will be Q3, at least images will be avaliable.

For Edge2, there is no plan to support Vulkan.

Totally understand the decision from business point of view, but just out of curiosity: is amlogic chip have better/easier support for vulkan than rockchip? I saw we got support for vim3/4, but not the edge2?

Yes, at this moment will have Vulkan support for VIM3/3L/4/1S.

So if I currently use vim3-ubuntu-22.04-gnome-linux-6.1-fenix-1.4-221229.img.xz on my Vim3 Pro, can I use vulkan in this version now? How?

@khkhkh It is not supported in mainline firmware, you need to wait for 5.15 Linux image release.

Thanks! Do you know when will we have the ubuntu generic image ready for Vim3 Pro?

You can see test version maybe after next week.

VIM3 with 5.15 kernel will have vulkan support.

Hiya, I’m just about to invest in Khadas for the first time with a Vim3, but it depends on this Vulkan support for that board.

What’s the current expectation around availability, and whether or not it’ll work as expected, or will it have to go through a “beta” phase to iron out any issues?

Actually, I see that these are the ARM proprietary drivers, yes?

So - while I’m waiting for these - is there a build where I can use PanVk (Panfrost) on the Vim3?

Does Armbian’s Vim3 build support that, I wonder?

If anyone knows, please shout! :slight_smile:

Duncan

We will update the test images for VIM3/3L with 5.15 kernel it the end of this month, you can check then.

Yes, it should be supported. Check here:

Thanks for all that! Great stuff.

I have a couple more questions if that 's OK:

I believe it probably uses a branched downstream kernel as well? So you can’t have a v6 kernel easily?

Are the proprietary parts tied (either by code or by licensing) to the Vim3 or could they be used on other A311D boards to get Vulkan support on them as well?

Thanks again,
Duncan

VIM3 is supported in the upstream linux kernel, panfrost included.

The current Mainline images, and Armbian are based on current 6.x kernel.

Prebuilt images ready for download are here:

You can build your own images with the latest stable software with fenix:

They can be ported for the same A311D platform.

Oh this is brilliant! I could “play” with Panfrost while waiting for the blob, then. I know PanVk is in a broken state, but it’ll get me started - unless you know of some blocker there?

But … presumably the blob when it comes later this month still won’t be compatible in some way with the upstream v6 stuff you’re talking about?

And, specifically, do you see it being possible to get anything going on the Banana Pi CM4-format board, which also has Armbian “Platinum”? I would like to have two hardware options for what I’m working on!

If anyone else has any thoughts on the above, go ahead - I imagine there are commercial reasons why Khadasians wouldn’t answer!

To answer myself, then: as is typical with proprietary closed offerings, this sealed blob will be tied to an out-of-date, downstream, hacked-up kernel that’s so specific to the board it targets that there’s no way of using it on a competitor’s board and your hands are tied for customising an image build.

I get why they do this, commercial forces, but if I were running a company I’d make one of its USPs that we respect the customers that pay us our income more than the backroom deals we are expected to make with “partners”.

I just dipped back into the Raspberry Pi ecosystem, and even though you can’t productise their platform (still commercial, closed, etc), it was such a relief to be back where everything just works - where you’re on a v6 kernel, DSI just works out of the box, indeed most things you can just plug in and they work, you can pipe Vulkan directly into DRM without being forced into Wayland, etc.

I just came from a period trying to do all this with a Radxa Rockchip board, and to be fair, their ecosystem is even worse. They’re still on a 4.19 kernel for a start, and you shouldn’t expect any Vulkan at all.

1 Like