Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"mesa-vulkan-icd-wrapper" issues Reporting 2024-11-14 (GPU : Samsung Xclipse 940) #31

Closed
2 tasks
hansm629 opened this issue Nov 14, 2024 · 19 comments
Closed
2 tasks

Comments

@hansm629
Copy link

hansm629 commented Nov 14, 2024

@xMeM
From now on, I will report only Vulkan related issues and DXVK related issues in new issue reports. 🙂
(For Zink related issues, I am considering gathering symptoms occurring across all GPUs and reporting them all at once if necessary.)

https://github.com/xMeM/termux-packages/actions/runs/11801252552

  • Package: mesa-vulkan-icd-wrapper-dbg_24.2.5-8_aarch64.deb
  • Device: Galaxy S24+
  • SoC: Exynos2400 (GPU: Samsung Xclipse 940)
Termux-info

Termux Variables:
TERMUX_API_APP__VERSION_NAME=0.50.1+8651fd9
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP__AM_SOCKET_SERVER_ENABLED=true
TERMUX_APP__APK_PATH=/data/app/~~p1oPAinlL1zHyWTG6-mJQg==/com.termux-Ab-kRe0QmvX1uRj2OJV7Gw==/base.apk
TERMUX_APP__APK_RELEASE=GITHUB
TERMUX_APP__FILES_DIR=/data/user/0/com.termux/files
TERMUX_APP__IS_DEBUGGABLE_BUILD=true
TERMUX_APP__IS_INSTALLED_ON_EXTERNAL_STORAGE=false
TERMUX_APP__PACKAGE_MANAGER=apt
TERMUX_APP__PACKAGE_NAME=com.termux
TERMUX_APP__PACKAGE_VARIANT=apt-android-7
TERMUX_APP__PID=13739
TERMUX_APP__SE_FILE_CONTEXT=u:object_r:app_data_file:s0:c127,c257,c512,c768
TERMUX_APP__SE_INFO=default:targetSdkVersion=28:complete
TERMUX_APP__SE_PROCESS_CONTEXT=u:r:untrusted_app_27:s0:c127,c257,c512,c768
TERMUX_APP__TARGET_SDK=28
TERMUX_APP__UID=10383
TERMUX_APP__USER_ID=0
TERMUX_APP__VERSION_CODE=118
TERMUX_APP__VERSION_NAME=0.118.0+e59e5c1
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0+e59e5c1
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb http://mirror.mephi.ru/termux/termux-main stable main
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous tur-multilib
# x11-repo (sources.list.d/x11.list)
deb http://mirror.mephi.ru/termux/termux-x11 x11 main
Updatable packages:
curl/stable 8.10.1-2 aarch64 [upgradable from: 8.10.1-1]
libcurl/stable 8.10.1-2 aarch64 [upgradable from: 8.10.1-1]
libgmp/stable 6.3.0-1 aarch64 [upgradable from: 6.3.0]
python-pip/stable 24.3 all [upgradable from: 24.2-1]
termux-tools version:
1.44.2
Android version:
14
Kernel build information:
Linux localhost 6.1.75-android14-11 #1 SMP PREEMPT Wed Oct  2 04:19:04 UTC 2024 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-S926N
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.widget versionCode:13
com.termux.x11 versionCode:14
com.termux.api versionCode:51

issue list

  • 1. vkmark [Clear] screen flickering issue (update : 2024-11-14)
  • 2. hangover-wine DXVK work issue (update : 2024-11-14)

1. vkmark [Clear] screen flickering issue

Starting with the latest build, when running vkmark, a flickering screen error has been observed in the final benchmark, [Clear].

I'm not sure if it's related to this issue, but when running Supertuxkart with the Vulkan renderer, the screen flickering gameplay.

This issue occurs regardless of whether the MESA_VK_WSI_DEBUG=nosync and MESA_VK_WSI_PRESENT_MODE=mailbox environment variables are applied.

2024_11_05.22_44.mp4

2. hangover-wine DXVK work issue

I'm not certain if it’s related to the above issue, but a similar flickering issue is occurring when running games with DXVK on hangover-wine.

If the flickering issue in vkmark [Clear] is resolved, I’ll proceed with additional testing.

DXVK.work.issue.mp4

@paulowesll
Please add any further comments if additional issues arise during game testing on hangover-wine.

@mshzhb
Copy link

mshzhb commented Nov 18, 2024

Hi xMeM, I'm Tong from the Samsung Exynos GPU group. We've been impressed by your innovative work and are interested in discussing potential sponsorship opportunities to support your project.

Please feel free to reach out at [email protected] to arrange a time to discuss this further.

Best regards,
Tong

@mshzhb
Copy link

mshzhb commented Nov 18, 2024

Hi @hansm629 & xMeM,
I'd like to help testing as well. Could you please give me a simple instruction how to install this WSI layer? Currently I have a proot Debian running on Exynose2400. Thanks!

+1-6464682620 is my what's app

@hansm629
Copy link
Author

@xMeM
https://github.com/xMeM/termux-packages/actions/runs/11887619868
mesa-vulkan-icd-wrapper-dbg_24.2.5-9_aarch64.deb

test with the latest version, the "vkmark [Clear] screen flickering issue" still persists.

Additionally, starting from the latest version, it seems that the MESA_VK_WSI_DEBUG=nosync environment variable is no longer working.

~$ MESA_VK_WSI_DEBUG=nosync vkmark
=======================================================
    vkmark 2017.08
=======================================================
    Vendor ID:      0x144D
    Device ID:      0x2600200
    Device Name:    Samsung Xclipse 940
    Driver Version: 8388608
    Device UUID:    35f18c726c2d5685ae5893b649517b92
=======================================================
[vertex] device-local=true: FPS: 1623 FrameTime: 0.616 ms
[vertex] device-local=false: FPS: 1502 FrameTime: 0.666 ms
[texture] anisotropy=0: FPS: 1344 FrameTime: 0.744 ms
[texture] anisotropy=16: FPS: 1372 FrameTime: 0.729 ms
[shading] shading=gouraud: FPS: 1716 FrameTime: 0.583 ms
[shading] shading=blinn-phong-inf: FPS: 1307 FrameTime: 0.765 ms
[shading] shading=phong: FPS: 1182 FrameTime: 0.846 ms
[shading] shading=cel: FPS: 1839 FrameTime: 0.544 ms
[effect2d] kernel=edge: FPS: 1795 FrameTime: 0.557 ms
[effect2d] kernel=blur: FPS: 1505 FrameTime: 0.664 ms
[desktop] <default>: FPS: 1213 FrameTime: 0.824 ms
[cube] <default>: FPS: 1671 FrameTime: 0.598 ms
[clear] <default>: FPS: 1488 FrameTime: 0.672 ms
=======================================================
                                   vkmark Score: 1504
=======================================================

@hansm629
Copy link
Author

hansm629 commented Nov 18, 2024

@mshzhb
The mesa-vulkan-icd-wrapper operates in the Termux native X11 environment of not in the PRoot-Distro Linux environment.

Here is my setup:

1. Termux XFCE4 Desktop & PRoot Debian install

curl -sL https://raw.githubusercontent.com/phoenixbyrd/Termux_XFCE/main/install.sh -o install.sh && chmod +x install.sh && ./install.sh

2. Termux packages install

pkg install chromium vlc-qt webp-pixbuf-loader ffmpegthumbnailer mesa-demos glmark2 vkmark vulkan-tools clvk clinfo supertuxkart kdenlive shotcut jack blender

3. Termux XFCE4 Desktop Start

start

4. xfwm4.xml Edit

In the xfwm4.xml file, change the value of the vblank_mode option from auto to off.

cd /data/data/com.termux/files/home/.config/xfce4/xfconf/xfce-perchannel-xml
nano xfwm4.xml
    <property name="vblank_mode" type="string" value="off"/>

5. mesa-vulkan-icd-wrapper install

https://github.com/xMeM/termux-packages/actions/runs/11887619868
Download and install the above packages.

dpkg -i mesa-vulkan-icd-wrapper-dbg_24.2.5-9_aarch64.deb

6. Start sh Edit

Please modify the start script at the following path.

cd /data/data/com.termux/files/usr/bin/
nano start

mesa-24.2.7 & virglrenderer-android

#!/bin/bash

# Enable PulseAudio over Network
pulseaudio --start --load="module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1" --exit-idle-time=-1 > /dev/null 2>&1

XDG_RUNTIME_DIR=${TMPDIR} termux-x11 :1.0 & > /dev/null 2>&1
sleep 1

am start --user 0 -n com.termux.x11/com.termux.x11.MainActivity > /dev/null 2>&1
sleep 1

virgl_test_server_android --angle-vulkan & > /dev/null 2>&1

env DISPLAY=:1.0 MESA_NO_ERROR=1 MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink MESA_GL_VERSION_OVERRIDE=4.6COMPAT MESA_GLES_VERSION_OVERRIDE=3.2 dbus-launch --exit-with-session xfce4-session & > /dev/null 2>&1
# Set audio server
export PULSE_SERVER=127.0.0.1 > /dev/null 2>&1

sleep 5
process_id=$(ps -aux | grep '[x]fce4-screensaver' | awk '{print $2}')
kill "$process_id" > /dev/null 2>&1

mesa-zink-22.0.5 & virglrenderer-mesa-zink

pkg install mesa-zink virglrenderer-mesa-zink
#!/bin/bash

# Enable PulseAudio over Network
pulseaudio --start --load="module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1" --exit-idle-time=-1 > /dev/null 2>&1

XDG_RUNTIME_DIR=${TMPDIR} termux-x11 :1.0 & > /dev/null 2>&1
sleep 1

am start --user 0 -n com.termux.x11/com.termux.x11.MainActivity > /dev/null 2>&1
sleep 1

MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink ZINK_DESCRIPTORS=lazy virgl_test_server --use-egl-surfaceless --use-gles & > /dev/null 2>&1

env DISPLAY=:1.0 MESA_NO_ERROR=1 MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink MESA_GL_VERSION_OVERRIDE=4.6COMPAT MESA_GLES_VERSION_OVERRIDE=3.2 dbus-launch --exit-with-session xfce4-session & > /dev/null 2>&1
# Set audio server
export PULSE_SERVER=127.0.0.1 > /dev/null 2>&1

sleep 5
process_id=$(ps -aux | grep '[x]fce4-screensaver' | awk '{print $2}')
kill "$process_id" > /dev/null 2>&1

You can modify the script according to the installed mesa version.
In my experience, while mesa-zink-22.0.5 has lower OpenGL & OpenGL ES performance compared to mesa-24.2.7, it is more stable.

Blender works smoothly on mesa-zink-22.0.5!

However, if you plan to work on improving Official Vulkan driver compatibility for the Exynos GPU group, I recommend testing in the mesa-24.2.7 environment.

After testing with mesa-zink-22.0.5, if you want to test with mesa-24.2.7, you can reinstall mesa-24.2.7 using the command below and then modify the start script accordingly.

pkg install mesa

7. glmark2 & vkcube Test

Once all the above preparations are complete, exit XFCE4 and run the following command in Termux to start XFCE4:

start

Then, check if glmark2 and vkcube are working properly.
Screenshot_2024-11-18_21-22-54

glmark2
=======================================================
    glmark2 2023.01
=======================================================
    OpenGL Information
    GL_VENDOR:      Mesa
    GL_RENDERER:    zink Vulkan 1.3(Samsung Xclipse 940 (SAMSUNG_PROPRIETARY))
    GL_VERSION:     4.6 (Compatibility Profile) Mesa 24.2.7
    Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
    Surface Size:   800x600 windowed
=======================================================
[build] use-vbo=false: FPS: 475 FrameTime: 2.106 ms
[build] use-vbo=true: FPS: 552 FrameTime: 1.813 ms
[texture] texture-filter=nearest: FPS: 499 FrameTime: 2.006 ms
[texture] texture-filter=linear: FPS: 509 FrameTime: 1.967 ms
[texture] texture-filter=mipmap: FPS: 500 FrameTime: 2.002 ms
[shading] shading=gouraud: FPS: 545 FrameTime: 1.836 ms
[shading] shading=blinn-phong-inf: FPS: 562 FrameTime: 1.782 ms
[shading] shading=phong: FPS: 530 FrameTime: 1.890 ms
[shading] shading=cel: FPS: 584 FrameTime: 1.713 ms
[bump] bump-render=high-poly: FPS: 505 FrameTime: 1.982 ms
[bump] bump-render=normals: FPS: 534 FrameTime: 1.876 ms
[bump] bump-render=height: FPS: 583 FrameTime: 1.716 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 504 FrameTime: 1.988 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 507 FrameTime: 1.974 ms
[pulsar] light=false:quads=5:texture=false: FPS: 467 FrameTime: 2.144 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 379 FrameTime: 2.645 ms
[desktop] effect=shadow:windows=4: FPS: 423 FrameTime: 2.365 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 195 FrameTime: 5.131 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 356 FrameTime: 2.814 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 218 FrameTime: 4.597 ms
[ideas] speed=duration: FPS: 540 FrameTime: 1.853 ms
[jellyfish] <default>: FPS: 420 FrameTime: 2.386 ms
[terrain] <default>: FPS: 266 FrameTime: 3.770 ms
[shadow] <default>: FPS: 523 FrameTime: 1.915 ms
[refract] <default>: FPS: 308 FrameTime: 3.250 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 698 FrameTime: 1.435 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 660 FrameTime: 1.517 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 666 FrameTime: 1.503 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 663 FrameTime: 1.509 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 676 FrameTime: 1.480 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 683 FrameTime: 1.466 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 531 FrameTime: 1.885 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 472 FrameTime: 2.123 ms
=======================================================
                                  glmark2 Score: 500 
=======================================================

Screenshot_2024-11-18_21-26-10

vkcube
Selected WSI platform: xcb
Selected GPU 0: Samsung Xclipse 940, type: IntegratedGpu

@paulowesll
Copy link

@xMeM With lasted wrapper update it's having lot of graphics problems with Xclipse GPU and dxvk, with previous it have no problems.

mesa-vulkan-icd-wrapper-dbg_24.2.5-9_aarch64.deb

VID_20241118_091738_600.mp4

mesa-vulkan-icd-wrapper-dbg_24.2.5-8_aarch64.deb

1_5032919617496941629.mp4

@hansm629
Copy link
Author

@paulowesll
How are other Direct3D 11 games?
Based on previous builds, do most of them run well?

@hansm629
Copy link
Author

@mshzhb
Hello, Sir.
I am a user of the Galaxy S24+ (Exynos 2400: Xclipse 940).

Thank you very much for taking an interest in this solution as part of Samsung’s Exynos GPU group.

Currently, when combining the Xclipse 940 Android host Vulkan driver with mesa-vulkan-icd-wrapper, it shows the second-best compatibility after the Adreno 7xx series GPU.

Although there are still minor issues with mesa zink compatibility and DXVK (hangover-wine) compatibility, I firmly believe that if Samsung improves the Android host Vulkan driver, mesa zink and DXVK will demonstrate far superior compatibility compared to the Adreno 7xx series GPU!

Please seriously consider supporting and sponsoring this solution!

@paulowesll
Copy link

@paulowesll How are other Direct3D 11 games? Based on previous builds, do most of them run well?

Hangover-wine have not a good compatibility with games yet, so many will not work, for 64bit games it uses FEX , so most of games is crashing. If i can play some with DXD11 i will post here.

Screenshot_20241118_101909_TermuxX11

@mshzhb
Copy link

mshzhb commented Nov 18, 2024

@mshzhb Hello, Sir. I am a user of the Galaxy S24+ (Exynos 2400: Xclipse 940).

Thank you very much for taking an interest in this solution as part of Samsung’s Exynos GPU group.

Currently, when combining the Xclipse 940 Android host Vulkan driver with mesa-vulkan-icd-wrapper, it shows the second-best compatibility after the Adreno 7xx series GPU.

Although there are still minor issues with mesa zink compatibility and DXVK (hangover-wine) compatibility, I firmly believe that if Samsung improves the Android host Vulkan driver, mesa zink and DXVK will demonstrate far superior compatibility compared to the Adreno 7xx series GPU!

Please seriously consider supporting and sponsoring this solution!

Hello, Sir!
Actually we are testing proprietary VK umd on proot Debian. May I have your contact?
Thanks a lot for your detailed instruction!

Thanks,
Tong

@paulowesll
Copy link

@mshzhb Hello, Sir. I am a user of the Galaxy S24+ (Exynos 2400: Xclipse 940).

Thank you very much for taking an interest in this solution as part of Samsung’s Exynos GPU group.

Currently, when combining the Xclipse 940 Android host Vulkan driver with mesa-vulkan-icd-wrapper, it shows the second-best compatibility after the Adreno 7xx series GPU.

Although there are still minor issues with mesa zink compatibility and DXVK (hangover-wine) compatibility, I firmly believe that if Samsung improves the Android host Vulkan driver, mesa zink and DXVK will demonstrate far superior compatibility compared to the Adreno 7xx series GPU!

Please seriously consider supporting and sponsoring this solution!

Hello, Sir!
Actually we are testing proprietary VK umd on proot Debian. May I have your contact?
Thanks a lot for your detailed instruction!

Thanks,
Tong

Hello! Can you provide more details about this Proprietary VK on proot debian? If you need a tester, i can test also, I'm curious about this and would be great to help with it.

Thanks.

@hansm629
Copy link
Author

@mshzhb
Hello, Sir!
I’ve send you an email.

Please check 😄

@paulowesll
Copy link

@xMeM about the errors with lasted update, I forgot the logs, it give error about image memory.

info: Presenter: Actual swap chain properties:
info: Format: VK_FORMAT_B8G8R8A8_SRGB
info: Color space: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR
info: Present mode: VK_PRESENT_MODE_MAILBOX_KHR (dynamic: yes)
info: Buffer size: 800x600
info: Image count: 5
info: Exclusive FS: 1
err: Failed to bind image memory: -13
err: type: VK_IMAGE_TYPE_2D
err: format: VK_FORMAT_BC1_RGBA_SRGB_BLOCK
err: extent: 256x256x1
err: layers: 1
err: mips: 9
err: samples: 1
err: Failed to bind image memory: -13
err: type: VK_IMAGE_TYPE_2D
err: format: VK_FORMAT_BC1_RGBA_SRGB_BLOCK
err: extent: 256x256x1
err: layers: 1
err: mips: 9
err: samples: 1
err: Failed to bind image memory: -13
err: type: VK_IMAGE_TYPE_2D
err: format: VK_FORMAT_BC1_RGBA_SRGB_BLOCK
err: extent: 256x256x1
err: layers: 1
err: mips: 9
err: samples: 1

@paulowesll
Copy link

@xMeM With lasted wrapper update mesa-vulkan-icd-wrapper-dbg_24.2.5-10_aarch64.deb it's still having memory issues. With mesa-vulkan-icd-wrapper-dbg_24.2.5-8_aarch64.deb it's working fine.
Screenshot_20241203_221008_TermuxX11

@paulowesll
Copy link

@xMeM thank you for the update, the memory issues has been fixed with mesa-vulkan-icd-wrapper-dbg_24.2.5-11_aarch64.deb

@hansm629 hansm629 closed this as completed Dec 4, 2024
@Jcerp
Copy link

Jcerp commented Dec 6, 2024

Could you explain how to use the driver in wine?
Hangover glibc o native repository tur-repo?

@xMeM thank you for the update, the memory issues has been fixed with mesa-vulkan-icd-wrapper-dbg_24.2.5-11_aarch64.deb

@jhinzuo
Copy link

jhinzuo commented Jan 23, 2025

@hansm629 Sorry for reopening this but is there any way to get a updated guide for ur current setup? Since Phoenix changed the install.sh/ removed it this setup no longer works.
Got vkcube running with the xclipse getting detected but seem to crash after 15s.

I would really appreciate an update to ur guide :).

@hansm629
Copy link
Author

@jhinzuo
termux/termux-packages#22500

Are you experiencing the same symptoms in the version currently in progress?

@jhinzuo
Copy link

jhinzuo commented Jan 25, 2025

@hansm629
Yes These issues are in the current version after I tried to install mesa. Installing wsi layer went good. But now I broke it and isn't even showing any display output so I'll probably start over :) .
Was about to try and use the old install script but I think it is because the script that needs to be edited isn't looking the same anymore. So I either try to fix the start.sh script or use a older commit of his repo.

New start.sh

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants