NetBSD Problem Report #57944

From www@netbsd.org  Sat Feb 17 18:48:06 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 88C211A9239
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 17 Feb 2024 18:48:06 +0000 (UTC)
Message-Id: <20240217184804.B11041A923A@mollari.NetBSD.org>
Date: Sat, 17 Feb 2024 18:48:04 +0000 (UTC)
From: bbartlomiej@gmail.com
Reply-To: bbartlomiej@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Various Radeon GPUs not working correctly with Xorg
X-Send-Pr-Version: www-1.0

>Number:         57944
>Category:       port-amd64
>Synopsis:       Various Radeon GPUs not working correctly with Xorg
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-amd64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 17 18:50:01 +0000 2024
>Originator:     Bartlomiej Krawczyk
>Release:        pkgsrc-2023Q4, NetBSD 10.0_RC4
>Organization:
>Environment:
NetBSD troublemaker.sol 10.0_RC4 NetBSD 10.0_RC4 (GENERIC) #0: Tue Feb  6 12:38:53 UTC 2024  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64

>Description:
Hello!
I am trying to use NetBSD 10 on a modern-ish desktop. The main problem I have right now is the GPU support and cooperation with my Lenovo P27h-20 screen and 2560x1440 resolution.

I have purchased various Radeon GPUs in past weeks trying to pinpoint one that works fine. Unfortunately I failed. Summary of my experiences with tremendous help of users is described on https://www.unitedbsd.com/d/1240-problems-with-various-amd-gpu-generations-and-2560x1440-screen and most of my troubleshooting outputs are hosted on https://cloud.krawczyk.it/s/5GfL2NCyskw4Lcy

To sum up:
- AMD Radeon RX 6600 (which I am aware is not supported at the moment). With "gop 6" added in the bootloader I am able to use it in native 2560x1440 resolution, although it is very slow.

- Radeon HD 8570, which according to the source code _should_ be supported by "amdgpu" driver but it is not, it only works using "radeon" KMS driver. "amdgpu" doesn't seem to even load with my custom kernel. Then with Xorg (modular Xorg compiled from pkgsrc) I can run it in native resolution with "modesetting" driver, but it's also only software rendering - however faster than the RX 6600. This card works the best so far.
The same card using the "radeon" driver in Xorg shows supposedly hardware rendering:

	GL_RENDERER = AMD OLAND (DRM 2.50.0, 10.0_RC2, LLVM 13.0.1)
	GL_VERSION = 4.5 (Compatibility Profile) Mesa 21.3.9
	GL_VENDOR = AMD

but running any compositor od app requiring DRI (firefox for instance) messes the screen completely. So the only usable way is "modesetting" driver and then it shows llvmpipe in glxgears' output

- Radeon HD 7450, in Xorg it starts with "radeon" driver and shows hardware rendering:

	GL_RENDERER = AMD CAICOS (DRM 2.50.0 / 10.0_RC2, LLVM 13.0.1)
	GL_VERSION = 3.1 Mesa 21.3.9
	GL_VENDOR = X.Org

But everything is weird: firefox doesn't show all elements on web pages (missing images, missing rounded corners in GTK aplications, sometimes messed up desktop wallpaper). Also it doesn't want to output anything above 1920x1080 even though it should support it and it gets a modeline from the screen using EDID. I tried with xrandr and adding a mode with generated modeline but the screen goes blank. Using the "modesetting" driver it seems it tries to use the modeline it got but the screen goes blank.

- Radeon HD 6670, the situation with this one is the same as with HD 7450 but after some digging I saw that 2560x1440 should be supported only with DVI-D dual link port that it has, not with HDMI. I bought such adapter (DVI-D dual link -> HDMI) but also it doesn't work with my screen.

So in the end I am unable to get 2560x1440 resolution working with HD 7450 and HD 6670 - and even in 1920x1080 there are visual artifacts on the screen under "radeon" driver.

I have placed all the outputs here: https://cloud.krawczyk.it/s/5GfL2NCyskw4Lcy

Does anybody have any other suggestions? Seems the HD 8570 is the most promising as soon as amdgpu is finished or Xorg's radeon driver is fixed (since modesetting works with software rendering only).
Does anybody know of a different well-supported GPU that should work with 2560x1440 over HDMI?

Thank you in advance!

>How-To-Repeat:
Use any of the following GPUs with Lenovo P27h-20 and try to use 2560x1440 resolution:
- AMD Radeon RX 6600
- AMD Radeon HD 8570
- AMD Radeon HD 7450
- AMD Radeon HD 6670
>Fix:
unknown

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.