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

Vulkan failed to initialise. liblibdl: cannot open shared object file: No such file or directory #22956

Closed
taep96 opened this issue Mar 26, 2023 · 9 comments

Comments

@taep96
Copy link

taep96 commented Mar 26, 2023

Type

Game behaviour

Bug description

Game fails to initialize the Vulkan renderer. In runtime.log:

   6   β”‚ 2023-03-26 16:18:52 [verbose]: πŸ–ΌοΈ Configuration renderer choice: Vulkan
   7   β”‚ 2023-03-26 16:18:52 [verbose]: πŸ–ΌοΈ Renderer fallback order: [ Vulkan, OpenGL (Legacy), OpenGL ]
   8   β”‚ 2023-03-26 16:18:52 [verbose]: πŸ–ΌοΈ Initialising "Veldrid" renderer with "Vulkan" surface
   9   β”‚ 2023-03-26 16:18:53 [verbose]: Updated display mode to desktop resolution: 1920x1080@60, SDL_PIXELFORMAT_RGB888
  10   β”‚ 2023-03-26 16:18:53 [verbose]: πŸ–ΌοΈ Renderer initialisation failed with:
  11   β”‚ 2023-03-26 16:18:53 [verbose]: System.TypeInitializationException: The type initializer for 'Vulkan.VulkanNative' threw an exception.
  12   β”‚ 2023-03-26 16:18:53 [verbose]: ---> System.DllNotFoundException: Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
  13   β”‚ 2023-03-26 16:18:53 [verbose]: at Vulkan.Libdl.dlerror()
  14   β”‚ 2023-03-26 16:18:53 [verbose]: at Vulkan.NativeLibrary.UnixNativeLibrary.LoadLibrary(String libraryName)
  15   β”‚ 2023-03-26 16:18:53 [verbose]: at Vulkan.NativeLibrary..ctor(String libraryName)
  16   β”‚ 2023-03-26 16:18:53 [verbose]: at Vulkan.NativeLibrary.UnixNativeLibrary..ctor(String libraryName)
  17   β”‚ 2023-03-26 16:18:53 [verbose]: at Vulkan.NativeLibrary.Load(String libraryName)
  18   β”‚ 2023-03-26 16:18:53 [verbose]: at Vulkan.VulkanNative.LoadNativeLibrary()
  19   β”‚ 2023-03-26 16:18:53 [verbose]: at Vulkan.VulkanNative..cctor()
  20   β”‚ 2023-03-26 16:18:53 [verbose]: --- End of inner exception stack trace ---
  21   β”‚ 2023-03-26 16:18:53 [verbose]: at Veldrid.Vk.VulkanUtil.EnumerateInstanceLayers()
  22   β”‚ 2023-03-26 16:18:53 [verbose]: at Veldrid.Vk.VkGraphicsDevice.CreateInstance(Boolean debug, VulkanDeviceOptions options)
  23   β”‚ 2023-03-26 16:18:53 [verbose]: at Veldrid.Vk.VkGraphicsDevice..ctor(GraphicsDeviceOptions options, Nullable`1 scDesc, VulkanDeviceOptions vkOptions)
  24   β”‚ 2023-03-26 16:18:53 [verbose]: at Veldrid.Vk.VkGraphicsDevice..ctor(GraphicsDeviceOptions options, Nullable`1 scDesc)
  25   β”‚ 2023-03-26 16:18:53 [verbose]: at Veldrid.GraphicsDevice.CreateVulkan(GraphicsDeviceOptions options, SwapchainDescription swapchainDescription)
  26   β”‚ 2023-03-26 16:18:53 [verbose]: at osu.Framework.Graphics.Veldrid.VeldridRenderer.Initialise(IGraphicsSurface graphicsSurface)
  27   β”‚ 2023-03-26 16:18:53 [verbose]: at osu.Framework.Graphics.Rendering.Renderer.osu.Framework.Graphics.Rendering.IRenderer.Initialise(IGraphicsSurface graphicsSurface)
  28   β”‚ 2023-03-26 16:18:53 [verbose]: at osu.Framework.Platform.GameHost.SetupRendererAndWindow(IRenderer renderer, GraphicsSurfaceType surfaceType)
  29   β”‚ 2023-03-26 16:18:53 [important]: The selected renderer (Vulkan) failed to initialise. Renderer selection has been reverted to automatic.
  30   β”‚ 2023-03-26 16:18:53 [verbose]: πŸ–ΌοΈ Initialising "GL" renderer with "OpenGL" surface

Seems like there's a typo of some sort at line 12: liblibdl: cannot open shared object file: No such file or directory.

libdl.so.2 is present on my system:

image

Screenshots or videos

image

Version

2023.326.0-lazer

Logs

database.log
input.log
network.log
performance.log
performance-audio.log
performance-draw.log
performance-input.log
performance-update.log
runtime.log

@bdach
Copy link
Collaborator

bdach commented Mar 26, 2023

Relevant upstream issue: veldrid/veldrid#143 (comment)

We're aware that vulkan is not 100% there yet. The suggested workaround for now is to symlink the libdl.so.2 shared object as described in the aforementioned comment.

@adryzz
Copy link
Contributor

adryzz commented Mar 26, 2023

by the way, i opened an issue upstream about this a while ago, that got then closed and appeared to have been fixed by the last message, but apparently it did not

@bdach
Copy link
Collaborator

bdach commented Mar 26, 2023

Vulkan is going to be pulled as a choice on all platforms for now until it is stabilised (#22961).

@hitsounds
Copy link

Since glibc 2.24 the functions provided by libdl.so are instead provided by libc.so, however the vk library used by osu through veldrid still tries to pull in libdl.so.

A temporary solution is to ln -s /usr/lib/libc.so /usr/lib/libdl.so

@Skaldebane
Copy link

Hi! When could Vulkan be back?

@bdach
Copy link
Collaborator

bdach commented Feb 4, 2024

when it's ready, no ETA.

@smoogipoo
Copy link
Contributor

See: #27659 (reply in thread)

@Skaldebane
Copy link

Skaldebane commented Apr 13, 2024

@smoogipoo This doesn't work with the Flatpak version, any solution here?

From the logs, it seems to be looking for libdl.so at /app/bin/ (which is inside the Flatpak sandbox afaik).

Trying to symlink it from /lib/x86_64-linux-gnu/libdl.so.2 to /app/bin/ fails with "Read-only file system" (using flatpak enter <osu's instance>) because Flatpak works like that...

Is there anything that the osu! Flatpak itself can do here? Like maybe running this command by itself? Since it's a sandbox, I think this can be done without requiring root privileges (i.e just modifying the sandbox itself, not the whole system)? Or am I just imagining dumb ideas? πŸ˜…

@smoogipoo
Copy link
Contributor

Will be fixed by ppy/vk#1

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

No branches or pull requests

7 participants