mesa-for-android-container icon indicating copy to clipboard operation
mesa-for-android-container copied to clipboard

vkmark not working on Turnip

Open hansm629 opened this issue 7 months ago • 17 comments

@lfdevs Hello, sir. The turnip driver you distributed is working well in most proot environments. However, it seems that vkmark still isn't working.

Will this be fixed later?

╭─[hsm @ localhost] [~]
╰─❯ vkmark
Error: filesystem error: status: Permission denied [/dev/dri/card0]

hansm629 avatar Apr 20 '26 02:04 hansm629

Currently, for the PRoot environment, I have only tested vkmark running successfully under Ubuntu 24.04. Perhaps the vkmark package maintained by Ubuntu has added additional patches for compatibility with the PRoot environment.

vkmark result on Adreno 830 (Ubuntu 24.04 PRoot)
user@localhost:~$ XDG_RUNTIME_DIR=/tmp DISPLAY=':2' MESA_LOADER_DRIVER_OVERRIDE=kgsl TU_DEBUG=sysmem vkmark
ERROR:             VkInstanceCreateInfo::pApplicationInfo::apiVersion has value of 0 which is not permitted. If apiVersion is not 0, then it must be greater than or equal to the value of VK_API_VERSION_1_0 [VUID-VkApplicationInfo-apiVersion]
=======================================================
    vkmark 2017.08
=======================================================
    Vendor ID:      0x5143
    Device ID:      0x44050001
    Device Name:    Adreno (TM) 830
    Driver Version: 109052003
    Device UUID:    65e14d2e620f7e29173b354ebe88e864
=======================================================
[vertex] device-local=true: FPS: 258 FrameTime: 3.876 ms
[vertex] device-local=false: FPS: 306 FrameTime: 3.268 ms
[texture] anisotropy=0: FPS: 306 FrameTime: 3.268 ms
[texture] anisotropy=16: FPS: 305 FrameTime: 3.279 ms
[shading] shading=gouraud: FPS: 305 FrameTime: 3.279 ms
[shading] shading=blinn-phong-inf: FPS: 306 FrameTime: 3.268 ms
[shading] shading=phong: FPS: 305 FrameTime: 3.279 ms
[shading] shading=cel: FPS: 305 FrameTime: 3.279 ms
[effect2d] kernel=edge: FPS: 306 FrameTime: 3.268 ms
[effect2d] kernel=blur: FPS: 304 FrameTime: 3.289 ms
[desktop] <default>: FPS: 304 FrameTime: 3.289 ms
[cube] <default>: FPS: 306 FrameTime: 3.268 ms
[clear] <default>: FPS: 307 FrameTime: 3.257 ms
=======================================================
                                   vkmark Score: 301
=======================================================
user@localhost:~$ fastfetch --logo none --pipe
user@localhost
--------------
OS: Ubuntu 24.04.4 LTS (Noble Numbat) aarch64
Kernel: Linux 6.6.77-android15-8-gca30f3b4bef6-abogki440974771-4k
Uptime: 3 days, 7 hours, 18 mins
Packages: 458 (dpkg)
Shell: bash 5.2.21
Display (screen): 1280x1024, 30 Hz
Theme: Yaru [GTK3]
Icons: Yaru [GTK3]
Cursor: Adwaita
Terminal: com.termux
CPU: Oryon 1*8 (8)
GPU: Qualcomm Adreno (TM) 830 [Integrated]
Memory: 8.64 GiB / 14.76 GiB (59%)
Swap: 5.07 GiB / 16.00 GiB (32%)
Disk (/): 253.56 GiB / 478.72 GiB (53%) - erofs [Read-only]
Locale: zh_CN.UTF-8

lfdevs avatar Apr 20 '26 04:04 lfdevs

@lfdevs Thank you for confirming!

I will install the vkmark distributed on Ubuntu,

and test again, then I will leave a comment.

hansm629 avatar Apr 20 '26 04:04 hansm629

@lfdevs http://ports.ubuntu.com/pool/universe/v/vkmark/vkmark_2025.01-1_arm64.deb

I tried installing the vkmark distributed by Ubuntu, but

I confirmed the same symptoms.

vkcube is working fine.

╭─[hsm @ localhost] [~]
╰─❯ sudo dpkg -i '/data/data/com.termux/files/home/Downloads/vkmark_2025.01-1_arm64.deb' (데이터베이스 읽는중 ...현재 112066개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack .../vkmark_2025.01-1_arm64.deb ...
Unpacking vkmark (2025.01-1) over (2025.01-1) ...
vkmark (2025.01-1) 설정하는 중입니다 ...
Processing triggers for man-db (2.13.1-1) ...
setpriv: setresgid failed: 명령을 허용하지 않음
╭─[hsm @ localhost] [~]
╰─❯ vkmark
Error: filesystem error: status: Permission denied [/dev/dri/card0]
╭─[hsm @ localhost] [~]
╰─❯ vkcube
Selected WSI platform: xcb
Selected GPU 0: Adreno (TM) 840, type: IntegratedGpu

hansm629 avatar Apr 20 '26 14:04 hansm629

I suggest testing under an Ubuntu PRoot container, as the issue might be also caused by other differences between distributions. However, the current Ubuntu version in PRoot Distro is 25.10, while the drivers built in this repository are still for the 24.04 version. Therefore, if you use the proot-distro command to install an Ubuntu 24.04 container for testing, you will need to add the distribution yourself, which is a bit more complicated.

If you want to test more simply, you can use the TMOE tool to install an Ubuntu PRoot container. Although its author, Moe, hasn't updated the tool for quite a long time because he/she is developing a new refactored version, the tool is still very useful.

And I also plan to add builds for ubuntu-rolling in the near future to avoid similar issues.

lfdevs avatar Apr 20 '26 15:04 lfdevs

And I also plan to add builds for ubuntu-rolling in the near future to avoid similar issues.

UPDATE: I installed an Ubuntu container (version 25.10) using proot-distro and installed the drivers built today; vkmark is running normally:

https://github.com/lfdevs/mesa-for-android-container/releases/tag/mesa-26.2.0-devel-20260423 https://github.com/lfdevs/mesa-for-android-container/releases/tag/turnip-26.2.0-devel-20260423

Image

lfdevs avatar Apr 23 '26 07:04 lfdevs

@lfdevs Thank you!

I will provide a comment after the test!

hansm629 avatar Apr 23 '26 07:04 hansm629

@lfdevs Hello, sir.

I tested with the 26.2.0_devel upstream build you provided, and while vkcube and glmark2 (kgsl) work well, vkmark is still not working!

I am running on an Ubuntu 25.10 aarch64 environment distributed by proot-distro.

Is there something I might have missed?

Image

hansm629 avatar Apr 26 '26 13:04 hansm629

It seems this issue is a bit complicated. I tried to fix the patched Turnip a few days ago, and you can also give it a try: https://github.com/lfdevs/mesa-for-android-container/pull/54#issuecomment-4336012303

lfdevs avatar Apr 28 '26 14:04 lfdevs

@lfdevs Hello, sir.

I tested with the 26.2.0_devel upstream build you provided, and while vkcube and glmark2 (kgsl) work well, vkmark is still not working!

I am running on an Ubuntu 25.10 aarch64 environment distributed by proot-distro.

Is there something I might have missed?

Image

Can you try with?

vkmark --winsys xcb

Saikatsaha1996 avatar Apr 29 '26 04:04 Saikatsaha1996

@Saikatsaha1996 Oh! It works now.

However, the performance is very low. I am only getting around 116–125 FPS.

It seems that when running vkmark with the standalone command, it tries to use the KMS/DRM backend path, which then causes an access issue with /dev/dri/card0.

vkmark
 → selects the KMS/DRM backend
 → tries to access /dev/dri/card0
 → Permission denied
 → fails

On the other hand, when running vkmark with the vkmark --winsys xcb command, it uses the X11/XCB backend path, so it runs without failing.

However, the performance seems to be quite low.

vkmark --winsys xcb
 → creates an X11 window
 → creates a Vulkan XCB surface
 → displays through Termux-X11
 → does not directly access /dev/dri/card0
 → runs successfully

@lfdevs I would also like to mention a separate issue.

Recently, I tried running SuperTuxKart with the Vulkan backend using(supertuxkart using --render-driver=vulkan) Turnip inside a proot environment, and I noticed severe screen tearing.

In the case of vkcube aswell, when running it in fullscreen, the frame pacing seems very unstable. In the current state, it feels like zero-copy or Android surface synchronization is not working properly.

Could this be related to whether the DRI3 patch is applied or not?

hansm629 avatar Apr 29 '26 05:04 hansm629

我也计划在不久的将来添加构建,以避免类似问题。ubuntu-rolling

**更新:**我用今天构建的驱动程序安装了一个Ubuntu容器(版本); 运行正常:25.10``proot-distro``vkmark

https://github.com/lfdevs/mesa-for-android-container/releases/tag/mesa-26.2.0-devel-20260423 https://github.com/lfdevs/mesa-for-android-container/releases/tag/turnip-26.2.0-devel-20260423

图片

Adding MESA_VK_WSI_DEBUG=sw fixed my issue.

Bruce-JCL avatar May 06 '26 03:05 Bruce-JCL

@Bruce-JCL Unfortunately, the MESA_VK_WSI_DEBUG=sw environment variable does not work with DRI3 zero copy.

hansm629 avatar May 06 '26 03:05 hansm629

It's doing the filesystem error for me of the patched turnip

blazingcody0707 avatar May 11 '26 08:05 blazingcody0707

It's doing the filesystem error for me of the patched turnip

Are there any errors when running vkmark --winsys xcb?

lfdevs avatar May 11 '26 13:05 lfdevs

It's working now of vkmark

blazingcody0707 avatar May 11 '26 15:05 blazingcody0707

@blazingcody0707 Please report anything unrelated to the issue elsewhere.

Don't do this here... :(

hansm629 avatar May 11 '26 15:05 hansm629

Sorry

blazingcody0707 avatar May 11 '26 15:05 blazingcody0707