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

google-chrome: fails to initialise vulkan implementation due to missing libvulkan.so.1 #346197

Closed
JohnRTitor opened this issue Oct 3, 2024 · 3 comments · Fixed by #346215
Closed
Labels
0.kind: bug Something is broken

Comments

@JohnRTitor
Copy link
Contributor

JohnRTitor commented Oct 3, 2024

Describe the bug

If Vulkan in Chrome is enabled via CLI args or chrome://flags, Chrome still fails to launch it's vulkan implementation, falling back to OpenGL.

Steps To Reproduce

google-chrome-stable --use-vulkan --enable-features=Vulkan

Or directly run:

NIXPKGS_ALLOW_UNFREE=1 nix run --impure nixpkgs#google-chrome  -- --use-vulkan --enable-features=Vulkan

Expected behavior

Vulkan is enabled, and working.

Screenshots

Output from chrome://gpu:
image

Additional context

Relevant logs from the terminal.

[216457:216457:1003/211719.770352:ERROR:vulkan_instance.cc(112)] Failed to load 'libvulkan.so.1': libvulkan.so.1: cannot open shared object file: No such file or directory
[216457:216457:1003/211719.770434:ERROR:gpu_init.cc(1209)] Failed to create and initialize Vulkan implementation.

Notify maintainers

CC @jnsgruk, Chrome Maintainer
CC @K900 Vulkan maintainer
CC @emilylange Chromium maintainer who helped me a lot with Chrome related packaging issues :)

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.11.1-cachyos, NixOS, 24.11 (Vicuna), 24.11.20241001.27e30d1`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Lix, like Nix) 2.91.0
System type: x86_64-linux
Additional system types: aarch64-linux, i686-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/masum/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/masum/.local/share/flatpak/exports/etc/xdg/nix/nix.conf:/var/lib/flatpak/exports/etc/xdg/nix/nix.conf:/home/masum/.nix-profile/etc/xdg/nix/nix.conf:/home/masum/.local/state/nix/profile/etc/xdg/nix/nix.conf:/home/masum/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/masum/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/cfl6rqw64ndbh2m0qapg410jf4xmycia-lix-2.91.0/share`
 - nixpkgs: `/nix/store/lryfc8mhk1czqsa421di2y5nzz5c3b8m-source
 

Add a 👍 reaction to issues you find important.

@JohnRTitor JohnRTitor added the 0.kind: bug Something is broken label Oct 3, 2024
@JohnRTitor
Copy link
Contributor Author

We do copy all the needed files from the deb package.

And libvulkan.so.1 exists in $out/share/google/chrome/.

@JohnRTitor
Copy link
Contributor Author

JohnRTitor commented Oct 3, 2024

Finally figured out the issue, bundled libvulkan.so.1 was not working properly.
Replacing it with vulkan loader's libvulkan worked like a charm! Did it like electron-bin. Commited part of #346215.

@jnsgruk
Copy link
Member

jnsgruk commented Oct 3, 2024

Nice work, thank you!

@JohnRTitor JohnRTitor linked a pull request Oct 3, 2024 that will close this issue
13 tasks
@jnsgruk jnsgruk closed this as completed in cd0a0da Oct 3, 2024
github-actions bot pushed a commit that referenced this issue Oct 3, 2024
When Chrome run by `google-chrome-stable --use-vulkan --enable-features=Vulkan`
without this, it fails to create vk instance giving the below log:

[216457:216457:1003/211719.770352:ERROR:vulkan_instance.cc(112)] Failed to load 'libvulkan.so.1': libvulkan.so.1: cannot open shared object file: No such file or directory
[216457:216457:1003/211719.770434:ERROR:gpu_init.cc(1209)] Failed to create and initialize Vulkan implementation.

Closes #346197

Signed-off-by: John Titor <[email protected]>
(cherry picked from commit cd0a0da)
presto8 pushed a commit to presto8/nixpkgs that referenced this issue Oct 9, 2024
When Chrome run by `google-chrome-stable --use-vulkan --enable-features=Vulkan`
without this, it fails to create vk instance giving the below log:

[216457:216457:1003/211719.770352:ERROR:vulkan_instance.cc(112)] Failed to load 'libvulkan.so.1': libvulkan.so.1: cannot open shared object file: No such file or directory
[216457:216457:1003/211719.770434:ERROR:gpu_init.cc(1209)] Failed to create and initialize Vulkan implementation.

Closes NixOS#346197

Signed-off-by: John Titor <[email protected]>
(cherry picked from commit cd0a0da)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants