Bug 257810 - x11/gnome3(-lite) & x11/gdm lags significantly on amdgpu
Summary: x11/gnome3(-lite) & x11/gdm lags significantly on amdgpu
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-13 15:23 UTC by Neel Chauhan
Modified: 2023-10-11 22:35 UTC (History)
6 users (show)

See Also:
bugzilla: maintainer-feedback? (gnome)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Neel Chauhan freebsd_committer freebsd_triage 2021-08-13 15:23:05 UTC
On both an HP Envy x360 and a 11" Gateway laptop (2020, but forgot which model) which both use amdgpu integrated graphics, GNOME lags significantly where it's not usable.

This also happens on the Envy with OpenBSD, on both GNOME 3 and 40, unless I use scfb. I don't know about Linux as I only booted non-GNOME-based distros via LiveUSB.

This is an amdgpu problem with GNOME as KDE does not lag on the Envy, with also being able to play Toontown Rewritten via the Linuxulator. I believe it's AMD GPUs as scfb on the Envy and Ryzen desktops with Nvidia GPUs don't lag. I don't know about discrete Radeon GPUs or the older radeonkms driver.
Comment 1 Neel Chauhan freebsd_committer freebsd_triage 2021-08-13 15:24:01 UTC
About this phrase:

>This also happens on the Envy with OpenBSD, on both GNOME 3 and 40, unless I use scfb. I don't know about Linux as I only booted non-GNOME-based distros via LiveUSB.

It is unclear. I meant that OpenBSD also lags, but scfb does not.
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2022-03-10 05:25:32 UTC
(In reply to Neel Chauhan from comment #0)

> … lags significantly … not usable. …

If you switch away from ttyv8 to e.g. ttyv1 (Control-Alt-F2) then 
back to ttyv8 (Alt-F9): is there a frame-by-frame effect, for each switch?
Comment 3 Neel Chauhan freebsd_committer freebsd_triage 2022-03-10 17:31:33 UTC
The thing is, I no longer own an amdgpu-powered laptop. Since posting this bug report, I switched to an Intel-based 14" HP Spectre.
Comment 4 Neel Chauhan freebsd_committer freebsd_triage 2022-03-10 17:32:11 UTC
Even then, only GNOME lagged. KDE and others did not.

This was also the case with OpenBSD.
Comment 5 bpurgar 2022-03-10 20:46:24 UTC
Hi .. i have same problem and only workaround is to disable dri 3 in xorg.conf (use dri 2)
Comment 6 Neel Chauhan freebsd_committer freebsd_triage 2022-03-10 21:53:03 UTC
Sadly, yes. At least for now.

Maybe a future drm-kmod may fix this, know knows. But for now, just use DRI 2.
Comment 7 Graham Perrin freebsd_committer freebsd_triage 2022-03-10 22:22:21 UTC
(In reply to Neel Chauhan from comment #6)

Thanks, is there any non-GNOME use case that benefits from DRI 2? 

I assume that <https://wiki.freebsd.org/GraphicsOld/DRI3> is stale but not yet <https://wiki.freebsd.org/CategoryStale> categorised as such. 

What's the simplest possible concise explanation of preferring 2 instead of 3? 

(I see <https://en.wikipedia.org/wiki/Direct_Rendering_Infrastructure#DRI3> but trying to interpret that in normal order, let alone in reverse (2 instead of 3), is quite mind-bending.)

<https://www.freebsd.org/cgi/man.cgi?query=xorg.conf&sektion=5&manpath=FreeBSD-Ports#DRI_SECTION> directs readers to <https://dri.freedesktop.org/> but then (sorry) it's not clear which path to take; <https://dri.freedesktop.org/wiki/CategoryFaq/> is a scattering of things. 

Here in Bugzilla is not the best place for explanations, so maybe someone can edit something temporarily into <https://wiki.freebsd.org/Graphics> or <https://wiki.freebsd.org/Gnome> pending more formal edition into (I guess) <https://www.freebsd.org/gnome/>.
Comment 8 Alexander Vereeken 2022-04-02 13:37:51 UTC
Could this bug be https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253746 ?
Comment 9 Alexander Vereeken 2022-04-02 13:37:58 UTC
Could this bug be https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253746 ?
Comment 10 Neel Chauhan freebsd_committer freebsd_triage 2022-06-11 23:08:35 UTC
It's probably that. Sorry for the delay in responding.

I sadly cannot test this now, since my main laptop now has an Intel CPU/GPU: I no longer own the said Envy.
Comment 11 BorisM 2022-09-23 04:39:52 UTC
System: Dell Precision T3500 w Intel X5650 CPU and ATI HD4850 GPU PCIE card
OS: FreeBSD 13.1 (fresh install).
Packages installed: xorg, drm-kmod, xf86-video-ati.
Kernel graphics driver (from dmesg): [drm] Initialized radeon 2.50.0 20080528
Xorg graphics driver (from Xorg log): radeon

Test1: Installed KDE5/SDDM and get proper graphical login and hardware accelerated graphics in desktop environment.

Test2: Installed Gnome422/GDM and get blank login screen w active mouse pointer. Disabling DRI3 (DRI2 only) and now able to access desktop but gnome reports software rendering. Observed some display artifacts after a few minutes.

So I can confirm this issue also affects and older GPU running the radeon driver. Saved xorg and system message logs and can post if anyone wants to see them.