📜 ⬆️ ⬇️

Open replacement ati-drivers

The news “AMD stops supporting R300-R500 chips” and the policy of ati-drivers made me think about switching to a free driver.
Therefore, I want to tell you how I did it in gentoo, because on the gentoo-wiki I did not find similar how-to, and in the docs section on gentoo.org, the information requires serious corrections.
After some effort, I managed to get a working system on xf86-video-ati with 3D and compositing.

So, what did not suit me?
1) fglrx makes disable the RCU preemption in the kernel. And I want to use it, because RCU has a positive effect on system performance and scalability.
2) fglrx conflicts with virtualization going with the kernel, and I would like to play with kvm.
3) fglrx is closed, as a consequence of “runtime text relocations” in its libraries; and in general, in my opinion, it somehow gets out of the linux ideology, because the driver dictates some of its own conditions.
4) it is also worth noting that fglrx is “friendly” by no means with all the cores, for example, it often “lags behind” the latest versions.

What do we have?
Device: Radeon X850 PRO (R480) (PCIE)
Gentoo Linux ~ amd64

It’s just to change head-to-head to change to xorg.conf fglrx with ati, remove the necessary modules and make eselect opengl set xorg-x11 not successful. Need more fine-tuning X + as it turned out, the latest versions of libraries x11.
')
What needs to be done to make it work?
1) /etc/make.conf
USE="... dri xcomposite ... "
VIDEO_CARDS="radeon"

In the kernel we assemble (built-in or modular) agpgart and DRM -> Radeon (for example)

2) then through layman (if not installed, then emerge layman), turn on x11 overlay:
layman -a x11

and unmask the packages:
ln -s /usr/portage/layman/x11/profiles/package.mask /etc/portage/package.unmask/x11

after which we do:
emerge -uDN world

However, it is worth noting that the builds from this overlay are not exactly perfect.
I, for example, did not want to pack a pixman package.
Therefore, such non-critical packages can be excluded from
/etc/portage/package.unmask/x11
Although with the help of a crutch I put it exactly pixman-9999 (to whom I can be interested to tell how, but in general it is not essential, for everything works with the old version of pixman).
This is perhaps the only negative point that I met, and I think
these are temporary ebuild issues that will be fixed in the near future.
So, the system is assembled, it is time to tune xorg.

3) xorg.conf
Section "ServerFlags"
Option "AllowMouseOpenFail" "true"
Option "IgnoreABI" "on"
Option "AIGLX" "true"
EndSection

Section "Module"
Load "glx"
Load "extmod"
Load "dbe"
Load "freetype"
Load "dri"
Load "drm"
Load "ddc"
Load "vbe"
EndSection

Section "Device"
BoardName "Radeon X850 PRO (R480) (PCIE)"
Driver "ati"
Identifier "Device[0]"
Screen 0
VendorName "ATI"
Option "XAANoOffscreenPixmaps" "true"
Option "ColorTiling" "on"
Option "AccelMethod" "EXA"
Option "DMAForXv" "true"
Option "EnablePageFlip" "on"
#Option "AGPFastWrite" "yes"
Option "DynamicClocks" "on"
EndSection

Section "DRI"
Mode 0666
EndSection

Section "Extensions"
Option "Composite" "true"
Option "DAMAGE" "true"
Option "RENDER" "true"
EndSection


If you have not yet removed ati-drivers, then do
eselect opengl set xorg-x11


Run X's and enjoy the working driver! :)
glxinfo:
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes

/var/log/Xorg.0.log:
(**) AIGLX enabled
(II) AIGLX: enabled GLX_MESA_copy_sub_buffer
(II) AIGLX: enabled GLX_SGI_make_current_read
(II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control
(II) AIGLX: enabled GLX_texture_from_pixmap with driver support
(II) AIGLX: Loaded and initialized /usr/lib64/dri/r300_dri.so
...
(II) Loading extension XFree86-DRI
(II) Loading extension DRI2
(II) RADEON(0): [dri] Found DRI library version 1.3.0 and kernel module version1.29.0
(II) RADEON(0): [DRI] installation complete

glxgears:
23590 frames in 5.0 seconds = 4717.968 FPS

In conclusion, I note that yes, the number of fps is slightly worse than in the drivers from amd, but this card + open-source driver can do quite well with the tasks that I need.
Yes, and xf86-video-ati will develop further, and support for my card with ati-drivers will stop.
So I have already made my choice towards fully open source software.

Source: https://habr.com/ru/post/54874/


All Articles