slow rx 5600 xt fps

Alex Deucher alexdeucher at
Tue May 19 21:32:10 UTC 2020

On Tue, May 19, 2020 at 3:20 PM Javad Karabi <karabijavad at> wrote:
> im using Driver "amdgpu" in my xorg conf
> how does one verify which gpu is the primary? im assuming my intel
> card is the primary, since i have not done anything to change that.

Check your xorg log.

> also, if all shared buffers have to go through system memory, then
> that means an eGPU amdgpu wont work very well in general right?
> because going through system memory for the egpu means going over the
> thunderbolt connection

If you want to render on the dGPU and display on the integrated GPU,
then the content will have to traverse the bus.

> and what are the shared buffers youre referring to? for example, if an
> application is drawing to a buffer, is that an example of a shared
> buffer that has to go through system memory? if so, thats fine, right?
> because the application's memory is in system memory, so that copy
> wouldnt be an issue.

For optimal performance, dGPUs will want to render to local vram.  So
when a dGPU is rendering it will render to a buffer in vram.  However,
if the display is connected to the integrated GPU, it can't directly
access the buffer in the dGPU's vram.  In order to transfer the buffer
from the dGPU to the integrated GPU for display, it has to be copied
from vram to buffer in system memory.  This buffer is then shared with
the integrated GPU.  Depending on the integrated GPU's capabilities,
it may be able to use the buffer as is, or it may have to copy the
buffer again to a buffer that it can display from.

> in general, do you think the "copy buffer across system memory might
> be a hindrance for thunderbolt? im trying to figure out which
> directions to go to debug and im totally lost, so maybe i can do some
> testing that direction?

If you are mainly concerned with checking the performance of the the
dGPU itself (where the dGPU handles display and rendering), I would
make sure your desktop environment is configured to be running on the
dGPU only.  Take the integrated GPU out of the picture.

> and for what its worth, when i turn the display "off" via the gnome
> display settings, its the same issue as when the laptop lid is closed,
> so unless the motherboard reads the "closed lid" the same as "display
> off", then im not sure if its thermal issues.

If the integrated GPU is the primary display, turning the displays off
or closing the lid may signal to the integarted GPU driver that it's
not in use so it can power down.  So it may go to a lower power state
which has a relatively high exit latency.  Every time a copy is
required the integrated GPU has to wake up and do the copy.  The copy
is probably not necessary, but I'm not sure how well optimized most
display servers are in this regard.  Really if all the displays on one
GPU are off and the display server should fallback to same GPU render
and display, but I'm not sure how well this is handled.  The current
multi-GPU support in X is mostly focused on the following two use
1. Hybrid graphics, where you have a integrated GPU which handles
displays and you have a dGPU which is mainly for render offload.  The
render GPU renders content and it it shared with the display GPU.
2. Multi-GPU displays, where you have a large desktop spread across
multiple GPUs.  The render GPU renders content and it is shared with
the display GPUs.


> On Tue, May 19, 2020 at 2:14 PM Alex Deucher <alexdeucher at> wrote:
> >
> > On Tue, May 19, 2020 at 2:59 PM Javad Karabi <karabijavad at> wrote:
> > >
> > > given this setup:
> > > laptop -thunderbolt-> razer core x -> xfx rx 5600 xt raw 2 -hdmi-> monitor
> > > DRI_PRIME=1 glxgears gears gives me ~300fps
> > >
> > > given this setup:
> > > laptop -thunderbolt-> razer core x -> xfx rx 5600 xt raw 2
> > > laptop -hdmi-> monitor
> > >
> > > glx gears gives me ~1800fps
> > >
> > > this doesnt make sense to me because i thought that having the monitor
> > > plugged directly into the card should give best performance.
> > >
> >
> > Do you have displays connected to both GPUs?  If you are using X which
> > ddx are you using?  xf86-video-modesetting or xf86-video-amdgpu?
> > IIRC, xf86-video-amdgpu has some optimizations for prime which are not
> > yet in xf86-video-modesetting.  Which GPU is set up as the primary?
> > Note that the GPU which does the rendering is not necessarily the one
> > that the displays are attached to.  The render GPU renders to it's
> > render buffer and then that data may end up being copied other GPUs
> > for display.  Also, at this point, all shared buffers have to go
> > through system memory (this will be changing eventually now that we
> > support device memory via dma-buf), so there is often an extra copy
> > involved.
> >
> > > theres another really weird issue...
> > >
> > > given setup 1, where the monitor is plugged in to the card:
> > > when i close the laptop lid, my monitor is "active" and whatnot, and i
> > > can "use it" in a sense
> > >
> > > however, heres the weirdness:
> > > the mouse cursor will move along the monitor perfectly smooth and
> > > fine, but all the other updates to the screen are delayed by about 2
> > > or 3 seconds.
> > > that is to say, its as if the laptop is doing everything (e.g. if i
> > > open a terminal, the terminal will open, but it will take 2 seconds
> > > for me to see it)
> > >
> > > its almost as if all the frames and everything are being drawn, and
> > > the laptop is running fine and everything, but i simply just dont get
> > > to see it on the monitor, except for one time every 2 seconds.
> > >
> > > its hard to articulate, because its so bizarre. its not like, a "low
> > > fps" per se, because the cursor is totally smooth. but its that
> > > _everything else_ is only updated once every couple seconds.
> >
> > This might also be related to which GPU is the primary.  It still may
> > be the integrated GPU since that is what is attached to the laptop
> > panel.  Also the platform and some drivers may do certain things when
> > the lid is closed.  E.g., for thermal reasons, the integrated GPU or
> > CPU may have a more limited TDP because the laptop cannot cool as
> > efficiently.
> >
> > Alex

More information about the amd-gfx mailing list