termux-user-repository / tur

A place for all types of Termux packages.
Other
410 stars 78 forks source link

[Bug]: mesa-zink "libEGL warning: MESA-LOADER: failed to open swrast" #358

Open ShapeShifter499 opened 1 year ago

ShapeShifter499 commented 1 year ago

@licy183 I tried using this package here and I keep getting the following error

~ $ MESA_NO_ERROR=1 MESA_GL_VERSION_OVERRIDE=4.0 GALLIUM_DRIVER=zink virgl_test_server --use-egl-surfaceless --use-gles
ENTER:virgl_renderer_init
libEGL warning: MESA-LOADER: failed to open swrast: dlopen failed: cannot locate symbol "_ZN7android18egl_get_connectionEv" referenced by "/system/lib64/libGLESv3.so"... (search paths /data/data/com.termux/files/usr/lib/dri, suffix _dri)

  ENTER:virgl_renderer_cleanup
  LEAVE virgl_renderer_cleanup
LEAVE virgl_renderer_init
failed to initialise renderer.

With the following from a Ubuntu proot in termux-x11

ransu@localhost:~$ GALLIUM_DRIVER=virpipe MESA_GL_VERSION_OVERRIDE=4.0 glxgears
lost connection to rendering server on 8 read -1 104
Aborted

Phone used is a Samsung Fold 4 512GB running Android 13 April security patch. Does anyone have any ideas what might be the issue?

licy183 commented 1 year ago

Could you please provide the output of termux-info? It seems that you're using the Android 5/6 variant of Termux App but subscribing the apt repository of the Android 7 variant.

ShapeShifter499 commented 1 year ago
Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=28864
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://mirrors.sahilister.in/termux/termux-main stable main
# sources.list.d/termux-adb.list
deb https://nohajc.github.io termux extras
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
# x11-repo (sources.list.d/x11.list)
deb https://mirrors.sahilister.in/termux/termux-x11 x11 main
Updatable packages:
gawk/stable 5.2.1-1 aarch64 [upgradable from: 5.2.1]
termux-tools version:
1.37.0
Android version:
13
Kernel build information:
Linux localhost 5.10.136-android12-9-25884040-abF936U1UES2CWC9 #1 SMP PREEMPT Wed Mar 22 03:12:01 UTC 2023 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-F936U1
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
ShapeShifter499 commented 1 year ago

@licy183 I grabbed the latest Termux from f-droid

licy183 commented 1 year ago

I can't reproduce it. Are you using virglrenderer-mesa-zink?

ShapeShifter499 commented 1 year ago

I only installed mesa-zink I didn't realize I needed another package.

ShapeShifter499 commented 1 year ago

@licy183 what packages should have I installed? Instaling virglrenderer-mesa-zink didn't change anything.

licy183 commented 1 year ago

I wonder why your mesa will try to search /system/lib64/, this is not intended. Could you please remove all the libraries in $PREFIX/lib/dri and reinstall mesa-zink?

ShapeShifter499 commented 1 year ago

No change. This wouldn't conflict with termux-x11 would it? I'm using that as the x11 display for the xfce4 desktop I have installed.

Screenshot_20230416_184428_TermuxX11 Screenshot_20230416_184453_Termux

licy183 commented 1 year ago

I don't think this will conflict with termux-x11, and I cannot reproduce it on my Android 9 and Android 12 device. Maybe this is an issue that only exists in Android 13.

IntinteDAO commented 1 year ago

@ShapeShifter499

Why do you want to use Mesa Zink if you use swrast? I think you can add LD_LIBRARY_PATH to directory where you store DRI?

T-Dynamos commented 1 year ago

Just here to inform that My Android 13 has that missing symbol.

~$ readelf -Ws /system/lib64/libGLESv3.so |grep _ZN7android18egl_get_connectionEv
     2: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND_ZN7android18egl_get_connectionEv
~$ termux-info
Termux Variables:
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=13868
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages-cf.termux.dev/apt/termux-main/ stable main
# x11-repo (sources.list.d/x11.list)
deb https://packages-cf.termux.dev/apt/termux-x11/ x11 main
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
Updatable packages:
blender/tur-packages 3.6-alpha-2 aarch64 [upgradable from: 3.6-alpha-1]
command-not-found/stable 2.1.0-20 aarch64 [upgradable from: 2.1.0-19]
python-numpy/stable 1.24.3 aarch64 [upgradable from: 1.24.2]
termux-tools version:
1.38.1
Android version:
13
Kernel build information:
Linux localhost 4.9.337~zLOS-ae6988ce #1 SMP PREEMPT Wed Apr 12 09:10:07 CEST 2023 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
Redmi Note 4
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
ShapeShifter499 commented 1 year ago

@IntinteDAO I am trying to make use of faster GPU rendering if possible.

@T-Dynamos because of your post, I double-checked, and my system has the same symbol here. BUT doesn't UND mean undefined?

~ $ readelf -Ws /system/lib64/libGLESv3.so |grep _ZN7android18egl_get_connectionEv
     2: 0000000000000000     0 FUNC    GLOBAL DEFAULT   UND _ZN7android18egl_get_connectionEv
~ $ termux-info
Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=27461
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages-cf.termux.dev/apt/termux-main stable main
# sources.list.d/termux-adb.list
deb https://nohajc.github.io termux extras
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
# x11-repo (sources.list.d/x11.list)
deb https://packages-cf.termux.dev/apt/termux-x11 x11 main
Updatable packages:
command-not-found/stable 2.1.0-20 aarch64 [upgradable from: 2.1.0-19]
gnupg/stable 2.4.1 aarch64 [upgradable from: 2.4.0-3]
gpgv/stable 2.4.1 aarch64 [upgradable from: 2.4.0-3]
libopus/stable 1.4 aarch64 [upgradable from: 1.3.1-5]
proot-distro/stable 3.10.0 all [upgradable from: 3.9.1]
termux-tools version:
1.38.1
Android version:
13
Kernel build information:
Linux localhost 5.10.136-android12-9-26203352-abF936U1UEU2CWCC #1 SMP PREEMPT Fri Mar 24 08:59:35 UTC 2023 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-F936U1
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
~ $
ShapeShifter499 commented 1 year ago

@licy183 I updated termux packages pkg upgrade, installed the latest termux-x11 build, and updated the proot debian to the latest packages. I have an entirely different error message now.

../src/src/gallium/drivers/zink/zink_resource.c:804: struct zink_resource_object *resource_object_create(struct zink_screen *, const struct pipe_resource *, struct winsys_handle *, _Bool *, const uint64_t *, int): assertion "reqs.memoryTypeBits & BITFIELD_BIT(mai.memoryTypeIndex)" failed
chris-mcdonald-dev commented 6 months ago

@ShapeShifter499 Do you remember getting this last error to work? I oddly started having this issue recently as well. I can't run anything with zink as the gallium driver anymore.

I'm using: Termux X11 - From a recent Github Action build artifiact (I think Feb 29/2024) Packages: mesa-zink virglrenderer-mesa-zink vulkan-loader-android Commands: MESA_LOADER_DRIVER_OVERRIDE=zink GALLIUM_DRIVER=zink ZINK_DESCRIPTORS=lazy virgl_test_server --use-egl-surfaceless & and then running apps like glmark2 with GALLIUM_DRIVER=zink Device: S24 Ultra (Andreno 750 GPU)

For reference, here's the full error I'm getting:

MESA: error: ZINK: failed to choose pdev
glx: failed to create drisw screen
failed to load driver: zink
ZINK: USING LAZY DESCRIPTORS
../src/src/gallium/drivers/zink/zink_resource.c:804: struct zink_resource_object *resource_object_create(struct zink_screen *, const struct pipe_resource *, struct winsys_handle *, _Bool *, const uint64_t *, int): assertion "reqs.memoryTypeBits & BITFIELD_BIT(mai.memoryTypeIndex)" failed
lost connection to rendering server on 8 read -1 104

If preferred, I can open up a new ticket.

S16201512 commented 1 month ago

somebody solved this error:lost connection to rendering server on 8 read -1 104? I get the same error, when I run vtest