Intermittent scanline flickering with amdgpu in both VT and X

Hello!

I do not know what to call this so I have a hard time searching for solutions. I have what I would call intermittent scanline flickering.

It becomes visible when the VT console switches framebuffer driver from efifb to the fb driver during boot. It starts right after the screen clears and I see start FB_INFO:.

Code:
VT: Replacing driver "efifb" with new "fb".
start FB_INFO:
type=11 height=2160 width=3840 depth=32
pbase=0xf40cd3000 vbase=0xfffffe01b46d3000
name=drmn0 flags=0x0 stride=15360 bpp=32
end FB_INFO

If I remove "amdgpu" from kld_list there is no issue. I have tried 3 diffrent HDMI cables just to be sure it should not be a cable issue.

It is intermittent and the frequency it occurs is rather random. Ie. playing video or shaking a window does not make it worse.

The only way I can reliably provoke it is in a VT console when selecting with the mouse pointer on the 2nd half on the screen. The rest of the time it simply occurs randomly.


The issue carries over to X as well.


My X is autoconfigured:

Code:
[    29.122] (II) xfree86: Adding drm device (/dev/dri/card0)
[    29.122] (II) Platform probe for /dev/dri/card0
[    29.133] (--) PCI:*(4@0:0:0) 1002:1638:1002:1636 rev 201, Mem @ 0xd0000000/268435456, 0xe0000000/2097152, 0
xfcc00000/524288, I/O @ 0x0000e000/256, BIOS @ 0x????????/65536
[    29.133] (II) LoadModule: "glx"
[    29.134] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[    29.139] (II) Module glx: vendor="X.Org Foundation"
[    29.139]    compiled for 1.21.1.11, module version = 1.0.0
[    29.139]    ABI class: X.Org Server Extension, version 10.0
[    29.139] (II) Applying OutputClass "AMDgpu" to /dev/dri/card0
[    29.139]    loading driver: amdgpu
[    29.139] (==) Matched amdgpu as autoconfigured driver 0
[    29.139] (==) Matched ati as autoconfigured driver 1
[    29.139] (==) Matched modesetting as autoconfigured driver 2
[    29.139] (==) Matched scfb as autoconfigured driver 3
[    29.139] (==) Matched vesa as autoconfigured driver 4
[    29.139] (==) Assigned the driver to the xf86ConfigLayout
[    29.139] (II) LoadModule: "amdgpu"
[    29.139] (II) Loading /usr/local/lib/xorg/modules/drivers/amdgpu_drv.so
[    29.141] (II) Module amdgpu: vendor="X.Org Foundation"
[    29.141]    compiled for 1.21.1.11, module version = 22.0.0
[    29.141]    Module class: X.Org Video Driver
[    29.141]    ABI class: X.Org Video Driver, version 25.2

I have tried manual configuration and setting TearFree and dropped the frequency from 60 to 30 Hz but to no avail.

Code:
xrandr --output HDMI-A-0 --set TearFree on
xrandr --output HDMI-A-0 --set EnablePageFlip off

Code:
FreeBSD 14.0-RELEASE-p6


pkg info:
drm-515-kmod-5.15.118_4        DRM drivers modules
drm-kmod-20220907_3            Metaport of DRM modules for the linuxkpi-based KMS components
gpu-firmware-amd-kmod-green-sardine-20230625_2 Firmware modules for green_sardine AMD GPUs
gpu-firmware-kmod-20240401,1   Firmware modules for the drm-kmod drivers
libdrm-2.4.120_1,1             Direct Rendering Manager library and headers
xf86-video-amdgpu-22.0.0_2     X.Org amdgpu display driver


dmesg:
amdgpu: ATOM BIOS: 113-CEZANNE-018
drmn0: successfully loaded firmware image 'amdgpu/green_sardine_*.bin'
[drm] Initialized amdgpu 3.42.0 20150101 for drmn0 on minor 0

I was considering just having patience and wait for 15 and drm-61-kmod and hope for the best. But as it is really annoying I hope that someone might have a nifty workaround I do not know about. A magic bitmask for kern.vt.fb.default_mode? Can I choose to keep using efifb? Which gods do I need to make a sacrifice to?

Any ideas would be greatly appreciated!

Kind Regards,
Claus
 
Back
Top