You are not logged in.

#1 2024-05-25 15:43:45

bpetid7
Member
Registered: 2024-05-25
Posts: 7

[abandoned] How to do gpu offloading for xorg using prime

My setup is as the following:
1. old nvidia gpu with display output
2. amd gpu without display output

I have managed to use the amd gpu for rendering games/etc, but I can't manage to start X on it. Following the PRIME gpu offloading guide I've tried to set up my xorg conf.
Is it even possible, to render everything on the 'secondary' gpu, and use the 'primary' gpu only for presenting to the screen? Why I want to do this: the nvidia card is really weak, it can present ~30 frames/s on a 1080p display.
If I swap the cards in the config, I get an output, and programs are rendered by the amd card, except my DE and xorg.

Here's the output of my xorg.0.log

[  3926.625] (==) Log file: "/var/log/Xorg.0.log", Time: Sat May 25 17:35:40 2024
[  3926.625] (==) Using config directory: "/etc/X11/xorg.conf.d"
[  3926.625] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  3926.626] (==) ServerLayout "layout"
[  3926.626] (**) |-->Screen "amdgpu" (0)
[  3926.626] (**) |   |-->Monitor "<default monitor>"
[  3926.626] (**) |   |-->Device "amdgpu"
[  3926.626] (**) |   |-->GPUDevice "modesetting"
[  3926.626] (==) No monitor specified for screen "amdgpu".
        Using a default monitor configuration.
[  3926.626] (**) |-->Inactive Device "modesetting"
[  3926.626] (**) Allowing byte-swapped clients
[  3926.626] (==) Automatically adding devices
[  3926.626] (==) Automatically enabling devices
[  3926.626] (==) Automatically adding GPU devices
[  3926.626] (==) Automatically binding GPU devices
[  3926.626] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  3926.627] (WW) The directory "/usr/share/fonts/misc" does not exist.
[  3926.627]    Entry deleted from font path.
[  3926.627] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/TTF".
[  3926.627]    Entry deleted from font path.
[  3926.627]    (Run 'mkfontdir' on "/usr/share/fonts/TTF").
[  3926.627] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[  3926.627]    Entry deleted from font path.
[  3926.627] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[  3926.627]    Entry deleted from font path.
[  3926.627] (WW) The directory "/usr/share/fonts/100dpi" does not exist.
[  3926.627]    Entry deleted from font path.
[  3926.627] (WW) The directory "/usr/share/fonts/75dpi" does not exist.
[  3926.627]    Entry deleted from font path.
[  3926.627] (==) FontPath set to:

[  3926.627] (==) ModulePath set to "/usr/lib/xorg/modules"
[  3926.627] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
[  3926.627] (II) Module ABI versions:
[  3926.627]    X.Org ANSI C Emulation: 0.4
[  3926.627]    X.Org Video Driver: 25.2
[  3926.627]    X.Org XInput driver : 24.4
[  3926.627]    X.Org Server Extension : 10.0
[  3926.627] (++) using VT number 2

[  3926.627] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[  3926.631] (II) xfree86: Adding drm device (/dev/dri/card0)
[  3926.631] (II) Platform probe for /sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0/drm/card0
[  3926.632] (II) xfree86: Adding drm device (/dev/dri/card1)
[  3926.632] (II) Platform probe for /sys/devices/pci0000:40/0000:40:02.0/0000:42:00.0/0000:43:00.0/0000:44:00.0/drm/card1
[  3926.665] (--) PCI:*(5@0:0:0) 10de:1245:1acc:4514 rev 161, Mem @ 0xd8000000/33554432, 0x3fff8000000/134217728, 0x3fff4000000/67108864, I/O @ 0x0000ec80/128, BIOS @ 0x????????/131072
[  3926.665] (--) PCI: (68@0:0:0) 1002:6860:1002:0c35 rev 1, Mem @ 0x3bc00000000/17179869184, 0x3bbffe00000/2097152, 0xcd780000/524288, BIOS @ 0x????????/131072
[  3926.665] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[  3926.665] (II) LoadModule: "glx"
[  3926.666] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[  3926.668] (II) Module glx: vendor="X.Org Foundation"
[  3926.668]    compiled for 1.21.1.13, module version = 1.0.0
[  3926.668]    ABI class: X.Org Server Extension, version 10.0
[  3926.668] (II) LoadModule: "amdgpu"
[  3926.668] (II) Loading /usr/lib/xorg/modules/drivers/amdgpu_drv.so
[  3926.669] (II) Module amdgpu: vendor="X.Org Foundation"
[  3926.669]    compiled for 1.21.1.11, module version = 23.0.0
[  3926.669]    Module class: X.Org Video Driver
[  3926.669]    ABI class: X.Org Video Driver, version 25.2
[  3926.669] (II) LoadModule: "modesetting"
[  3926.670] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[  3926.670] (II) Module modesetting: vendor="X.Org Foundation"
[  3926.670]    compiled for 1.21.1.13, module version = 1.21.1
[  3926.670]    Module class: X.Org Video Driver
[  3926.670]    ABI class: X.Org Video Driver, version 25.2
[  3926.670] (II) AMDGPU: Driver for AMD Radeon:
        All GPUs supported by the amdgpu kernel driver
[  3926.670] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[  3926.677] (II) modeset(G0): using drv /dev/dri/card0
[  3926.677] (WW) Falling back to old probe method for modesetting
[  3926.678] (EE) No devices detected.
[  3926.678] (EE)
Fatal server error:
[  3926.678] (EE) no screens found(EE)
[  3926.678] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org

Last edited by bpetid7 (2024-05-27 20:28:32)

Offline

#2 2024-05-26 10:31:58

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,125

Re: [abandoned] How to do gpu offloading for xorg using prime

Comparing the pci IDs you have a geforce GT 550M and an AMD Instinct card ?

Please post the full output of

$ lspci -knn
$ ls -l /etc/X11/xorg.conf.d/

see https://wiki.archlinux.org/title/List_o … n_services for methods to upload text outputs stuff to public sites.

Edited :
also add pacman -Qs nvidia


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2024-05-26 12:28:33

bpetid7
Member
Registered: 2024-05-25
Posts: 7

Re: [abandoned] How to do gpu offloading for xorg using prime

Nvidia GTS 450 and radeon instinct mi25, yes.
Since then, I've tried with nvidia properitary drivers, so now you'll see them too. I was using nouveau at the time of first post.

lspci -knn
ls -l /etc/X11/xorg.conf.d/  00-keyboard is default, 10-gpu.conf is commented out, 70-sw-mouse.conf is empty. Why you might be interested in is this xorg.conf
pacman -Qs nvidia

Offline

#4 2024-05-26 12:37:50

bpetid7
Member
Registered: 2024-05-25
Posts: 7

Re: [abandoned] How to do gpu offloading for xorg using prime

Maybe offtopic, but I was connecting remotely, but now if I look at the physical hardware it seems to render with an usable framerate, maybe the encoder is just too slow. Anyway, if I could render everything on the radeon gpu and use it's encoding capabilities it would help, maybe. So the question still stands.

Offline

#5 2024-05-26 12:57:40

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,125

Re: [abandoned] How to do gpu offloading for xorg using prime

prime render offload is only supported from the 435 driver and up.
Bumblebee may work with the 390 driver but targets systems with intel as primary and nvidia as secondary .

The nouveau driver does seem to give the biggest chance.

move / remove the xorg.conf , reboot, check lspi -k to verify the nouveau driver is used.
start X, post the output of

$ xrandr --listproviders
$ glxinfo -B   #comes_with_mesa-utils

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#6 2024-05-26 15:07:17

seth
Member
Registered: 2012-09-03
Posts: 60,280

Re: [abandoned] How to do gpu offloading for xorg using prime

… and the complete xorg log.
Also remove the nvidia-settings generated xorg.conf - that's not gonna help you here at all.

If this is a notebook and you're not interested in using one of the GPUs at all, the first step is to check whether you can disable it in the  firmware (BIOS/UEFI)

Online

#7 2024-05-26 17:06:57

bpetid7
Member
Registered: 2024-05-25
Posts: 7

Re: [abandoned] How to do gpu offloading for xorg using prime

I've tried blacklisting nvidia modules, but they are still being used. I should uninstall them, but sadly I won't have time to deal with this in the upcoming weeks. I might just buy a slightly more modern vga, I think if it supports nvenc or some encoding then I wouldn't need to render everything in the mi25. This might just solve my problem and I could get a gtx 1030 or rx 470 for a reasonable price. Should I mark this as solved?

Offline

#8 2024-05-26 17:40:12

seth
Member
Registered: 2012-09-03
Posts: 60,280

Re: [abandoned] How to do gpu offloading for xorg using prime

Blacklisting the nvidia modules is not what I meant, but it likely fails because they're still in the initramfs and you'll have to regenerate that after either uninstalling the nvidia packages or to get the modprobe config into the initramfs to block them there as well.

You can keep the thread dormant until you've time to deal with it or probably report it for the dustbin or tag it "[abandoned]" - it's not solved and right now doesn't really contain information that's super-useful either.

Online

Board footer

Powered by FluxBB