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

clock example fails on FreeBSD: Error: GraphicsCreationFailed(GraphicsAdapterNotFound) #1499

Open
2 tasks done
yurivict opened this issue Oct 31, 2022 · 11 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@yurivict
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

$ cargo run --package clock
    Finished dev [unoptimized + debuginfo] target(s) in 0.26s
     Running `/tmp/iced/target/debug/clock`
Error: GraphicsCreationFailed(GraphicsAdapterNotFound)

What is the expected behavior?

n/a

Version

master

Operative System

Linux

Do you have any log output?

No response

@ids1024
Copy link
Contributor

ids1024 commented Oct 31, 2022

You could try building with the glow feature flag to use the glow backend instead of wgpu. (Though it has some limitations currently.)

Do you have a driver with that supports Vulkan?

@ids1024
Copy link
Contributor

ids1024 commented Oct 31, 2022

The clock example seem to run for me on FreeBSD without any changes or feature flags (AMD Renoir integrated graphics, drm-kmod/amdgpu installed, on either X or Wayland).

@yurivict
Copy link
Author

My GPU is NVidia. Do I have to install some package for this?

@ids1024
Copy link
Contributor

ids1024 commented Oct 31, 2022

I don't think it should require anything specific other than installing and enabling the drivers that would be needed for accelerated graphics in any other software: https://docs.freebsd.org/en/books/handbook/x11/#x-config-video-cards

glxinfo from the mesa-demos package and vulkaninfo from vulkan-tools will show what if any versions of OpenGL and Vulkan are available with currently installed drivers.

@yurivict
Copy link
Author

I have a functional OpenGL installation but the clock example fails with the error from my first message.

@ids1024
Copy link
Contributor

ids1024 commented Oct 31, 2022

What about Vulkan? Wgpu defaults to that, not sure if it should automatically fallback. WGPU_BACKEND=gl should get it to run with OpenGL instead.

@yurivict
Copy link
Author

Same error with WGPU_BACKEND=gl

@ids1024
Copy link
Contributor

ids1024 commented Oct 31, 2022

Hm, not sure why it's working on my FreeBSD install but not yours. I would look at glxinfo and vulkaninfo to see what OpenGL / OpenGL ES / Vulkan versions it advertises support for. (Though I don't think that should be a problem unless it's a fairly old GPU.)

cargo run -p clock --features iced/glow will make it run with the Glow backend instead of Wgpu which may work. (But will fail to compile for examples using images, which aren't currently supported by the Glow backend.)

@yurivict
Copy link
Author

cargo run -p clock --features iced/glow works.

@simonkampe
Copy link

Are your vulkan libraries located in a non-standard path?

I had the same problem for both glow and vulkan/wgpu in NixOS. I solved it by specifying the path to the libraries:

LD_LIBRARY_PATH="/run/opengl-driver/lib/:${pkgs.libGL}/lib/:${pkgs.libGLU}/lib/:${pkgs.vulkan-headers}:${pkgs.vulkan-loader}/lib/";

Of course you have to adapt the paths.

@jbeich
Copy link

jbeich commented Dec 21, 2022

My GPU is NVidia. Do I have to install some package for this?

According to unrelated bug you have GeForce GT 610 which is limited to legacy 390 series of NVIDIA driver. However, NVIDIA didn't include Vulkan driver in FreeBSD version back then:

$ pkg provides nvidia_icd
Name    : nvidia-secondary-driver-510.60.02_1
Comment : NVidia graphics card binary drivers for hardware OpenGL rendering on secondary device
Repo    : FreeBSD
Filename: usr/local/share/vulkan/icd.d/nvidia_icd.json

Name    : nvidia-driver-470-470.141.03
Comment : NVidia graphics card binary drivers for hardware OpenGL rendering
Repo    : FreeBSD
Filename: usr/local/share/vulkan/icd.d/nvidia_icd.json

Name    : nvidia-driver-510.60.02
Comment : NVidia graphics card binary drivers for hardware OpenGL rendering
Repo    : FreeBSD
Filename: usr/local/share/vulkan/icd.d/nvidia_icd.json

Name    : linux-nvidia-libs-470-470.141.03
Comment : NVidia graphics libraries and programs (Linux version)
Repo    : FreeBSD
Filename: compat/linux/etc/vulkan/icd.d/nvidia_icd.json

Name    : linux-nvidia-libs-390-390.154
Comment : NVidia graphics libraries and programs (Linux version)
Repo    : FreeBSD
Filename: compat/linux/etc/vulkan/icd.d/nvidia_icd.json

Name    : linux-nvidia-libs-510.60.02
Comment : NVidia graphics libraries and programs (Linux version)
Repo    : FreeBSD
Filename: compat/linux/etc/vulkan/icd.d/nvidia_icd.json

mesa-dri >= 21.3.7 package includes lavapipe, so WGPU_BACKEND=vulkan (default) should fall back to software rendering unless explicitly ignored due to performance/compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants