Bug 265844 - current AMD video card drivers are unreliable
Summary: current AMD video card drivers are unreliable
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Package Infrastructure (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-14 19:20 UTC by d.a.pavlov
Modified: 2022-08-19 18:06 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description d.a.pavlov 2022-08-14 19:20:47 UTC
I don't want to write a second bug report about the same motive.

The provided "amdgpu" and "radeon" drivers have a very high chance of freezing 
the system as soon as they are loaded into the Kernel, that can occur
at either loading the modules at boot or after, or at any other time.

info:
Freebsd 13.1 Release AMD64,
Gigabyte Z77MD3H motherboard (AMI bios)
Intel i7-2600; AMD R7 265 "Pitcairn" or HD 7850

Step to reproduce the problem:

1.  XOrg and a graphic environment must be installed.
2.  XOrg is set to use either AMDGPU or RADEON driver.
  as soon as startx is ran, the system freezes

(Alternatively)

Loading kernel modules manually, without necessarily any graphics SW installed.
console: 
1a. #kldload amdgpu 
or 
1b. #kldload radeonkms
     as soon as kldload is ran, the system freezes.

related packages and files:
drm-kmod, radeonkms, pitcairn firmware, amdgpu.

note1: I have used Freebsd with versions of the drivers prior to JAN 2022 and 
I did not experience the following issues.

note2: Sometimes the mentioned drivers will or will not load into kernel, 
at a random success rate and time.
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2022-08-14 19:34:04 UTC
(In reply to d.a.pavlov from comment #0)

> The provided "amdgpu" and "radeon" drivers

pkg info -x kmod
Comment 2 d.a.pavlov 2022-08-14 19:35:06 UTC
(In reply to Graham Perrin from comment #1)

drm-fbsd13-kmod-5.4.191.g20220604_1
drm-kmod-20220501
gpu-firmware-amd-kmod-pitcairn-20220511
gpu-firmware-radeon-kmod-pitcairn-20220511
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2022-08-14 19:36:12 UTC
(In reply to d.a.pavlov from comment #0)

> I don't want to write a second bug report 

Is the first report at <https://github.com/freebsd/drm-kmod/issues/>?
Comment 4 d.a.pavlov 2022-08-14 19:38:13 UTC
(In reply to Graham Perrin from comment #3)
no, I wrote and closed a previous report on bugs.freebsd.org
Comment 5 Graham Perrin freebsd_committer freebsd_triage 2022-08-14 19:40:55 UTC
(In reply to d.a.pavlov from comment #2)

Thanks. Have you tried graphics/drm-510-kmod? 

Populate /usr/ports and /usr/src then remove drm-kmod (and drm-fbsd13-kmod) and

cd /usr/ports/graphics/drm-510-kmod/ && make install clean

<https://www.freshports.org/graphics/drm-510-kmod/#add>
Comment 6 d.a.pavlov 2022-08-14 20:53:47 UTC
(In reply to Graham Perrin from comment #5)
this will take me some time to setup ports and compile, I'll reply when
done.
Comment 7 d.a.pavlov 2022-08-14 22:09:12 UTC
(In reply to Graham Perrin from comment #5)
I can't compile it at the moment, I installed drm-54-kmod pkg and it's the same
Comment 8 d.a.pavlov 2022-08-16 13:32:59 UTC
Closing the bug report, Reason: Not a bug
Due to a lack in documentation this issue can be mistaken for a bug.
The correct way of installing the drm drivers is the following:

required packages:
drm-kmod
gpu-firmware-amd-kmod-pitcairn (single package)
*remove packages unrelated to "Pitcairn"

/boot/loader.conf
hw.syscons.disable=1
kern_vty=vt

/etc/rc.conf
kld_list="amdgpu"
*loading the driver at RC init is the correct timing.
*do not load drivers from the bootloader or manually.

/boot/modules
delete files named i915* and radeon*
files named amdgpu must be present.

output of kldstat:
2    1 0xffffffff82400000   31fd70 amdgpu.ko
3    2 0xffffffff82320000    7f020 drm.ko
4    3 0xffffffff823a0000     cbc8 linuxkpi_gplv2.ko

driver related packages installed:
gpu-firmware-amd-kmod-pitcairn
drm-54-kmod or drm-kmod
Comment 9 d.a.pavlov 2022-08-16 16:33:19 UTC
as I never said it, the driver will only work once and then cause crash
Comment 10 d.a.pavlov 2022-08-16 17:42:57 UTC
Note:

It is strange that adding or removing a hard disk or cdrom drive will compromise the boot process, I reverted settings and the system boots fine