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

DaVinci Resolve Installation Issue: Crashes on Launch from nixpkgs-23.11, release-23.11, or unstable Branches. #278284

Closed
HiWhatName opened this issue Jan 2, 2024 · 11 comments

Comments

@HiWhatName
Copy link

HiWhatName commented Jan 2, 2024

Describe the bug

Upon installing DaVinci Resolve from any of the branches nixpkgs-23.11, release-23.11, or unstable the application crashes immediately after launch.

Steps To Reproduce

Follow these steps to observe the issue:

  1. Add one of the specified package repositories (nixpkgs-23.11, release-23.11, or unstable) to your configuration file (flake, config, etc.).
  2. Install the davinci-resolve package into your user's package list.
  3. Launch DaVinci Resolve by executing the command davinci-resolve in the terminal.

Expected behavior

The expected behavior is for davinci-resolve to launch without any encountered issues.

Screenshots

Launching via CLI:
image

Additional context

My system's GPU stack comprises an RX 6700 XT with ROCm. For driver files and packages, please refer to Driver Files and Packages.

Additionally, logs for DaVinci Resolve are available in the user directory under ~/.local/share/DaVinciResolve/logs/.

ResolveDebug.txt
ResolveDebug_C1.txt

As a potential workaround, the documentation suggests running the application as the root user.

Ownership of specific directories associated with the DaVinci Resolve installation indicates root user ownership:

ls -al /nix/store/ | grep "davinci-resolve-18.6.4"
dr-xr-xr-x    4 root root        4096 Jan  1  1970 2ys9415bn58k09mzifca5970vll8zv9k-davinci-resolve-18.6.4-fhs
dr-xr-xr-x   10 root root        4096 Jan  1  1970 7lmlam4k902c1pgrn55h33jh1pkh5x1i-davinci-resolve-18.6.4-usr-target
dr-xr-xr-x   32 root root        4096 Jan  1  1970 885m10s69khmp4j4frn9cll931vrjbw5-davinci-resolve-18.6.4
-r--r--r--    2 root root        3213 Jan  1  1970 akcfwrgsy4fjpmlgshhsh5f6ppn3vkmz-davinci-resolve-18.6.4.drv
-r-xr-xr-x    2 root root        4421 Jan  1  1970 c9mnp756diyja64nxxx3ghaa37zxrvfr-davinci-resolve-18.6.4-bwrap
-r--r--r--    2 root root       20532 Jan  1  1970 ccn2l3aimj1xpxycbakj9kk39zi5v6a3-davinci-resolve-18.6.4-usr-target.drv
-r--r--r--    2 root root        2422 Jan  1  1970 dvdvw7v9ky77skd8319v6pjw49xdvvx1-davinci-resolve-18.6.4-init.drv
dr-xr-xr-x    3 root root        4096 Jan  1  1970 la3qxi0sjbwc2m5pmdb68n0l7pv9nxf5-davinci-resolve-18.6.4-chrootenv-etc
-r-xr-xr-x    2 root root         471 Jan  1  1970 px4d8lrbb7v9vahbkmpzkjgxjhmf2r48-davinci-resolve-18.6.4-init
dr-xr-xr-x    3 root root        4096 Jan  1  1970 q65k5vbpcgzkds144hn09rsqn0bvxq5j-davinci-resolve-18.6.4
-r--r--r--    2 root root        2761 Jan  1  1970 s6gc9350xc1qv72vq19q5hh1crd9m9if-davinci-resolve-18.6.4-fhs.drv
-r--r--r--    2 root root        1778 Jan  1  1970 sa7vkwfb0f0cvhzrc7vvfj2jrwj0a7h8-davinci-resolve-18.6.4-chrootenv-etc.drv
-r--r--r--    2 root root        6937 Jan  1  1970 yk52s9mfpv3j0sl84wmapvd45x0zidaq-davinci-resolve-18.6.4-bwrap.drv
-r--r--r--    2 root root        1708 Jan  1  1970 zf7a2izm2phc9ishz4ryrxhfnp021rr8-davinci-resolve-18.6.4.drv

Notify maintainers

Notification sent to: @amarshall (Latest commit)
Maintainer from search.nixos.org: "Joshua Campbell" (No GitHub acc. associated?)

Metadata

[hwn@Nexus:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.8, NixOS, 23.11 (Tapir), 23.11.20231231.32f6357`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos-23.05"`
 - channels(hwn): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Related Issues & PRs

  • PR #255577 Note: Utilizing `env NIXPKGS_ALLOW_UNFREE=1 nix run --impure 'github:NixOS/nixpkgs?ref=pull/255577/head#davinci-resolve-studio' won't resolve the issue either.

  • The directory ~/.local/share/DaVinciResolve/license mentioned in the pull-request above doesn't exist on my system. Even creating it manually doesn't alleviate the error.

  • Discussions on the matrix channel highlighted similar behavior across different users, remaining unresolved despite attempted solutions.

@amarshall
Copy link
Member

Seems likely given the stacktrace that it is a GPU driver compatibility issue, probably specific to AMD Radeon. I use Nvidia with Resolve.

@HiWhatName
Copy link
Author

HiWhatName commented Jan 2, 2024

It used to work nearly perfectly using the HIP stack back on Arch, tho that one got deprecated in the switch from 23.05 -> 23.11.

Here's the commit basically showing the difference in both versions (in my configuration).

Any way to get the old stack back (in an updated form), or at least get the new one to work with davinci-resolve?

@nicomem
Copy link
Contributor

nicomem commented Apr 3, 2024

I also have an AMD GPU (RX 6950 XT), but on nixos-unstable the davinci-resolve package does not crash.

I have set-up OpenCL GPU acceleration as indicated in the NixOS Manual by adding this to my configuration:

{
  hardware.opengl.extraPackages = [
    rocmPackages.clr.icd
  ];
}

Without this, davinci-resolve is launching, but indicates that it does not find any GPU it can use.
With this, davinci-resolve is launching with no crash and my GPU is showing in the Memory and GPU settings tab.

@AkechiShiro
Copy link
Contributor

Shouldn't this option be added to the package ? On my side, it did not crash but just showing no GPU it can use unless I had your workaround @nicomem

@nicomem
Copy link
Contributor

nicomem commented Apr 14, 2024

@AkechiShiro I think that this is more a NixOS issue than a nixpkgs one:

The package did not need to be modified to detect the GPU, it was the modification of the NixOS configuration hardware.opengl.extraPackages, to add packages to the OpenGL drivers, which allowed applications able to detect the GPU at runtime.

For other Linux distributions, where the Nix package is installed, I think that it should currently be able to detect the GPU (assuming that the drivers are properly configured on the distribution).

With a simple search in Github, there seems to be packages built differently depending on the GPU backend (e.g: spla, vllm), but they check the backend to change how the package is built.

@AkechiShiro
Copy link
Contributor

In that case @nicomem there should be fixes that should land in nixpkgs-hardware to detect AMD GPU and automatically add the rocm package so that the runtime be available ?

@nicomem
Copy link
Contributor

nicomem commented Apr 14, 2024

@AkechiShiro If you are talking about nixos-hardware, it has already been added (see the amd/default.nix file)

@AkechiShiro
Copy link
Contributor

AkechiShiro commented Apr 14, 2024

You still need to add in your configuration that you want to enable the opencl runtime for AMD :

lib.mkIf config.hardware.amdgpu.opencl

Else davinci-resolve will not work, I'm just wondering if it's possible to fix this issue either in the package of davinci-resolve since this issue is about this no ?

@nicomem else if it's just about configuring the runtime then this issue should be close IMO

@nicomem
Copy link
Contributor

nicomem commented Apr 14, 2024

options.hardware.amdgpu.opencl is defined and set with default = true at the top of the file, so it should work by default just by using the appropriate nixos-hardware profile.

In my opinion, the issue is only a runtime configuration one (even if something was done to the package, I think the driver would still need to be properly configured for it to work), so I also agree that this issue could be closed.

@AkechiShiro
Copy link
Contributor

@nicomem Weird as I had to add the rocm package in my hardware configuration (extraPackages field, else davinci-resolve would not work) despite being on an AMD only machine on NixOS 23-11 stable.

The hardware profile are automatically activated ? Or are they detected at installation time ? when running the kinda of nixos-generate-configuration command?

@nicomem
Copy link
Contributor

nicomem commented Apr 14, 2024

@AkechiShiro I do not think nixos-generate-config is able to detect and set the correct nixos-hardware profile (at least I did not see it documented in nixos-hardware or elsewhere).
As per the nixos-hardware README, you need to add the channel (or input for flakes), and import the correct profile.

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

4 participants