pobthebuilder / resolve-flatpak

Flatpak packaging for Blackmagicdesign DaVinci Resolve
MIT License
129 stars 21 forks source link

Playback isn't working, and no thumbnails #5

Closed poperigby closed 1 year ago

poperigby commented 1 year ago

I installed the studio version of Davinci Resolve, and I'm running into some issues. When I try to play any file in the editor, it just won't. The scrubber will be stuck at the first part of the clip. Clips also don't have any thumbnails. I'm getting this in the Davinci Resolve log:

0x7ff4a2bd9640 | UI.GLInterop         | ERROR | 2023-03-28 10:04:03,498 | MainPlayer: Failed to create handle, not initialized.

I figured I would report here, because it might be an issue with the packaging.

pobthebuilder commented 1 year ago

tested with the latest version and can't replicate this with Studio on Silverblue. did you get this working?

pobthebuilder commented 1 year ago

this doesn't replicate on my nvidia desktop.

replicated it on my amd machine. looks like this might be tied to opencl/opengl support using mesa drivers in flatpak; similar to issues seen in darktable, here: https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/issues/1181

looks like we'd need amdgpu-pro driver opengl/opencl support in flatpak, but that doesn't seem to exist? there is some work on rocm ongoing here: https://github.com/orowith2os/rocm-flatpak

i'm not really familiar with the amdgpu stack. i'll have a play around and see what i can do but we might be SoL on AMD cards?

pobthebuilder commented 1 year ago

https://github.com/RadeonOpenCompute/ROCm/issues/1397

UnisTorvalds commented 1 year ago

SoL is correct for OpenCL on AMD, at least until this Rusticl patch merges into Mesa, hopefully for the 23.3 release window.

I've messed with this issue for a long time. ROCm is dodgy around OpenCL image support (it's intended for machine learning). Installing only select OpenCL components from AMDGPU-PRO and/or ROCm through a script like this one (in order to avoid the entire proprietary stack) will get Darktable, LuxMark, and other OpenCL applications working on AMD, but not DaVinci Resolve as it looks for certain (OpenGL?) extensions which seem to be only present in the AMDGPU-PRO full driver stack. However, AMDGPU-PRO itself is not a fool-proof solution because not all releases (e.g. the latest) support all cards (e.g. Vega), and installation is highly kernel-dependent.

It's been a bit of a headache for my particular setup here. But I have high hopes for the Rusticl merge into Mesa. Initial testing looks very promising. You may wish to sit tight until the above MR merges. Then, simply including the Mesa library in the flatpak should do the trick for universal AMD support.

poperigby commented 1 year ago

Yes, forgot to mention that it's an AMD machine.

pobthebuilder commented 1 year ago

Not yet tested, but I created a ROCm Flatpak that should work to give us OpenCL with Flatpak on AMD: https://github.com/pobthebuilder/rocm-flatpak For you you will have to build it yourself.

pobthebuilder commented 1 year ago

closing this. the issue is that the default freedesktop sdk mesa clover opencl doesn't work well for amd and doesn't yet provide rusticl opencl. however, i built a rocm flatpak and this works fine on 3 different amd devices (desktop / laptop) using the ROCm OpenCL flatpak package i provided here: https://github.com/pobthebuilder/rocm-flatpak you will have to build it yourself which requires a big machine.