HowTo: Getting Your Radeon Card Working with KMS

The new KMS module for Radeon cards has been out for some time and naturally everyone wants a seat on the bandwagon. There have been many questions related to this topic on the Forums, and for the sake of brevity, please make sure you have checked these before asking Radeon-related X.Org questions. Complete each step, or otherwise investigate the reasons why the particular step did not complete correctly.

Please note: Getting to your display manager, but NOT being able to login is not a Radeon_KMS error, but rather an issue with the particular desktop you are trying to use. Try different desktops in this case.

STEPS TO CHECK:
  • The Radeon_KMS code is available in HEAD, stable/10 (and 10.1) and stable/9. The best support is in 11-CURRENT. but that may be a bit unstable for novice FreeBSD users. Review this table to find the status of your GPU, and be aware that Radeon HD7000-series cards and newer are not yet supported.
  • Install x11-drivers/xf86-video-ati, but preferably build your own ports for this until you get reasonable stability on the system. Some clues as to why you should build your own are in the option comments below. To build your own port, enable these in your /etc/make.conf:
    Code:
    # Needed for llvm support on KMS drivers
    WITH_GALLIUM=yes
    # Options below this are debatable. Some systems seem to need it, while others do not.
    # Provides newer version dri & libGL
    WITH_NEW_MESA=yes
    
    # Disables NVidia in graphics/libdrm, graphics/libGL
    WITHOUT_NOUVEAU=yes
    
    # Newer Xorg. Some confusion about this, see below.
    WITH_NEW_XORG=yes
  • Edit your /etc/X11/xorg.conf so that you now have only minimal options. For example, keep only the keyboard layout, mouse settings, etc. Leave out video card and screen settings.
  • Stop using syscons and move to vt(8). Why? Because if anything goes wrong you will have no chance to interact with the system. The screen will freeze and you'll end up rebooting. No one can help you without meaningful information about what went wrong: echo >> "kern.vty=vt" /boot/loader.conf.
  • Don't place anything in /etc/rc.conf that starts Xorg automatically. First get to a vt console, then progress upwards. After the system boots, login to tty* and start the Xorg display manager (gdm/kdm/slim) with service onestart.
  • If anything went wrong in the above step, use ctrl+alt+F* to go back to tty and go through the /var/log file named Xorg.0.log and also the latest display manager log file. The entire log file is not of much interest. Only lines marked (EE) or to lesser extent (WW) are of interest to solving the problem.
  • If everything went as intended, from any tty*, you should be able to see something like below. If you do not see this, Xorg.0.log should hold clues as to why not.
# kldstat | grep radeonkms
Code:
17  1 0xffffffff8143d000 108c67  radeonkms.ko
24  1 0xffffffff8159a000 ac6  radeonkmsfw_RS780_pfp.ko
25  1 0xffffffff8159b000 55c6  radeonkmsfw_RS780_me.ko
26  1 0xffffffff815a1000 dc6  radeonkmsfw_R600_rlc.ko
or
Code:
19  1 0xffffffff81fc0000 189d  radeonkmsfw_JUNIPER_pfp.ko
20  1 0xffffffff81fc2000 1ca6  radeonkmsfw_JUNIPER_me.ko
21  1 0xffffffff81fc4000 1325  radeonkmsfw_JUNIPER_rlc.ko
  • Do not add any of the above kernel modules to your /boot/loader.conf. This may cause unstability. Let the Xorg service start process load and manage those modules.
COMMON ERRORS:
These errors are insignificant and have no relation to the problem:
Code:
(WW) Falling back to old probe method for vesa
(WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
This error is solved by installing devel/llvm34. It should have automatically been installed, but may not have been.
Code:
(EE) AIGLX error: dlopen of /usr/local/lib/dri/r600_dri.so failed
(Shared object "libLLVM-3.4.so" not found, required by "r600_dri.so")
For detailed explanation about WITH_NEW_XORG (and why you should enable it for now), see (2) at the very bottom of https://wiki.freebsd.org/Graphics/WITH_NEW_XORG.

With thanks to wblock@ and adamk.
 
Back
Top