Solved X doesn't work (amdgpu)

I have an RX 570 (using the amdgpu driver). X doesn't work, when I try to run startx it gives an "Assertion failed" error, followed by a backtrace. This happens when using the amdgpu X driver (from xf86-video-amdgpu). If I use the modesetting driver it works, but I would like to get the amdgpu driver to work, since afaik the it is better because it uses KMS.

More details:
* dmesg
* pciconf
* pkg info
* xorg.conf
* xorg log
* startx output

PS: I installed xorg-server through the ports since the binary version uses udev.
 
If I use the modesetting driver it works, but I would like to get the amdgpu driver to work, since afaik the it is better because it uses KMS.
I believe you got that backwards. The modesetting(4) driver uses KMS:
Code:
DESCRIPTION
       modesetting is an Xorg driver for KMS devices.  This driver supports
       TrueColor visuals at framebuffer depths of 15, 16, 24, and 30. RandR
       1.2 is supported for multi-head configurations. Acceleration is
       available through glamor for devices supporting at least OpenGL ES 2.0
       or OpenGL 2.1.  If glamor is not enabled, a shadow framebuffer is
       configured based on the KMS drivers' preference (unless the framebuffer
       is 24 bits per pixel, in which case the shadow framebuffer is always
       used).
 
Oh, sorry for not saying that; I followed the steps on the wiki already, installed drm-kmod, added hw.syscons.disable=1 to /boot/loader.conf (since I use EFI) and added kld_list="/boot/modules/amdgpu.ko" to /etc/rc.conf.
 
So which driver is better? Should I try to get the amdgpu to work or should I just use modesetting?
I was reading the man pages for modesetting and amdgpu. I couldn't find a VariableRefresh option for the modesetting driver. Does this mean that it doesn't support VRR?
 
. I couldn't find a VariableRefresh option for the modesetting driver.
Option is already detected, no need.
Code:
[   846.074] (**) AMDGPU(0): Option "TearFree" "true"
[   846.074] (**) AMDGPU(0): Option "VariableRefresh" "true"
 
FWIW, I have Ryzen 3500 based laptop. I don’t even have an xorg.conf and everything works fine. I am using the xf86-video-amdgpu driver. My advice would be to move your existing xorg.conf out of the way and try.
 
So which driver is better? Should I try to get the amdgpu to work or should I just use modesetting?
I was reading the man pages for modesetting and amdgpu. I couldn't find a VariableRefresh option for the modesetting driver. Does this mean that it doesn't support VRR?
Hello!

On this very machine I am writing this message on, I have RX570 running. I have tried both, the modesetting and the driver and measured the speed with benchmarks/glmark2. The difference is minimal, just around 1% and may very well be just the measurement error.

As it ha been said - you need to load the DRM first.

For diagnostics, run kldstat|grep amd

The output should look something like this:

Code:
 5    1 0xffffffff81f21000   24f2c4 amdgpu.ko
11    1 0xffffffff8221f000     816b amdgpu_polaris10_mc_bin.ko
12    1 0xffffffff82228000     4431 amdgpu_polaris10_pfp_2_bin.ko
13    1 0xffffffff8222d000     442f amdgpu_polaris10_me_2_bin.ko
14    1 0xffffffff82232000     242f amdgpu_polaris10_ce_2_bin.ko
15    1 0xffffffff82235000     5d4d amdgpu_polaris10_rlc_bin.ko
16    1 0xffffffff8223b000    40441 amdgpu_polaris10_mec_2_bin.ko
17    1 0xffffffff8227c000    40443 amdgpu_polaris10_mec2_2_bin.ko
18    1 0xffffffff822bd000     332f amdgpu_polaris10_sdma_bin.ko
19    1 0xffffffff822c1000     3331 amdgpu_polaris10_sdma1_bin.ko
20    1 0xffffffff822c5000    5bc0d amdgpu_polaris10_uvd_bin.ko
21    1 0xffffffff82321000    28d2d amdgpu_polaris10_vce_bin.ko
22    1 0xffffffff8234a000    1fe61 amdgpu_polaris10_k_smc_bin.ko
 
Oh, sorry for not saying that; I followed the steps on the wiki already, installed drm-kmod, added hw.syscons.disable=1 to /boot/loader.conf (since I use EFI) and added kld_list="/boot/modules/amdgpu.ko" to /etc/rc.conf.
I can confirm that with FreeBSD 13.0 (and new loader) the hw.syscons.disable=1 is not needed any more. You can see the boot on console.
 
FWIW, I have Ryzen 3500 based laptop. I don’t even have an xorg.conf and everything works fine. I am using the xf86-video-amdgpu driver. My advice would be to move your existing xorg.conf out of the way and try.
If I remove my xorg.conf Xorg does work, but that's because it uses the modesetting driver instead of xf86-video-amdgpu
 
You need both the kernel loadable module as well as what X uses. The module path you see when you do grep amdgpu_drv /var/log/Xorg.0.log, comes from the xf86-video-amdgpu pkg.
 
The modesetting driver has massive tearing, so I would still like to get xf86-video-amdgpu to work.
You need both the kernel loadable module as well as what X uses. The module path you see when you do grep amdgpu_drv /var/log/Xorg.0.log, comes from the xf86-video-amdgpu pkg.
I have the amdgpu kernel module installed (from drm-kmod) and I have the module loaded as well.
 
I have an RX 570 (using the amdgpu driver). X doesn't work, when I try to run startx it gives an "Assertion failed" error, followed by a backtrace. This happens when using the amdgpu X driver (from xf86-video-amdgpu). If I use the modesetting driver it works, but I would like to get the amdgpu driver to work, since afaik the it is better because it uses KMS.

More details:
* dmesg
* pciconf
* pkg info
* xorg.conf
* xorg log
* startx output

PS: I installed xorg-server through the ports since the binary version uses udev.
I assume, it's going to be a common case for everyone upgrading to 13.0-RELEASE. I couldn't use GNOME until I disabled radeonkms in /etc/rc.conf. This upgarde left me crashing Firefox and just one monitor for use. Well, desktop gets in trouble every upgrade, because it depends on hundreds of other packages. That's very unfortunate.
 
The issue was that I installed FreeBSD on a USB stick, and some files got corrupted. I reinstalled it and Xorg now works fine with the xf86-video-amdgpu driver.
 
Back
Top