Heyo,
I have a problem with loading amdgpu into Xorg / X11 session inside chroot.
I've added groups tty log network scanner power users video storage optical lp audio gameplayer sudo pi plugdev
to my user.
I've mounted needed directories to the chroot like so:
#!/bin/sh
kill_server() {
chroot /server/desktop/root/ /bin/kill-xorg-server
exit 0
}
trap "kill_server" SIGTERM SIGKILL SIGINT
if [ $1 == "kill" ]; then
kill_server
fi
mount --make-rslave /server/desktop/root/dev > /dev/null 2>&1 3>&1 || true
mount --make-rslave /server/desktop/root/sys > /dev/null 2>&1 3>&1 || true
mount --make-rslave /server/desktop/root/run/udev > /dev/null 2>&1 3>&1 || true
umount -R /server/desktop/root/dev > /dev/null 2>&1 3>&1 || true
umount -R /server/desktop/root/proc > /dev/null 2>&1 3>&1 || true
umount -R /server/desktop/root/sys > /dev/null 2>&1 3>&1 || true
umount -R /server/desktop/root/run/udev > /dev/null 2>&1 3>&1 || true
umount /server/desktop/root/home/gameplayer/.gvfs > /dev/null 2>&1 3>&1 || true
rm -rf /server/desktop/root/tmp/* > /dev/null 2>&1 3>&1 || true
rm -rf /server/desktop/root/tmp/.* > /dev/null 2>&1 3>&1 || true
rm -rf /server/desktop/root/run/* > /dev/null 2>&1 3>&1 || true
rm -rf /server/desktop/root/run/.* > /dev/null 2>&1 3>&1 || true
mkdir /server/desktop/root/run/udev
mkdir /server/desktop/root/run/dbus
mkdir -p /server/desktop/root/run/user/1000
chmod -R 777 /server/desktop/root/run/dbus
chmod -R 777 /server/desktop/root/run/user
mount -t proc proc /server/desktop/root/proc/
mount --rbind /sys /server/desktop/root/sys/
mount --rbind /dev /server/desktop/root/dev/
mount --rbind /run/udev /server/desktop/root/run/udev
chroot /server/desktop/root/ /bin/system-init
/bin/system-init:
#!/bin/sh
sudo -i -u gameplayer startxfce4 &
/bin/kill-xorg-server:
#!/bin/sh
pkill Xorg || true
/etc/X11/Xwrapper.config:
allowed_users=anybody
needs_root_rights=yes
command lspci -k:
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Kaveri [Radeon R7 Graphics]
Subsystem: Hewlett-Packard Company Device 2215
Kernel driver in use: radeon
At the moment my Xorg is loading llvmpipe instead of amdgpu / radeon. DE is Xfce 4.18.
Is there anyway to load a different GPU driver inside chroot?