# drm-kmod amd richland Radeon HD 8670D



## maurizio (Feb 5, 2019)

Hello world!,

I installed my first Freebsd on zfs with geli encryption but I got some problems with graphic drivers.

```
$ uname -a
FreeBSD freebsd.localhost 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC  amd64
```


```
$ pciconf -lv|less
.....
vgapci0@pci0:0:1:0:     class=0x030000 card=0x85261043 chip=0x990c1002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
    device     = 'Richland [Radeon HD 8670D]'
    class      = display
    subclass   = VGA
.....
```

I installed the drm_kmod.
If I use kld_list="amdgpu" in /etc/rc.conf, I got an horrible 1024x768 resolution.
If I use kld_list="/boot/modules/radeonkms.ko" I got a perfect resolution but frequently crashes (restart) and seldom desktop freezes+restart.
I have an amd a10-6700 cpu with integrated APU graphics: Radeon HD 8670D (Richland family).

```
$ sysctl hw.model
hw.model: AMD A10-6700 APU with Radeon(tm) HD Graphics
```
I use GNOME.

How can I use the Radeon KMS driver without crashes?
Please help me because I really like to use and learn more about FreeBSD.


----------



## abishai (Feb 7, 2019)

Rollback to drm 4.11, latest version is unstable.


----------



## Polyatomic (Feb 7, 2019)

My lord, if I may be so bold to apply, in supplementary to the above writing.


maurizio said:


> If I use kld_list="/boot/modules/radeonkms.ko" I got a perfect resolution but frequently crashes (restart) and seldom desktop freezes+restart.


If this annus horribilis makes an appearance using graphics/drm-fbsd12.0-kmod, perhaps you could try graphics/drm-fbsd11.2-kmod.



maurizio said:


> If I use kld_list="amdgpu" in /etc/rc.conf, I got an horrible 1024x768 resolution.


I am having trouble finding the GCN architecture generation for your card, generation
2 and onwards are supported in amdgpu. The symptom you experience may mean your gpu has no support in amdgpu.


----------



## Wozzeck.Live (Feb 7, 2019)

Full drm-kmod graphics/drm-freebsd12.0-kmod is recommended for recent hardware.
It is explicitely written in the FreeBSD handbook.
For older hardwares, it is recommended to use the drm legacy kmod

If you run an old graphics chip, it is likely that you should use LEGACY KMOD (graphics/drm-legacy)

In fact drm legacy is roughly the same as the embedded kernel modules, but it is planned to remove all drm-kmod from kernel, and starting from FreeBSD 13, one should use the legacy port kmod.
DRM Legacy Kmod from port is also updated from time to time, this is not the case for the kernel modules, so in any case it is recommended to switch to the port version which will install the modules in `/boot/modules`, so you can keep you current settings.

Just give a try and choose the more stable option

Just note that in Legacy Kmod, XORG needs additionally x11-drivers/xf86-video-ati or x11-drivers/xf86-video-ati-legacy (for quite old ATI chips), and so the xorg configuration file must be setup accordingly through the video section to make reference to theses xorg drivers
In full drm-kmod, you must change the xorg configuration to deactivate the video section of xorg. In full drm-kmod you run a linux driver superseding any xorg video driver. Configuration is fully automatic, no video section is required in xorg.
Also note that in some cases amdgpu driver can supersede an ati driver. It is quite unclear when exactly, but amdgpu drivers drive also some very late Radeon branded Ati chips.
So make experiment ....

And no, I don't think that you will be able to install DRM Kmod Freebsd  11 on a FreeBSD 12 machine


----------



## maurizio (Feb 7, 2019)

I don't know how to define recent hardware. I cannot find my graphic family here https://wiki.freebsd.org/Graphics/AMD-GPU-Matrix
maybe it is Raedon HD 8000.


> AMD Richland core, and the first microprocessors based on it, were launched in March 2013. The first announced products were A-Series mobile Accelerated Processing Units with 35 Watt TDP. Other Richland APUs, including desktop parts and ULV mobile parts, were introduced in May - June 2013. Richland core is manufactured on 32nm technology, and it combines 1 or 2 Piledriver modules (2 or 4 CPU cores), and Radeon HD 8000 series graphics. Compared to its predecessor, Richland core doesn't have any new CPU features, however the integrated GPU is upgraded to Radeon HD 8000 series graphics.


5 year ago is recent or not?
I installed  drm-kmod by using this command "sudo pkg install drm-kmod", that installed drm-fbsd12.0-kmod too!
I don't think drm-legacy will work but I will give a try.


----------



## Polyatomic (Feb 7, 2019)

Wozzeck.Live said:


> And no, I don't think that you will be able to install DRM Kmod Freebsd  11 on a FreeBSD 12 machine


Noble member, this is simply incorrect. The ports build machinery will _not_ prevent this.
In my opinion, using radeonkms.ko from the graphics/drm-fbsd11.2-kmod port on FreeBSD 12, is ok.


----------



## T-Daemon (Feb 7, 2019)

maurizio said:


> If I use kld_list="/boot/modules/radeonkms.ko" .......
> I have an ..... Radeon HD 8670D (Richland family).


I belief you need to set kld_list="/boot/modules/amdgpu.ko" .

According to FreeBSD Graphics wiki:
“AMD GPU is the kernel module that can be used to support post-HD7000 or Tahiti GPUs.”
.....
“Radeon KMS is a distinct driver intended for older AMD based GPUs that are available in pre-HD7000 or Tahiti GPUs. “


----------



## maurizio (Feb 9, 2019)

> $ dmesg
> ---<<BOOT>>---
> Copyright (c) 1992-2018 The FreeBSD Project.
> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
> ...


I am using a sony vga monitor. How can I get a better resolution with amdgpu.ko? For example the better resolution that radeonkms.ko can give me with crashes.
Surfing on Xorg.<n>.log files I found this error in Xorg.6.log:


> [    62.618] (II) LoadModule: "vesa"
> [    62.619] (II) Loading /usr/local/lib/xorg/modules/drivers/vesa_drv.so
> [    62.619] (II) Module vesa: vendor="X.Org Foundation"
> [    62.619]     compiled for 1.18.4, module version = 2.4.0
> ...


I installed my FreeBSD 12 by gui using zfs+geli encryption. My swap partition is 2GB! Why I got nearly 40GB swap on terminal?


> $ gpart show
> =>        34  1465149101  ada1  GPT  (699G)
> 34        2014        - free -  (1.0M)
> 2048      319488     1  efi  (156M)
> ...


----------



## maurizio (Feb 9, 2019)

Polyatomic said:


> Noble member, this is simply incorrect. The ports build machinery will _not_ prevent this.
> In my opinion, using radeonkms.ko from the graphics/drm-fbsd11.2-kmod port on FreeBSD 12, is ok.


Yeah! I tried that it is possible to install and use drm-fbsd11.2-kmod without installing drm-kmod on FREEBSD 12. I am testing this solution with radeonkms.ko. I will tell you if it works without crashes.


> root@freebsd:/usr/home/mauriziosudo # pkg install drm-fbsd11.2-kmod
> Updating FreeBSD repository catalogue...
> FreeBSD repository is up to date.
> All repositories are up to date.
> ...


----------



## maurizio (Feb 9, 2019)

just installing drm-fbsd11.2-kmod and using kld_list="/boot/modules/radeonkms.ko" , for my APU graphic card Radeon HD 8670D, on FREEBSD 12 works PERFECTLY without crashes!! Thanks to all for the support.


----------

