Open Anonymous2716 opened 8 months ago
I tried to use other GUI apps through qterminal only in vnc , I get the same Abort message: 'invalid stub function called'
Try to install vulkan-loader-generic
and see if this issue is fixed.
@licy183 its working after installing the generic loader. Should I close this issue?
Emmm... not need to close this. Maybe some devices will be affected by this, although my device isn't affected.
Maybe as what discussed before in https://github.com/termux/termux-packages/pull/17297#discussion_r1249896105, introducing vulkan-loader
is a mistake. Actually mesa over zink without vulkan-loader-generic will not work correctly, but making mesa depend on vulkan-loader-generic
will also break installation of some packages, for example, python-torch
and mesa
cannot be installed at the same time.
CC: @truboxl
Can make vulkan-loader-generic the default for vulkan-loader
Then resolve the issues for each packages that arise
Deprecate the use of vulkan-loader-android and remove it
I think we have a better option.
We can make it a default option. Probably we should patch Xfvb/Xwayland/TigerVnc to handle DRI3 like termux-x11 but it will add X11 WSI to regular Android Vulkan library so it can be used as a default.
Or we can wait for @tareksander's termux-gfx-wrapper.
That'll still take a while. It'll support selecting the system EGL, GLES or Vulkan via env variables or in the API for EGL though. Packages like pytorch could be patched to configure the wrapper to use system libraries if needed if needed. That would also replace the vulkan-loader-android.
@truboxl @licy183 So what do you think about making vulkan-wsi-wrapper a default for vulkan-loader? BTW I do not see source code link for vulkan-loader-android, only that it is extracted from NDK release zip.
Also, about sysvk. We can make a post-inst script that may check if xMeM's sysvk works on given device and it will decide if it can be enabled or not.
Emmm... Is vulkan-wsi-wrapper
part of termux-gfx-wrapper
? Or the method mentioned in #19460.
If you are referring to the latter one , it still needs vulkan-loader-generic
as the default vulkan loader, since vulkan-wsi-layer
(as vulkan implicit layer) and sysvk
(as ICD) need to depend on vulkan-loader-generic
.
My termux-gfx-wrapper
Vulkan version would also need vulkan-loader-generic
, and would essentially accomplish the same as xMeM's variant, but with only public APIs. Since Vulkan already works headless, X11 and Wayland WSI is the only think that needs to be added. Why exactly do some packages need the system Vulkan version anyways?
Sorry, my fault. I was typing faster than I was thinking.
I think it will be better to make ONLY ONE thing, some combination of sysvk
, vulkan-loader-android
and vulkan-wsi-layer
and make it available as ICD.
I mean:
vulkan-wsi-layer
, because it is only 30 lines of code and vulkan-wsi-wrapper
will not work with other vulkan implementations except vulkan-loader-android
. BUT this method can cause segmentation fault
(because it is non-public API and vendors do not have to keep ABI compatibility) so we should make install-time or runtime checks (for example invoking some test in different process with execve
and wait for result) and decide if we use sysvk
or vulkan-loader-android
(see 2).vulkan-loader-generic
, but only for Android vulkan implementations. I think we can make vulkan-wsi-loader
dlopen
/system/lib[64]/libvulkan.so
, dlsym
there vkGetInstanceProcAddr
and invoke it in vk_icdGetInstanceProcAddr
. That part will serve as a vulkan-loader-android
, but in the context of vulkan-loader-generic
, so we will not need two separate vulkan loaders.sysvk
, vulkan-loader-android
and vulkan-wsi-layer
since sysvk
and vulkan-loader-android
serve for the same purpose and vulkan-wsi-layer
is useless without them (and works only in the case of X11 windows, its code will be noop in the headless mode).
python-torch
andmesa
cannot be installed at the same time.
Why?
This is what I get for sysvk
~/downloads $ vulkaninfo
ERROR: [Loader Message] Code 0 : loader_scanned_icd_add: Could not get 'vkCreateInstance' via 'vk_icdGetInstanceProcAddr' for ICD libsysvk.so
ERROR: [Loader Message] Code 0 : vkCreateInstance: Found no drivers!
Cannot create Vulkan instance.
This problem is often caused by a faulty installation of the Vulkan driver or attempting to use a GPU that does not support Vulkan.
ERROR at /home/builder/.termux-build/vulkan-tools/src/vulkaninfo/./vulkaninfo.h:458:vkCreateInstance failed with ERROR_INCOMPATIBLE_DRIVER
I'd be willing to contribute a public API version sysvk
(and vulkan-wsi-wrapper
for that matter) that can be switched to when the install time checks fail. You'd keep both in the same package, and copy the ICD json file of the one that is chosen to the ICD file directory. The package would then build and include sysvk
, vulkan-wsi-wrapper
and the Vulkan part of termux-gfx-wrapper
.
vulkan-loader-android
has a long history. Initially, vulkan was not available on Termux. Since PR #7165, truboxl packaged vulkan-loader-android
to provide headless vulkan operations. After that, many packages in the main repository began to use vulkan-loader-android
to provide vulkan operations, such as fastfetch
, libncnn
, clvk
, python-torch
, etc. Most of them use headless operations or just query GPU models. Later, vulkan-loader-generic
is packaged to provide vulkan operations about X11/Wayland, and later some ICDs are added. This is why we now have two vulkan-loaders.
python-torch
andmesa
cannot be installed at the same time.Why?
I just checked and the problem seems to no longer exist. If I remember correctly, when vulkan support for python-torch
was just added, python-torch
directly depended on vulkan-loader-android
. And fastfetch
also has the same problem. Later, truboxl corrected these dependencies. Now, they all depend on vulkan-loader
instead of vulkan-loader-android
, so the problem I mentioned above has gone.
This is what I get for sysvk
Yeah, in that case we can fallback to vkGetInstanceProcAddr
from /system/lib[64]/libvulkan.so
if libhardware-based code fails.
I'd be willing to contribute a public API version
sysvk
See code of sysvk. https://github.com/xMeM/sysvk/blob/main/sysvk.c
That is the reason I am suggesting to fallback to vkGetInstanceProcAddr
from /system/lib[64]/libvulkan.so
. Should be pretty much same thing.
This is why we now have two vulkan-loaders.
And that is why I am proposing to make vulkan-loader-android
be available as an ICD for vulkan-loader-generic
.
But probably we need to do something to make some packages force Android's vulkan implementation in that case. I am not sure how to do this.
But probably we need to do something to make some packages force Android's vulkan implementation in that case. I am not sure how to do this.
What is the alternative implementation? Probably lavapipe in Mesa, right? In that case sane applications should work correctly, as they'd choose the dedicated GPU device over a CPU emulation: https://docs.vulkan.org/spec/latest/chapters/devsandqueues.html#VkPhysicalDeviceType
Problem description
Xfce4-session doesn't start. Results in a blank screen.
Additional info if needed : My device doesn't support vulkan I think.
What steps will reproduce the bug?
vncserver -xstartup xfce4-session
What is the expected behavior?
No response
System information
termux-info:
logcat
in termux: