Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [Artix Chroot / OpenRC] Xorg inside chroot is using llvmpipe instead of amdgpu. (Read 353 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[Artix Chroot / OpenRC] Xorg inside chroot is using llvmpipe instead of amdgpu.

Heyo,

I have a problem with loading amdgpu into Xorg / X11 session inside chroot.

I've added groups
Code: [Select]
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:
Code: [Select]
#!/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:
Code: [Select]
#!/bin/sh

sudo -i -u gameplayer startxfce4 &


/bin/kill-xorg-server:
Code: [Select]
#!/bin/sh

pkill Xorg || true


/etc/X11/Xwrapper.config:
Code: [Select]
allowed_users=anybody
needs_root_rights=yes

command lspci -k:
Code: [Select]
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?

Re: [Artix Chroot / OpenRC] Xorg inside chroot is using llvmpipe instead of amdgpu.

Reply #1
Update. Falling back onto `llvmpipe` occurs even outside of chroot.
Error log [ Xorg log ]:
Code: [Select]
X.Org X Server 1.21.1.8
X Protocol Version 11, Revision 0
Current Operating System: Linux xaviama.dank-me.me 6.2.11-artix1-1 #1 SMP PREEMPT_DYNAMIC Sun, 16 Apr 2023 02:07:11 +0000 x86_64
Kernel command line: root=UUID=f4b0ec4b-71e8-4126-b943-4135599fbe3e rw loglevel=3 verbose tsc=nowatchdog
 
Current version of pixman: 0.42.2
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sun Apr 23 17:53:19 2023
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
radeon: Failed to allocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    alignment : 65536 bytes
radeon:    domains   : 6
radeon:    va        : 0x0000000100000000
radeon: Failed to deallocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    va        : 0x100000000
radeon: Failed to allocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    alignment : 65536 bytes
radeon:    domains   : 6
radeon:    va        : 0x0000000100000000
radeon: Failed to deallocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    va        : 0x100000000
radeon: Failed to allocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    alignment : 65536 bytes
radeon:    domains   : 6
radeon:    va        : 0x0000000100000000
radeon: Failed to deallocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    va        : 0x100000000
radeon: Failed to allocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    alignment : 65536 bytes
radeon:    domains   : 6
radeon:    va        : 0x0000000100000000
radeon: Failed to deallocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    va        : 0x100000000
radeonsi: can't create eop_bug_scratch
radeonsi: Failed to create a context.
radeon: Failed to allocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    alignment : 65536 bytes
radeon:    domains   : 6
radeon:    va        : 0x0000000100000000
radeon: Failed to deallocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    va        : 0x100000000
radeon: Failed to allocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    alignment : 65536 bytes
radeon:    domains   : 6
radeon:    va        : 0x0000000100000000
radeon: Failed to deallocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    va        : 0x100000000
radeon: Failed to allocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    alignment : 65536 bytes
radeon:    domains   : 6
radeon:    va        : 0x0000000100000000
radeon: Failed to deallocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    va        : 0x100000000
radeon: Failed to allocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    alignment : 65536 bytes
radeon:    domains   : 6
radeon:    va        : 0x0000000100000000
radeon: Failed to deallocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    va        : 0x100000000
radeonsi: can't create eop_bug_scratch
radeonsi: Failed to create a context.
radeon: Failed to allocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    alignment : 65536 bytes
radeon:    domains   : 6
radeon:    va        : 0x0000000100000000
radeon: Failed to deallocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    va        : 0x100000000
radeon: Failed to allocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    alignment : 65536 bytes
radeon:    domains   : 6
radeon:    va        : 0x0000000100000000
radeon: Failed to deallocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    va        : 0x100000000
radeon: Failed to allocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    alignment : 65536 bytes
radeon:    domains   : 6
radeon:    va        : 0x0000000100000000
radeon: Failed to deallocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    va        : 0x100000000
radeon: Failed to allocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    alignment : 65536 bytes
radeon:    domains   : 6
radeon:    va        : 0x0000000100000000
radeon: Failed to deallocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    va        : 0x100000000
radeonsi: can't create eop_bug_scratch
radeonsi: Failed to create a context.
radeon: Failed to allocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    alignment : 65536 bytes
radeon:    domains   : 6
radeon:    va        : 0x0000000100000000
radeon: Failed to deallocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    va        : 0x100000000
radeon: Failed to allocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    alignment : 65536 bytes
radeon:    domains   : 6
radeon:    va        : 0x0000000100000000
radeon: Failed to deallocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    va        : 0x100000000
radeon: Failed to allocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    alignment : 65536 bytes
radeon:    domains   : 6
radeon:    va        : 0x0000000100000000
radeon: Failed to deallocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    va        : 0x100000000
radeon: Failed to allocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    alignment : 65536 bytes
radeon:    domains   : 6
radeon:    va        : 0x0000000100000000
radeon: Failed to deallocate virtual address for buffer:
radeon:    size      : 65536 bytes
radeon:    va        : 0x100000000
radeonsi: can't create eop_bug_scratch
radeonsi: Failed to create a context.
(II) Server terminated successfully (0). Closing log file.

Re: [Artix Chroot / OpenRC] Xorg inside chroot is using llvmpipe instead of amdgpu.

Reply #2
Another update. KAVERI driver with 1GB Vram has been loaded.

I've started Xorg on the live machine as root while Xfce has been started inside chroot. Both of them communicates with 6000 port.

Also after plugging on/off monitor, Xorg loaded the driver. It's weird for me imo.