Solved linuxulator switching to non root user in the chroot to run davinci resolve

ubuntu jammy doesnt have a wheel group and everything in / is owned by root
i checked on my laptop running ubuntu manic and its the same

list root on ubuntu in the chroot

Code:
ls -l /

output

Code:
lrwxr-xr-x  1 root root   7 Feb 10 20:59 bin -> usr/bin
drwxr-xr-x  2 root root   2 Apr 18  2022 boot
dr-xr-xr-x 12 root root 512 Feb 11 13:25 dev
drwxr-xr-x 68 root root 136 Feb 11 14:11 etc
drwxr-xr-x  3 root root   3 Feb  5 18:57 home
lrwxr-xr-x  1 root root   7 Feb 10 20:59 lib -> usr/lib
lrwxr-xr-x  1 root root   9 Feb 10 20:59 lib32 -> usr/lib32
lrwxr-xr-x  1 root root   9 Feb 10 20:59 lib64 -> usr/lib64
lrwxr-xr-x  1 root root  10 Feb 10 20:59 libx32 -> usr/libx32
drwxr-xr-x  2 root root   2 Feb 10 20:59 media
drwxr-xr-x  2 root root   2 Feb 10 20:59 mnt
drwxr-xr-x  2 root root   2 Feb 10 20:59 opt
dr-xr-xr-x  1 root root   0 Feb 11 14:15 proc
drwx------  2 root root   6 Feb 11 14:02 root
drwxr-xr-x  4 root root   5 Feb 10 22:17 run
lrwxr-xr-x  1 root root   8 Feb 10 20:59 sbin -> usr/sbin
drwxr-xr-x  2 root root   2 Feb 10 20:59 srv
dr-xr-xr-x  1 root root   0 Feb 11 14:15 sys
drwxrwxrwt 10 root root  13 Feb 11 13:25 tmp
drwxr-xr-x 14 root root  14 Feb 10 20:59 usr
drwxr-xr-x 11 root root  13 Feb 10 20:59 var
r

list root on freebsd

Code:
ls -l /

output

Code:
-r--r--r--   1 root wheel 6109 10 Nov 08:49 COPYRIGHT
drwxr-xr-x   2 root wheel   49 23 Dec 19:32 bin
drwxr-xr-x  15 root wheel   72 11 Feb 02:33 boot
drwxr-xr-x   4 root wheel    4 10 Feb 20:53 compat
dr-xr-xr-x  12 root wheel  512 11 Feb 12:54 dev
-rw-------   1 root wheel 4096 11 Feb 12:54 entropy
drwxr-xr-x  30 root wheel  115 11 Feb 13:24 etc
drwxr-xr-x   3 root wheel    3  5 Feb 18:57 home
drwxr-xr-x   4 root wheel   78 15 Dec 21:49 lib
drwxr-xr-x   3 root wheel    5 15 Dec 21:49 libexec
drwxr-xr-x   2 root wheel    2 10 Nov 07:48 media
drwxr-xr-x   3 root wheel    3  1 Dec 21:55 mnt
drwxr-xr-x   2 root wheel    2 10 Nov 07:48 net
dr-xr-xr-x   1 root wheel    0 11 Feb 14:14 proc
drwxr-xr-x   2 root wheel  150 15 Dec 21:49 rescue
drwxr-x---   2 root wheel    9  8 Feb 12:52 root
drwxr-xr-x   2 root wheel  150 15 Dec 21:49 sbin
lrwxr-xr-x   1 root wheel   11 10 Nov 07:48 sys -> usr/src/sys
drwxrwxrwt  10 root wheel   13 11 Feb 13:25 tmp
drwxr-xr-x  15 root wheel   15 10 Nov 08:55 usr
drwxr-xr-x  26 root wheel   26 11 Feb 12:54 var
drwxr-xr-x   3 root wheel    3  6 Feb 21:31 zroot

notice the difference

i have changed all the 700 permission in the chroot to 755
but because there is no wheel group i get this error when running ls as non root user

Code:
ls: error while loading shared libraries: libselinux.so.1: cannot open shared object file: No such file or directory

so need to add my user to some other groups in the chroot

in the chroot addedd myself to the same groups as on my laptop running ubuntu manic

Code:
usermod -a -G adm djwilcox
usermod -a -G cdrom djwilcox
usermod -a -G sudo djwilcox
usermod -a -G dip djwilcox
usermod -a -G plugdev djwilcox
usermod -a -G users djwilcox

still get the same error when running ls

another permissions issue

Code:
-rw-------+ 1 root root 166280 Mar 17  2022 /lib/x86_64-linux-gnu/libselinux.so.1

should have read for group and other
 
all the libraries on jammy have 600 permissions so non root user dont have access
changing the permissions breaks the chroot

i have installed arch linux with the linuxulator and have the nvidia drivers and cuda installed

but when i run

Code:
nvidia-smi

i get this error

Failed to initialize NVML: GPU access blocked by the operating system

i wonder if its because the group uid dont match
or do i need to add a devfs rule to allow access to the gpu from the chroot

arch linux /etc/group

Code:
root:x:0:root
sys:x:3:bin
mem:x:8:
ftp:x:11:
mail:x:12:
log:x:19:
smmsp:x:25:
proc:x:26:
games:x:50:
lock:x:54:
network:x:90:
floppy:x:94:
scanner:x:96:
power:x:98:
nobody:x:65534:
adm:x:999:daemon
wheel:x:998:djwilcox
utmp:x:997:
audio:x:996:djwilcox
disk:x:995:
input:x:994:djwilcox
kmem:x:993:
kvm:x:992:
lp:x:991:
optical:x:990:
render:x:989:
sgx:x:988:
storage:x:987:
tty:x:5:
uucp:x:986:
video:x:985:djwilcox
users:x:984:
groups:x:983:
systemd-journal:x:982:
rfkill:x:981:
bin:x:1:daemon
daemon:x:2:bin
http:x:33:
dbus:x:81:
systemd-coredump:x:980:
systemd-network:x:979:
systemd-oom:x:978:
systemd-journal-remote:x:977:
systemd-resolve:x:976:
systemd-timesync:x:975:
tss:x:974:
uuidd:x:68:
djwilcox:x:1000:

freebsd /etc/group

Code:
wheel:*:0:root,djwilcox
daemon:*:1:
kmem:*:2:
sys:*:3:
tty:*:4:
operator:*:5:root,djwilcox
mail:*:6:
bin:*:7:
news:*:8:
man:*:9:
games:*:13:
ftp:*:14:
staff:*:20:
sshd:*:22:
smmsp:*:25:
mailnull:*:26:
guest:*:31:
video:*:44:djwilcox
realtime:*:47:djwilcox
idletime:*:48:
bind:*:53:
unbound:*:59:
proxy:*:62:
authpf:*:63:
_pflogd:*:64:
_dhcp:*:65:
uucp:*:66:
dialer:*:68:
network:*:69:
audit:*:77:
www:*:80:
u2f:*:116:
ntpd:*:123:
_ypldap:*:160:
hast:*:845:
tests:*:977:
 
It seems that you don't read my suggestions,because at the end,you finish doing in a totally different way and you lose a lot of time reinventing the wheel. Check message #50.
 
i installed focal upgraded to jammy and all the permissions got changed
so exactly the same issue as installing jammy

lots of the binaries on jammy have 700 permissions
and the libraries have 600 permission

you can change the permissions from 700 to 755
but then you get issues with libraries not loading because of the 600 permissions

changing the 600 permissions on the libraries to 644 breaks the chroot

if you cant run as non root user there is no point trying to install the nvidia drivers
because you would have to run resolve as root which is a really bad idea
 
i have been through all the permutations trying to get ubuntu to work but cant

so ive installed arch instead
just need to figure out whats causing this error running nvidia-smi

Failed to initialize NVML: GPU access blocked by the operating system

is it a group uid issue, as i mentioned above
or do i need some more packages installed on arch
 
I'm not sure that you did what I have suggested on post #50. BTW,if that does not work,you could also try a new installation of Ubuntu,let's say 23.10 from scratch.
 
post 50
"I have upgraded ubuntu 22.04 to 23.04 and 23.04 to 23.10 because 22.04 became too old."

as i said upgrading to jammy causes the permissions errors
 
id on freebsd

Code:
uid=1001(djwilcox) gid=1001(djwilcox) groups=1001(djwilcox),0(wheel),5(operator),44(video),47(realtime)

id on arch in chroot

Code:
uid=1000(djwilcox) gid=1000(djwilcox) groups=1000(djwilcox),985(video),994(input),996(audio),998(wheel)

from this page


"You will probably want to add users and groups with UIDs/GIDs matching the ones on the host system."

have to play around with the group uid/gids in the chroot
 
changed uid/gid for my user in the chroot so they match the uid/gid on the freebsd

Code:
uid=1001(djwilcox) gid=1001(djwilcox) groups=1001(djwilcox)

still get the permission error for the gpu

time for more detective work

installed paru aur helper in the chroot yay failed to build


Code:
sudo pacman -S --needed base-devel
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si

user paru to install davinci resolve

Code:
paru -S davinci-resolve

still have to come back to the gpu issue
 
davinci resolve from the aur fails to build

Version mismatch
davinci-resolve-18.6.4-1: parsing pkg list...
error: can't find package name in packagelist: Version mismatch
error: packages failed to build: davinci-resolve-18.6.4-1

have to look into the error

looks like the aur package for resolve has been marked out of date


Flagged out-of-date (2024-02-07)
 
Since DaVinci themselves use Rocky Linux, I'll ask again why you haven't tried Rocky? I installed it easily on one of my boxes without issue.
I wish I had time to help.
hi mate, couple of issues

1 - there isnt a rc.d script for rocky linux, like the scripts you to start centos or ubuntu
although it should be possible to modify one of those scripts to work with rocky linux

2 - rocky linux from what i can tell only has iso downloads
arch linux has a bootstrap file that you can extract into /compat/archlinux

which "installs" arch into /compat/archlinux

so the issue is the rocky linux iso are meant as an install media
that you would dd to a usb thumb drive and then boot from

you can mount an iso file but i dont know if you could extract the contents of the iso into /compat/rocky
and then chroot into rocky linux

i did think of that solution a while a go
i just dont know if it would work
 
found a comment on the resolve aur page

with the new version and sha

New Version: 18.6.5
New sha256: e96db4e958e60cfaa49665fa94ef18d34de3ea111f7f1aab8e25ac13321ee183

i cloned the git repo from the aur
and edited the PKGBUILD

and changed the version number and sha
Code:
minor_version=5
sha256sums=('e96db4e958e60cfaa49665fa94ef18d34de3ea111f7f1aab8e25ac13321ee183')

building the PKGBUILD with

Code:
makepkg -si

which is downloading the resolve zip about 45 minutes left
then it should try and build and install resolve

i have only installed the base arch system no nvidia drivers or anything else
the idea is to install resolve then to see if anything missing and install the needed packages
 
post 50
"I have upgraded ubuntu 22.04 to 23.04 and 23.04 to 23.10 because 22.04 became too old."

as i said upgrading to jammy causes the permissions errors

you should NOT upgrade TO jammy,thats 22.04,but FROM Jammy TO 23.04 (Lunar) and Lunar TO 23.10 (Mantic) ; or installing directly Lunar or Mantic.
 
BTW, is there a reason to prefer Davinci Resolve over Kdenlive?

I tried a quick googling on that, but I'm finding some pretty old comments on the matter (like 4 years old). I think Kdenlive has improved in the last few years to the point that it can compete on features with Resolve... and it's in ports: multimedia/kdenlive...
 
kdenlive requires ffplay to play videos in the timeline

and the freebsd ffmpeg doesnt include ffplay,
so you have to build ffmpeg from ports with poudriere and enable sdl to build ffmpeg with ffplay

so i think you have to build ffmpeg before you can even install kdenlive
RoboNuggie made a video about it a couple of years ago

if you google "kdenlive crash" you will get loads of results

also the gpu rendering of videos isnt supposed to work very well
and there is no gpu acceleration for playing videos in the timeline it uses the cpu

besides the fact that it looks like it fell out of the ugly tree and hit every branch on the way down

you cant compare davinci resolve with kden live

its like comparing lionel messi to someone having a kickabout in the park
they may be a trier but they aint no messi
 
i just installed davinci resolve 18.6.5 with archlinux and the linuxulator
using the PKGBUILD with the modified version number and sha sum

have to see if i can get the nvidia drivers working
or if im going to run into the same error i did before
 
so you have to build ffmpeg from ports with poudriere and enable sdl to build ffmpeg with ffplay
You don't have to use Poudriere, just use a recent ports tarball...

But yes, turn on all the available options when you start compiling. Using pre-compiled stuff doesn't let you turn on all the available advertised features. It's like telling Messi to play with his hands cuffed behind his back. Sure, he's still good, but it won't be very comfortable to play with such a limiter.

if you google "kdenlive crash" you will get loads of results
Did that, looks like kdenlive wants loads of swap...
 
installed the nvidia drivers

Code:
sudo pacman -S nvidia nvidia-utils opencl-nvidia

still get this error running nvidia-smi

Failed to initialize NVML: GPU access blocked by the operating system

if you google "Failed to initialize NVML: GPU access blocked by the operating system"

you get a lot of results for people having that error using wsl on windows

i did some errors about /proc not being mounted

which is mentioned in the guide i was following

listing proc in the chroot

Code:
ls -l /compat/archlinux/proc/

output of /compat/archlinux/proc

Code:
dr-xr-xr-x  1 djwilcox djwilcox 0 14 Feb 00:24 9575
dr-xr-xr-x  1 root     wheel    0 14 Feb 00:24 bus
-r--r--r--  1 root     wheel    0 14 Feb 00:24 cmdline
-r--r--r--  1 root     wheel    0 14 Feb 00:24 cpuinfo
-r--r--r--  1 root     wheel    0 14 Feb 00:24 devices
-r--r--r--  1 root     wheel    0 14 Feb 00:24 filesystems
-r--r--r--  1 root     wheel    0 14 Feb 00:24 loadavg
-r--r--r--  1 root     wheel    0 14 Feb 00:24 meminfo
-r--r--r--  1 root     wheel    0 14 Feb 00:24 modules
-r--r--r--  1 root     wheel    0 14 Feb 00:24 mounts
-r--r--r--  1 root     wheel    0 14 Feb 00:24 mtab
dr-xr-xr-x  1 root     wheel    0 14 Feb 00:24 net
-r--r--r--  1 root     wheel    0 14 Feb 00:24 partitions
dr-xr-xr-x  1 root     wheel    0 14 Feb 00:24 scsi
lr--r--r--  1 root     wheel    0 14 Feb 00:24 self -> 9575
-r--r--r--  1 root     wheel    0 14 Feb 00:24 stat
-r--r--r--  1 root     wheel    0 14 Feb 00:24 swaps
dr-xr-xr-x  1 root     wheel    0 14 Feb 00:24 sys
-r--r--r--  1 root     wheel    0 14 Feb 00:24 uptime
-r--r--r--  1 root     wheel    0 14 Feb 00:24 version
[

wonder if its a permission issue

when i tried ubuntu i had a different error message saying driver mismatch or something
however now i get GPU access blocked by the operating system, weird
 
Back
Top