zelikos / davincibox

Container for DaVinci Resolve installation and runtime dependencies on Linux
Apache License 2.0
207 stars 8 forks source link

davincibox workarounds aren't applied on distros without systemd #131

Open svyatoclav opened 1 week ago

svyatoclav commented 1 week ago

Describe the bug

I'm on Artix Linux wayland desktop with distrobox on podman (also tested docker) with GTX 1080 Ti, latest 560.35 NVIDIA drivers both on host and Fedora 40 container and manually installed last build of davincibox:latest --nvidia -n davincibox (2024-10-19) + DaVinci Resolve Studio 18.1.2

Errors Your GPU memory is full. Try reducing the timeline resolution or the number of correctors. and The GPU failed to perform image processing because of an error. Error code: 999. only fixed with env __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia from https://github.com/zelikos/davincibox/issues/40 Also need to export QT_QPA_PLATFORM=xcb for DaVinci to actually start.

My exec now looks like: Exec=distrobox-enter -n davincibox -- bash -cl "export __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia QT_QPA_PLATFORM=xcb && /opt/resolve/bin/resolve %u"

Installation method used

To Reproduce

Steps to reproduce the behavior:

  1. Follow manual install steps for Nvidia podman distrobox install
  2. Launch Resolve and get errors every 5 second of work
  3. Change exec command to add env variables (or manually import in container terminal)
  4. Get fix

Screenshots

Below

System information (please complete the following)

Additional context

First I installed Resolve with Distrobox Fedora 37 a year ago and everything was fine (not with Davincibox). Now I needed to open it again and actually spent all day trying to do that lol. Fortunately I found this awesome project that helped me to reinstall Resolve, thanks! <3

And btw... There is also very weird color shift effect appeared in (every) Distrobox Fedora container in programs interfaces (not only Resolve). Anyone knows why and how to fix? Thanks. 20241018-220038_swappy 20241019-010154_swappy 20241018-214430_swappy

zelikos commented 1 week ago
  1. Since you needed the arguments from #40, it sounds like this was on a laptop? If so, the first part of your issue would be a duplicate of #40.
  2. It's strange that you needed to explicitly set QT_QPA_PLATFORM=xcb too; that should already be handled by davincibox's workarounds, since we had this problem back in #59. My initial guess is that it's something odd happening with Hyprland, but, I'll have to investigate
svyatoclav commented 1 week ago
  1. No. That's the point: I use desktop PC with GTX 1080 Ti from MSI (and 3 monitors connected to it) and i7-7700K. And I fixed these errors exactly with export __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia inside the container. I think there is something with 560+ drivers tho.
  2. Year ago I also needed to export QT_QPA_PLATFORM=xcb for my first install to work (not davincibox). Perhaps my system configs are weird too haha or it is really Hyprland problem. Or maybe it is because of the missing systemd stuff idk.

I would like to investigate problems too so what should I do to help you fix this?

zelikos commented 1 week ago

Or maybe it is because of the missing systemd stuff idk.

Ah. I hadn't heard of Artix before this report, so I didn't know it's a non-systemd distro. It's very possible that's related to this issue.

I found this discussion on the podman repo: https://github.com/containers/podman/discussions/20416. It sounds like some parts of podman don't work properly without systemd present, nor is podman thoroughly tested on systems that lack systemd.

It seems like whatever's going wrong with podman on Artix is also resulting in davincibox's workarounds being ignored; any fix would require changing how davincibox's workarounds are applied (again), which wouldn't be a trivial change. Doing so isn't a high priority for an edge case like this, but the current implementation isn't perfect and is something I want to improve in the future anyway

For now, though, it sounds like your workaround is working fine for you?

svyatoclav commented 1 week ago

Sure, understandable.

For now, though, it sounds like your workaround is working fine for you?

Yes, I think I'm fine now. I'll test and if I find strange behavior -- I will post here again.

And yes, no matter docker or podman -- it happens in both of them. And so do the fixes.