You are not logged in.

#1 2022-09-19 21:47:19

frosty777
Member
Registered: 2022-09-19
Posts: 3

Hardware accelerated content is very slow on primary display (Xorg)

I have an R7 250X powering my primary 4k display and the integrated graphics from my Ryzen 5 5600G APU for the secondary one. Whenever I have any window using hardware acceleration (chromium, vlc, etc) on the primary monitor, it is very slow (I estimate around a frame every 2 seconds) unless I disable the hardware acceleration in the program settings. On the secondary monitor, however, this problem does not occur. Any hardware accelerated program is smooth, as expected. I tried following https://wiki.archlinux.org/title/PRIME# … offloading to use the APU for rendering everything but it's giving me an error.

frosty@archlinux ~> xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x55 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 3 associated providers: 1 name:Unknown AMD Radeon GPU @ pci:0000:30:00.0
Provider 1: id: 0x88 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 6 outputs: 4 associated providers: 1 name:VERDE @ pci:0000:10:00.0
frosty@archlinux ~> xrandr --setprovideroffloadsink 0x55 0x88
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  34 (RRSetProviderOffloadSink)
  Value in failed request:  0x55
  Serial number of failed request:  16
  Current serial number in output stream:  17

If I force every GPU to use the AMDGPU driver using

radeon.cik_support=0 radeon.si_support=0 amdgpu.cik_support=1 amdgpu.si_support=1 amdgpu.dc=1

, the primary display looks like it's running at a lower refresh rate despite still being at 60hz, but when using a program with hardware acceleration it is a lot smoother, even though it's still not running at 60fps.

Offline

#2 2022-09-20 12:21:39

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,167

Re: Hardware accelerated content is very slow on primary display (Xorg)

GPU offloading works when all displays are connected to the same card.

When both cards have displays attached other methods like reverse prime are needed.

Try

$ xrandr --setprovideroutputsource 0x55 0x88

That should allow the apu to access the 4k display .

Running xrandr (without parameters) after executing the above command should show both displays .

Welcome to archlinux forums

Last edited by Lone_Wolf (2022-09-20 12:21:56)


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 2022-09-20 13:41:05

frosty777
Member
Registered: 2022-09-19
Posts: 3

Re: Hardware accelerated content is very slow on primary display (Xorg)

Thank you. I tried running that command but it gave me a similar error

frosty@archlinux ~ [1]> xrandr --setprovideroutputsource 0x55 0x88
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  35 (RRSetProviderOutputSource)
  Value in failed request:  0x88
  Serial number of failed request:  16
  Current serial number in output stream:  17

I also followed the full instructions from https://wiki.archlinux.org/title/PRIME#Reverse_PRIME, my xorg.conf being

Section "ServerLayout"
        Identifier "layout"
        Screen 0 "apu"
        Inactive "r7"
EndSection

Section "Device"
        Identifier "r7"
        Driver "amdgpu"
EndSection

Section "Screen"
        Identifier "r7"
        Device "r7"
EndSection

Section "Device"
        Identifier "apu"
        Driver "amdgpu"
        BusID "PCI:30:0:0"
EndSection

Section "Screen"
        Identifier "apu"
        Device "apu"
EndSection

Not sure if the BusID is correct though,

frosty@archlinux ~> lspci | grep VGA
10:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde XT [Radeon HD 7770/8760 / R7 250X]
30:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne (rev c9)

After rebooting, when running startxfce4 it doesn't run until I remove or rename xorg.conf. Xorg log:

[    14.049] 
X.Org X Server 1.21.1.4
X Protocol Version 11, Revision 0
[    14.049] Current Operating System: Linux archlinux 5.19.9-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Thu, 15 Sep 2022 16:08:24 +0000 x86_64
[    14.049] Kernel command line: initrd=\amd-ucode.img initrd=\initramfs-linux-zen.img root=PARTUUID=f425dab7-6be3-4ad0-b96e-4232d1d8057b zswap.enabled=0 rw rootfstype=ext4 radeon.cik_support=0 radeon.si_support=1 amdgpu.cik_support=1 amdgpu.si_support=0 amdgpu.dc=1
[    14.049]  
[    14.049] Current version of pixman: 0.40.0
[    14.049] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[    14.049] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    14.049] (==) Log file: "/home/frosty/.local/share/xorg/Xorg.0.log", Time: Tue Sep 20 16:17:55 2022
[    14.050] (==) Using config file: "/etc/X11/xorg.conf"
[    14.050] (==) Using config directory: "/etc/X11/xorg.conf.d"
[    14.050] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    14.051] (==) ServerLayout "layout"
[    14.051] (**) |-->Screen "apu" (0)
[    14.051] (**) |   |-->Monitor "<default monitor>"
[    14.051] (**) |   |-->Device "apu"
[    14.051] (**) |   |-->GPUDevice "r7"
[    14.051] (==) No monitor specified for screen "apu".
	Using a default monitor configuration.
[    14.051] (**) |-->Inactive Device "r7"
[    14.051] (==) Automatically adding devices
[    14.051] (==) Automatically enabling devices
[    14.051] (==) Automatically adding GPU devices
[    14.051] (==) Automatically binding GPU devices
[    14.051] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    14.053] (WW) The directory "/usr/share/fonts/Type1" does not exist.
[    14.053] 	Entry deleted from font path.
[    14.053] (WW) The directory "/usr/share/fonts/100dpi" does not exist.
[    14.053] 	Entry deleted from font path.
[    14.053] (WW) The directory "/usr/share/fonts/75dpi" does not exist.
[    14.053] 	Entry deleted from font path.
[    14.053] (==) FontPath set to:
	/usr/share/fonts/misc,
	/usr/share/fonts/TTF,
	/usr/share/fonts/OTF
[    14.053] (==) ModulePath set to "/usr/lib/xorg/modules"
[    14.053] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[    14.053] (II) Module ABI versions:
[    14.053] 	X.Org ANSI C Emulation: 0.4
[    14.053] 	X.Org Video Driver: 25.2
[    14.053] 	X.Org XInput driver : 24.4
[    14.053] 	X.Org Server Extension : 10.0
[    14.053] (++) using VT number 1

[    14.053] (--) controlling tty is VT number 1, auto-enabling KeepTty
[    14.055] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
[    14.055] (II) xfree86: Adding drm device (/dev/dri/card1)
[    14.055] (II) Platform probe for /sys/devices/pci0000:00/0000:00:01.1/0000:10:00.0/drm/card1
[    14.056] (II) systemd-logind: got fd for /dev/dri/card1 226:1 fd 13 paused 0
[    14.056] (II) xfree86: Adding drm device (/dev/dri/card0)
[    14.056] (II) Platform probe for /sys/devices/pci0000:00/0000:00:08.1/0000:30:00.0/drm/card0
[    14.056] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 14 paused 0
[    14.058] (--) PCI: (16@0:0:0) 1002:683d:174b:a002 rev 0, Mem @ 0xe0000000/268435456, 0xfcf00000/262144, I/O @ 0x0000f000/256, BIOS @ 0x????????/131072
[    14.058] (--) PCI:*(48@0:0:0) 1002:1638:1002:1636 rev 201, Mem @ 0xc0000000/268435456, 0xd0000000/2097152, 0xfca00000/524288, I/O @ 0x0000d000/256
[    14.058] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[    14.058] (II) LoadModule: "glx"
[    14.059] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    14.062] (II) Module glx: vendor="X.Org Foundation"
[    14.062] 	compiled for 1.21.1.4, module version = 1.0.0
[    14.062] 	ABI class: X.Org Server Extension, version 10.0
[    14.062] (II) LoadModule: "amdgpu"
[    14.062] (II) Loading /usr/lib/xorg/modules/drivers/amdgpu_drv.so
[    14.064] (II) Module amdgpu: vendor="X.Org Foundation"
[    14.064] 	compiled for 1.21.1.3, module version = 22.0.0
[    14.064] 	Module class: X.Org Video Driver
[    14.064] 	ABI class: X.Org Video Driver, version 25.2
[    14.064] (II) AMDGPU: Driver for AMD Radeon:
	All GPUs supported by the amdgpu kernel driver
[    14.065] (EE) AMDGPU(G1): amdgpu_device_initialize failed
[    14.065] (EE) No devices detected.
[    14.065] (EE) 
Fatal server error:
[    14.065] (EE) no screens found(EE) 
[    14.065] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[    14.065] (EE) Please also check the log file at "/home/frosty/.local/share/xorg/Xorg.0.log" for additional information.
[    14.065] (EE) 
[    14.074] (EE) Server terminated with error (1). Closing log file.

I think I might just end up using the dedicated card to drive both displays and use the integrated graphics for VM GPU passthrough though. I just think that error is very strange, I'll edit this if I find the cause

Edit: I did that but it wouldn't display anything on either screen until I enabled CSM. My GPU is probably just so old that it doesn't support UEFI. Now performance is as expected in all programs. It just sucks that I have to use the much weaker dedicated GPU over the integrated one. Maybe regular PRIME will work now?

Last edited by frosty777 (2022-09-20 13:48:31)

Offline

#4 2022-09-20 14:44:28

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,483

Re: Hardware accelerated content is very slow on primary display (Xorg)

You told X11 to use the amdgpu driver on the cape verde card, which is a southern island chip (because AMD says so; though wikipedia has it as "volcanic island" - fuck AMD for forcing us to learn stupid geometry and then TEACHING IT WRONG /rant) but the kernel commandline also says "radeon.si_support=1 amdgpu.si_support=0" so this expectably fails.

Cezanne is an artist and has a Vega GPU (because AMD ran out of fucking islands, we're now doing stars. Somebody should introduce them to the concept of numbers… grrrr) and is supported by the amdgpu kernel module w/o further action.

Edit: CIK is the sea islands - whereever those may be, but they're not in your hardware wink

Last edited by seth (2022-09-20 14:45:25)

Offline

#5 2022-09-20 14:51:14

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,263

Re: Hardware accelerated content is very slow on primary display (Xorg)

Any reason you aren't just plugging both into the integrated card? Your external one is so old that you are not going to see many benefits from trying to split workload the integrated card can handle better anyway.

Offline

#6 2022-09-20 18:26:33

frosty777
Member
Registered: 2022-09-19
Posts: 3

Re: Hardware accelerated content is very slow on primary display (Xorg)

V1del wrote:

Any reason you aren't just plugging both into the integrated card? Your external one is so old that you are not going to see many benefits from trying to split workload the integrated card can handle better anyway.

My motherboard only has (one) DVI and (one) HDMI output. None of my monitors have HDMI input and If I remember correctly DVI can't drive 4k@60hz, so I can only use my secondary 1080p monitor

Offline

Board footer

Powered by FluxBB