Davinci Resolve in a Ubuntu Jail

I have managed to get Davinci Resolve working in an Ubuntu jail
previously i installed resolve in a Ubuntu chroot

The gpu and cuda are working,
and the audio is rooted from jail to the host using a pulseaudio socket

rather than displaying resolve in a xwayland rootfull window with the DISPLAY set to :1 in the chroot
which limited resolve to one window

running resolve in the jail displays the window using DISPLAY :0 on the host without using an Xwayland window
so i can actually see both displays in resolve and enable dual displays

i run resolve from inside the jail
xrandr in the jail shows both displays

however the issue is when i activate dual displays in davinci resolve it does create another window
but i cant drag that window to another display it moves both the windows at once

so you end up with 2 windows that behave as one which you can't split and move to another display
im wondering if there is something else i need to enable in the jail so the jail can display 2 windows, one per display

resolve.png


Code:
/etc/jail.conf

jail.conf

Code:
## startup/logging
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.consolelog = "/var/log/jail_console_${name}.log";

Code:
/etc/jail.conf.d/ubuntu

Code:
ubuntu {
    # hostname/path
    host.hostname = "${name}";
    path = "/usr/local/jails/linux/${name}";

    # permissions
    allow.raw_sockets;
    exec.clean;
    mount.devfs;
    allow.sysvipc;

    # permissions
    devfs_ruleset=7;

    # network
    ip4.addr="lo1|10.10.0.5/24";

    # mount
    persist;
    mount.fstab="/usr/local/jails/linux/ubuntu/etc/fstab";
}

Code:
/etc/devfs.rules

devfs.rules
i unhide the drm and nvidia paths

Code:
[ubuntu_jail=7]
add include $devfsrules_hide_all
add include $devfsrules_unhide_basic
add include $devfsrules_unhide_login
add path 'mixer*' unhide
add path 'dsp*' unhide
add path 'dri*' unhide
add path 'drm*' unhide
add path 'nvidia*' unhide
add path 'speaker*' unhide
 
managed to get 2 displays working with resolve in an ubuntu jail

display set to :0.0 in the jail

but im having an issue like when i change tabs in the resolve ui
which causes the window on the second display to move back to the first display

maybe an issue with the window manager im using wayfire
have to see there are some rules i can apply to resolve windows

or maybe there are some tweaks needed somewhere else

dual-display-resolve.png
 
Davinci Resolve in an Ubuntu Jail
opened using a desktop entry on Freebsd with your application launcher

the desktop entry runs a script on Freebsd that starts pulseaudio
then uses doas and jexec to run a script in the jail that start resolve

gpu and cuda working and audio using a pulseaudio socket
using defs.rules we can unhide the gpu from the host and make it accessible in the jail

dual displays for resolve using the host to display the windows using DISPLAY=0.0

instead of using an Xwayland window as i was running in a chroot which was limited to one display,
that you manually had to close after exiting resolve

ill set up another git repo called something like
davinci-resolve-freebsd-jail

right up the instructions, include all the needed files
and do a video


freebsd resolve script

Code:
#!/bin/sh

# resolve

# start pulseaudio
pulseaudio --start --daemonize 2>/dev/null

# doas jexec into the ubuntu jail and run the wrapper script to start resolve
doas jexec ubuntu /usr/local/bin/wrapper-resolve -u "${USER}"

wrapper-resolve script in the jail

Code:
#!/bin/bash
su "${username}" -c '/opt/resolve/bin/resolve' 2>/dev/null
 
Back
Top