Project crashes on Android with following Vulkan error

Godot Version

v4.2.1.stable.official run on Redmi Note 9 Pro (miatoll) with crDroid10.2 custom ROM on a14

Question

This project was started on Forward+ renderer and recently I switched to Mobile renderer and I cant run exported .apk on my device because of the following error (copied from engine’s debug results):

Selected screen scale: 1.79999995231628
Vulkan: Did not create swapchain successfully. Error code:
VK_ERROR_SURFACE_LOST_KHR
Error code: VK_ERROR_SURFACE_LOST_KHR

I feel like Ive searched many forums top to bottom, but still didnt find any solution
Weird thing is I have another project I started recently using Mobile renderer and it works just fine on my device

Mobile render doesn’t use Vulcan

If you want to use Vulcan I think your phones ardeno 618 should support it. But I would double check the drivers contained in your android distro are up to date.

What is Vulcan?

It’s a rendering API in contrast to OpenGl 3 the mobile render uses that will talk to your GPU.

Vulcan is the open source version of proprietary api’s such as Microsofts Directx12 and Apples Metal

1 Like

Oh ok, I was confused because it made me think of the game studio called “Vulcan”

Out of pure curiosity are you currently on mobile?

You mean typing on my phone? Yes

Developing, no. but I have worked on Android embedded systems.

Oh I see,
Have you ever tried developing on mobile?
It is not something I have done.
I am quite curious about how regular users find doing things on their mobile as I hardly use it

Not yet with Godot. I have dabbled years ago with very crude and basic apps. Why do you ask?

In my professional career I developed and maintained an Android HAL. And gave advice to app developer partners on how to use the system properly.

I was a middle ware guy.

1 Like

I want to use mobile for godot development in the future
It would help me test my current project which was targeted partly at mobile users.

Your pro career sounds quite impressive (at least for me).

I shouldn’t really tell you my exact details (bad practises for the internet)
But I will say I am very inexperienced with game development.

1 Like

What language do you prefer to use?

I sent you a dm, we shouldn’t use this person’s topic to chat

Updating drivers is up to ROM maintainer? Or I can update them manually?

I’m not exactly sure, I would assume that the hardware vendor provides some driver that is Vulcan compatible, then you need the Vulcan runtime libraries. I assume you have some version of the runtime libraries already since it gets that far into accessing your gpu.

Although I’m not exactly sure how a rom gets a hold of a vendors BSP, or if they are just freely available to the public. I would investigate your rom and hardware to see what is available. And if anyone else has had an issue with your phone and vulkan.

Since you probably have root access you could definitely modify the system yourself. I just don’t know if the things you need are easily accessible.

drivers can be updated quite easily, if you have root and ksu/magisk there are modules that contain new drivers
I got my hands on one of that modules with new drivers for my phone, flashed it with KSU and now everything works fine, godot can be launched on my phone just fine, and GPU particles now should work (havent tested yet)

forget about gpu particles, old versions of my game that used them still dont work
not like I care, I switched to cpu particles long time ago, was a bit frustated that its never stated that gpu particles wont work on mobile

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.