Solved AMDGPU Polaris FreeBSD13-rc1 - module not found

broozar

Member

Reaction score: 13
Messages: 35

Hi everyone, I think I am having trouble getting my Radeon RX 550 to work 100% on fBSD13.

What I have done:
- Install Xorg, Mate, a login manager, etc.
- Install drm-kmod
- sysrc kld_list+="amdgpu"

What works:
- logging into Mate desktop, everything seems nice and fluent, even WebGL content works fluently
- kldstat shows me that amdgpu.ko and a number of amdgpu_polaris12*.ko are loaded
- /etc/rc.conf shows kld_list="amdgpu"

What seems off:
- the driver is listed as vesa/modesetting when I look it up using glxinfo and inxi

What does not work:
I tried adding a conf file to /etc/X11/xorg.conf.d:

Code:
Section "Device"
    Identifier "AMD"
    Driver "amdgpu"
    Option "DRI" "3"
    Option "TearFree" "true"
EndSection

When I reboot with this file, my login manager does not load. The Xorg log says, "could not load amdgpu: module does not exist". But naturally, kldstat shows that the module has been loaded. Any suggestions what's wrong with this file?
 

Zirias

Daemon

Reaction score: 1,147
Messages: 2,072

- logging into Mate desktop, everything seems nice and fluent, even WebGL content works fluently
Don't try to "fix" something that obviously works correctly.
The Xorg log says, "could not load amdgpu: module does not exist".
X.Org driver != kernel driver. The "modesetting" X.Org driver already gives you accelerated rendering with kernel drm.

edit: for a specific X.Org driver see next post ;) still unsure what additional benefits it will provide.
 

Alexander88207

Well-Known Member

Reaction score: 255
Messages: 468

Many people seem to recommend using the modesetting X11 driver instead of the amdgpu X11 driver, but I'm not certain why.
For normal users it should be sufficient to use modesetting.

For advanced users could only be a problem that a feature such as FreeSync is missing, there must then AMD users use xf86-video-amdgpu so that one can use eg FreeSync. However, they are in the process of gradually adding everything to modesetting. So in 10 years or more who knows those packages could get obsolete.
 

Snurg

Daemon

Reaction score: 577
Messages: 1,349

...could only be a problem that a feature such as FreeSync is missing, there must then AMD users use xf86-video-amdgpu so that one can use eg FreeSync.
This, together with the OP's observation that the vesa graphics driver was being used, might be a hint.

But my suspicion is that the <modesetting> setting might actually mean using the vesa driver.
Unlike the OP, few people actually check which graphics driver is being used, as soon as it "works", and don't notice at all when the fallback vesa driver is being used.

Another possibility might be that the amdgpu kernel module is the kernel modesetting module designed to communicate with the [PMAN=]xf86-video-amdgpu[/PMAN] driver as the actual driver, which itself communicates with xorg.

I am really curious what the OP will find out :)

Edit: Is the user in the "video" group?
 
OP
B

broozar

Member

Reaction score: 13
Messages: 35

X.Org driver != kernel driver.
Thanks, I did not know that! I almost exclusively run nVidia systems, where the driver installation is rather different. This is my first FreeBSD installation using an AMD card.

Did you install the X11 driver? x11-drivers/xf86-video-amdgpu/
:oops: sorry... I did not. Needless to say everything works now. Thank you!

Unlike the OP, few people actually check which graphics driver is being used, as soon as it "works", and don't notice at all when the fallback vesa driver is being used.
I am actually working on a new version of my DarkMate install script, which allows for selection of the graphics driver (nVidia/amdgpu/radeon/intel). I bought the RX 550 mainly for this reason. Plus, I am really curious how the different drivers and manufacturers compare. The vesa driver feels very snappy, dragging windows around has no delay, but I get major tearing when scrolling or moving something too fast on screen. Amdgpu introduces a bit of delay when dragging windows around, something I know very well from the nVidia drivers. However tearing is completely gone with amdgpu and everything feels smoother, at the cost of a bit of responsiveness.

All in all, I was quite impressed with the vesa/modesetting driver, especially the good 3D performance was very unexpected. If anyone got tips for getting rid of the tearing, please let me know.
 

Zirias

Daemon

Reaction score: 1,147
Messages: 2,072

But my suspicion is that the <modesetting> setting might actually mean using the vesa driver.
No. Vesa will be used if NO drm devices (provided by a kernel driver) are available. Otherwise, you'll get accelerated rendering.
So, specific X.Org drivers are nowadays only needed for specific things (yes, probably such as this TearFree option). The manpages for these X.Org drivers might clarify.
 

Alexander88207

Well-Known Member

Reaction score: 255
Messages: 468

But my suspicion is that the <modesetting> setting might actually mean using the vesa driver.

If the drm driver is loaded correctly and no xorg config have been created the modesetting driver modesetting_drv.so will be loaded.

+ Bonus to Zirias correcty answer :)

If no drm driver (amdgpu/radeonkms/i915kms.ko) is loaded:

Vesa will be used on legacy boot configurations and loads automatically too.

Scfb will be used on UEFI boot configuartions and needs to be specified in an xorg configuration. Driver "scfb" etc...
 
Last edited:

Snurg

Daemon

Reaction score: 577
Messages: 1,349

Thank you all for your helpful answers!
I am getting a better understanding slowly :)

I am actually working on a new version of my DarkMate install script, which allows for selection of the graphics driver (nVidia/amdgpu/radeon/intel). I bought the RX 550 mainly for this reason.
Awesome! 👍
I looked at your postinstaller on github, and got some nice suggestions for my project (cgi based postinstaller).
Currently I am working on the configuration of the graphics cards after their autodetection.
And I feel quite annoyed that a few years I sold that box of many graphics cards I had collected when I had the opportunity to gut a batch of PCs being retired. :(
Now without all these cards, these discussions about how to get this or that card configured correctly help me getting their configuration right... so, again thank you all!
 

astyle

Member

Reaction score: 11
Messages: 44

Funny... I got everything working just by following these instructions: (https://wiki.freebsd.org/Graphics#AMD_Graphics, the AMD GPU section). My card is an Asus RX 550 4GB. One thing to add to these instructions: the line

Code:
kld_list="/boot/modules/amdgpu.ko"

absolutely needs to be the very last line of /etc/rc.conf for the whole thing to work. This same thing has worked fine for me on FreeBSD 12, 13-CURRENT, and now 13-RELEASE.
 

bakul

Member

Reaction score: 8
Messages: 27

absolutely needs to be the very last line of /etc/rc.conf for the whole thing to work
I have the following in the middle of file. rc.conf contains just a set of variables. I don't think the order matters.
Code:
kld_list="ig4 iichid amdgpu amdsmb amdtemp linux64 linux"
 

astyle

Member

Reaction score: 11
Messages: 44

I have the following in the middle of file. rc.conf contains just a set of variables. I don't think the order matters.
Code:
kld_list="ig4 iichid amdgpu amdsmb amdtemp linux64 linux"
After looking at my config some more, I realized that what matters is that order does matter for the amdgpu.ko - it's in /boot/modules/ directory, not /boot/kernel/. And somehow, the UEFI workaround to disable the framebuffer was not needed on my system.
 
Top