nix-community / nixGL

A wrapper tool for nix OpenGL application [maintainer=@guibou]
628 stars 76 forks source link

Failed on Nvidia 3070 Laptop #146

Closed etherswangel closed 4 months ago

etherswangel commented 8 months ago

I'm on non-nixOS laptop, nixGL doesn't work for me. Please tell what else I could provide to help

NVIDIA-SMI 535.113.01
Driver Version: 535.113.01
CUDA Version: 12.2

This is the output of glxinfo outside of nix environment:

~> glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: AMD (0x1002)
    Device: AMD Radeon Graphics (renoir, LLVM 15.0.7, DRM 3.54, 6.5.7_1) (0x1638)
    Version: 23.1.3
    Accelerated: yes
    Video memory: 512MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.6
    Max compat profile version: 4.6
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
    VBO free memory - total: 76 MB, largest block: 76 MB
    VBO free aux. memory - total: 7458 MB, largest block: 7458 MB
    Texture free memory - total: 76 MB, largest block: 76 MB
    Texture free aux. memory - total: 7458 MB, largest block: 7458 MB
    Renderbuffer free memory - total: 76 MB, largest block: 76 MB
    Renderbuffer free aux. memory - total: 7458 MB, largest block: 7458 MB
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 512 MB
    Total available memory: 8218 MB
    Currently available dedicated video memory: 76 MB
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon Graphics (renoir, LLVM 15.0.7, DRM 3.54, 6.5.7_1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.1.3
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.1.3
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.1.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

And here's the output of Test.hs:

~> ./Test.hs 
Running tests for nixGL
It can take a while, this will build and test all drivers in the background

Sanity
  OpenGL
    fails with unwrapped glxinfo64 [ ]Error: couldn't find RGB GLX visual or fbconfig
    fails with unwrapped glxinfo64 [v]
    fails with unwrapped glxinfo32 [ ]Error: couldn't find RGB GLX visual or fbconfig
    fails with unwrapped glxinfo32 [v]
  Vulkan
    fails with unwrapped vulkaninfo64 [ ]ERROR: [Loader Message] Code 0 : libGLX_nvidia.so.0: cannot open shared object file: No such file or directory
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.
/build/source/vulkaninfo/vulkaninfo.c:923: failed with VK_ERROR_INCOMPATIBLE_DRIVER
    fails with unwrapped vulkaninfo64 [v]
    fails with unwrapped vulkaninfo32 [ ]ERROR: [Loader Message] Code 0 : libGLX_nvidia.so.0: cannot open shared object file: No such file or directory
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.
/build/source/vulkaninfo/vulkaninfo.c:923: failed with VK_ERROR_INCOMPATIBLE_DRIVER
    fails with unwrapped vulkaninfo32 [v]
NixGL
  Mesa
    OpenGL
      32 bits [ ]error:
       … while calling the 'derivationStrict' builtin

         at //builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'nixGLIntel'
         whose name attribute is located at /nix/store/s2jr64p2ajzfsfikfblyz1hh9b4y3yp6-source/pkgs/build-support/trivial-builders.nix:7:14

       … while evaluating attribute 'text' of derivation 'nixGLIntel'

         at /nix/store/s2jr64p2ajzfsfikfblyz1hh9b4y3yp6-source/pkgs/build-support/trivial-builders.nix:61:16:

           60|     runCommand name
           61|       { inherit text executable;
             |                ^
           62|         passAsFile = [ "text" ];

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: Package ‘intel-gmmlib-19.2.3’ in /nix/store/s2jr64p2ajzfsfikfblyz1hh9b4y3yp6-source/pkgs/development/libraries/intel-gmmlib/default.nix:21 is not supported on ‘i686-linux’, refusing to evaluate.

       a) For `nixos-rebuild` you can set
         { nixpkgs.config.allowUnsupportedSystem = true; }
       in configuration.nix to override this.

       b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
         { allowUnsupportedSystem = true; }
       to ~/.config/nixpkgs/config.nix.
      32 bits [x]
      64 bits [-]
        # PENDING: exception in beforeAll-hook (see previous failure)
    Vulkan
      32 bits [ ]ERROR: [Loader Message] Code 0 : /nix/store/2k5spfqknb2z6d332wr5833d5cfw3jn4-mesa-19.1.5-drivers/lib/libvulkan_intel.so: wrong ELF class: ELFCLASS64
ERROR: [Loader Message] Code 0 : /nix/store/2k5spfqknb2z6d332wr5833d5cfw3jn4-mesa-19.1.5-drivers/lib/libvulkan_radeon.so: wrong ELF class: ELFCLASS64
amdgpu: Invalid PCI ID.
/build/source/vulkaninfo/vulkaninfo.c:5884: failed with VK_ERROR_INITIALIZATION_FAILED
      32 bits [x]
      64 bits [ ]ERROR: [Loader Message] Code 0 : /nix/store/vxr6v1wpf60c9ayrpqc3m7qg58m40biq-mesa-19.1.5-drivers/lib/libvulkan_intel.so: wrong ELF class: ELFCLASS32
ERROR: [Loader Message] Code 0 : /nix/store/vxr6v1wpf60c9ayrpqc3m7qg58m40biq-mesa-19.1.5-drivers/lib/libvulkan_radeon.so: wrong ELF class: ELFCLASS32
amdgpu: Invalid PCI ID.
/build/source/vulkaninfo/vulkaninfo.c:5884: failed with VK_ERROR_INITIALIZATION_FAILED
      64 bits [x]
  Nvidia - Bumblebee
    OpenGL
      32 bits [ ]error: attribute 'nixGLNvidiaBumblebee' in selection path 'nixGLNvidiaBumblebee' not found
      32 bits [x]
      64 bits [-]
        # PENDING: exception in beforeAll-hook (see previous failure)
    Vulkan
      32 bits [-]
        # PENDING: No reason given
      64 bits [-]
        # PENDING: No reason given
  Nvidia
    OpenGL
      32 bits [ ]error: attribute 'nixGLNvidia' in selection path 'nixGLNvidia' not found
      32 bits [x]
      64 bits [-]
        # PENDING: exception in beforeAll-hook (see previous failure)
    Vulkan
      32 bits [ ]error: attribute 'nixVulkanNvidia' in selection path 'nixVulkanNvidia' not found
      32 bits [x]
      64 bits [-]
        # PENDING: exception in beforeAll-hook (see previous failure)

Failures:

  Test.hs:35:5: 
  1) NixGL.Mesa.OpenGL 32 bits
       uncaught exception: IOException of type OtherError
       readCreateProcess: nix-build "./" "-A" "nixGLIntel" "-I" "nixpkgs=channel:nixos-19.09-small" (exit 1): failed

  To rerun use: --match "/NixGL/Mesa/OpenGL/32 bits/"

  Test.hs:53:5: 
  2) NixGL.Mesa.Vulkan 32 bits
       uncaught exception: IOException of type OtherError
       readCreateProcess: /nix/store/5b7hxvl6cvlg5cpkg570qa40vg0hm62d-nixVulkanIntel/bin/nixVulkanIntel "/nix/store/v084dhiad8b8lqxiy02ma2025nxmavcd-vulkan-tools-1.1.114.0/bin/vulkaninfo" (exit 255): failed

  To rerun use: --match "/NixGL/Mesa/Vulkan/32 bits/"

  Test.hs:56:5: 
  3) NixGL.Mesa.Vulkan 64 bits
       uncaught exception: IOException of type OtherError
       readCreateProcess: /nix/store/5b7hxvl6cvlg5cpkg570qa40vg0hm62d-nixVulkanIntel/bin/nixVulkanIntel "/nix/store/7rggmjdqc9p7y0y0vp2x4byx59qfmnpw-vulkan-tools-1.1.114.0/bin/vulkaninfo" (exit 255): failed

  To rerun use: --match "/NixGL/Mesa/Vulkan/64 bits/"

  Test.hs:35:5: 
  4) NixGL, Nvidia - Bumblebee, OpenGL, 32 bits
       uncaught exception: IOException of type OtherError
       readCreateProcess: nix-build "./" "-A" "nixGLNvidiaBumblebee" "-I" "nixpkgs=channel:nixos-19.09-small" (exit 1): failed

  To rerun use: --match "/NixGL/Nvidia - Bumblebee/OpenGL/32 bits/"

  Test.hs:35:5: 
  5) NixGL.Nvidia.OpenGL 32 bits
       uncaught exception: IOException of type OtherError
       readCreateProcess: nix-build "./" "-A" "nixGLNvidia" "-I" "nixpkgs=channel:nixos-19.09-small" (exit 1): failed

  To rerun use: --match "/NixGL/Nvidia/OpenGL/32 bits/"

  Test.hs:53:5: 
  6) NixGL.Nvidia.Vulkan 32 bits
       uncaught exception: IOException of type OtherError
       readCreateProcess: nix-build "./" "-A" "nixVulkanNvidia" "-I" "nixpkgs=channel:nixos-19.09-small" (exit 1): failed

  To rerun use: --match "/NixGL/Nvidia/Vulkan/32 bits/"

Randomized with seed 1962889547

Finished in 1.5984 seconds
16 examples, 6 failures, 6 pending