# Why is amdgpu blacklisted in loader.conf



## Maccraft123 (Nov 7, 2018)

Why? I want full resolution before loading it from rc.conf


----------



## yuripv (Nov 7, 2018)

It was this commit:

    lualoader: Create a module blacklist, add DRM modules to it

    This is a step in the process of easing migration into the new world order
    of DRM drivers. Strongly encourage users towards loading DRM modules via
    rc.conf(5) instead of loader.conf(5) by failing the load from loader(8).
    Users so inclined may wipe out the blacklist via module_blacklist="" in
    loader.conf(5), and it is expected that these modules will eventually be
    removed from the blacklist. They may still be loaded as dependencies of
    other modules or explicitly via the loader prompt, but this should not be a
    major problem.


----------



## ShelLuser (Nov 7, 2018)

Maccraft123 said:


> Why? I want full resolution before loading it from rc.conf


It's not, what exactly do you mean with "blacklisted" anyway?

I tried looking for amdgpu and only found x11-drivers/xf86-video-amdgpu which is obviously not a kernel module and therefor not directly related. I also found /usr/local/include/libdrm/amdgpu.h, installed by graphics/libdrm, but that also doesn't trace back to a kernel module.

Then I found this thread, which hints at graphics/drm-kmod. But once again nothing directly related to FreeBSD.

So yeah, I can't help wonder if you're not mixing up OS's considering that blacklisting is a practice done in modprobe.conf which has _nothing_ to do with FreeBSD at all.

(edit)

FreeBSD does know about ram_blacklist but that isn't enabled by default (see /boot/defaults/loader.conf) nor does FreeBSD provide a list on its own.


----------



## Maccraft123 (Nov 8, 2018)

AMDGPU module is part of graphics/drm-next-kmod and graphics/drm-devel-kmod


----------



## ShelLuser (Nov 8, 2018)

Maccraft123 said:


> AMDGPU module is part of graphics/drm-next-kmod and graphics/drm-devel-kmod


Which is still part of the ports collection (thus still available) and therefor not blacklisted in some weird way, definitely not in /boot/loader.conf.


----------



## Maccraft123 (Nov 8, 2018)

It *is *blacklisted in /boot/defaults/loader.conf. `cat /boot/defaults/loader.conf | grep amdgpu`


----------



## ShelLuser (Nov 8, 2018)

Maccraft123 said:


> It *is *blacklisted in /boot/defaults/loader.conf. `cat /boot/defaults/loader.conf | grep amdgpu`




```
peter@zefiris:/home/peter $ grep amdgpu /boot/defaults/loader.conf 
peter@zefiris:/home/peter $ freebsd-version -ur
11.2-RELEASE
11.2-RELEASE
```
I'll just be unwatching this thread now.


----------



## Maccraft123 (Nov 8, 2018)

And I installed it with pkg
[root@maciek /usr/home/maccraft123]# pkg search drm-devel-kmod
drm-devel-kmod-4.16.g20181027  DRM modules for the linuxkpi-based KMS components (development version)


----------



## Maccraft123 (Nov 8, 2018)

ShelLuser said:


> ```
> peter@zefiris:/home/peter $ grep amdgpu /boot/defaults/loader.conf
> peter@zefiris:/home/peter $ freebsd-version -ur
> 11.2-RELEASE
> ...


I am using 12-BETA3


----------



## Maccraft123 (Nov 8, 2018)

```
[maccraft123@maciek ~]$ grep amdgpu /boot/defaults/loader.conf
module_blacklist="drm drm2 radeonkms i915kms amdgpu"    # Loader module blacklist
[maccraft123@maciek ~]$ freebsd-version -ur
12.0-BETA3
12.0-BETA3
```


----------



## ShelLuser (Nov 8, 2018)

So override that setting in /boot/loader.conf and be done with it.


----------



## Maccraft123 (Nov 8, 2018)

I overrided it, doesn't work.
I want to know why.
In Linux i have early KMS from initramfs.
Since these drivers are ported from Linux it should also work on FreeBSD


----------



## yuripv (Nov 9, 2018)

1. If override didn't work, show how exactly you are doing it.
2. If override worked, but the driver doesn't do what you expect it to do, it's totally different problem (being ported from Linux doesn't necessarily mean it will work exactly the same).


----------



## SirDice (Nov 9, 2018)

It has been disabled in 12.0 because of graphics/drm-next-kmod. The port provides a newer and improved version which will conflict with the one from the base. That's why the base one has been blacklisted.


----------



## cynwulf (Nov 9, 2018)

amdgpu is a fork of the radeon/R600, etc Linux DRM drivers which supports some newer GPUs.



Maccraft123 said:


> In Linux i have early KMS from initramfs.
> Since these drivers are ported from Linux it should also work on FreeBSD


initframfs is a "Linuxism" and an entirely separate entity to the ported Linux DRM/KMS driver code.  You're conflating two separate issues.


----------



## Maccraft123 (Nov 9, 2018)

SirDice said:


> It has been disabled in 12.0 because of graphics/drm-next-kmod. The port provides a newer and improved version which will conflict with the one from the base. That's why the base one has been blacklisted.


The amdgpu driver does *not *exist in base
This is *only* graphics/drm-[devel,next]-kmod


----------



## Maccraft123 (Nov 9, 2018)

cynwulf said:


> amdgpu is a fork of the radeon/R600, etc Linux DRM drivers which supports some newer GPUs.


If amdgpu would be fork of radeon, it would support GCN 1.x GPUs as well as radeon driver


----------



## Junkie (Nov 9, 2018)

I think they all blacklisted because of the stability problems with EFI during the earlier boot. Actually package and port have the related message


```
amdgpu, i915, and radeon DRM modules for the linuxkpi-based KMS components.
Currently corresponding to Linux 4.11 DRM. Experimental state. amdgpu and
radeonkms are known to fail with EFI boot.
```


----------



## cynwulf (Nov 12, 2018)

Maccraft123 said:


> If amdgpu would be fork of radeon, it would support GCN 1.x GPUs as well as radeon driver


There are plenty of forked drivers which drop support for older hardware, that's often the whole point of the fork.

amdgpu definitely seems to be a fork, lots of files with same copyright notices and dates as the equivalents within the ati/radeon source.  The same developers are involved also.

(and I believe xf86-video-amdgpu was forked from xf86-video-ati as well.)

/edit:  But to remove all doubt -  "amdgpu is based on current upstream open source AMD Radeon kernel driver"

https://www.x.org/wiki/Events/XDC2015/Program/deucher_zhou_amdgpu.pdf


----------



## yuripv (Nov 12, 2018)

Junkie said:


> I think they all blacklisted because of the stability problems with EFI during the earlier boot. Actually package and port have the related message



I pasted the actual commit message saying *why* those were blacklisted in the first reply to this thread, there's no need to guess


----------



## recluce (Nov 14, 2018)

Maccraft123 said:


> The amdgpu driver does *not *exist in base
> This is *only* graphics/drm-[devel,next]-kmod



Sir Dice gave you the correct answer:

These modules exist both as parts of FreeBSD base (quite old versions) and in several *ports*, drm-stable-kmod, drm-next-kmod and drm-devel-mod, for example
To avoid conflicts, installing the port/package adds the blacklisting to loader.conf - otherwise, an active graphics driver would exist when the port-based modules attempt to load, which would cause them to fail
So please come back when:

You have learned to communicate in a more civilized fashion on the forum
You understand the difference between base, ports and packages
You learn to take the advice from acknowledged experts on the forum, like Sir Dice


----------



## shkhln (Nov 14, 2018)

recluce said:


> These modules exist both as parts of FreeBSD base (quite old versions)



Amdgpu _does not_ exist in in base, it is only several years old.



recluce said:


> installing the port/package adds the blacklisting to loader.conf



Blacklist config line actually _does_ exist in base. (See the commit yuripv  referenced above.)


----------



## olli@ (Nov 14, 2018)

recluce said:


> To avoid conflicts, installing the port/package adds the blacklisting to loader.conf - otherwise, an active graphics driver would exist when the port-based modules attempt to load, which would cause them to fail


Actually, no. According to the commit message (link) and the UPDATING entry, the DRM drivers are blacklisted in loader.conf so people are encouraged to load them from rc.conf instead. Loading them from loader.conf is deprecated because it causes problems with EFI booting.


----------



## Maccraft123 (Nov 17, 2018)

I do not have EFI and it still doesn't work from loader.conf


----------



## olli@ (Nov 18, 2018)

Maccraft123 said:


> I do not have EFI and it still doesn't work from loader.conf


Please try to load it from rc.conf. As mentioned above, using loader.conf for the DRM drivers is deprecated.

If loading it from rc.conf doesn't work either, then there is another problem that needs to be solved.


----------



## Maccraft123 (Nov 20, 2018)

Only drm-devel-kmod package works on my computer. Ports and drm-next-kmod fail. Now I am afraid that package would stop working, currently I have locked version. Using 12.0-RC1


----------



## Maccraft123 (Nov 20, 2018)

I just want to have full resolution before rc.conf loading
Btw I am back because finally there is Wine Staging with WoW64.


----------



## olli@ (Nov 20, 2018)

Maccraft123 said:


> I just want to have full resolution before rc.conf loading


I'm not sure why that would matter.

I don't even look at the screen when my machine starts. I switch it on, fetch a cup of coffee – and when I'm back, X11 is already running with the xdm login screen.


----------



## Maccraft123 (Nov 21, 2018)

I *always* forget to come with tea/something else to drink to my computer.I
I* Still* haven't set up XDM - too lazy


----------

