We are still actively working on the spam issue.

Difference between revisions of "Radeon"

From InstallGentoo Wiki
Jump to: navigation, search
(Building)
 
(40 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[File:Xf86-video-ati.png|thumb|Xf86-video-ati]]
+
[[File:Xf86-video-ati.png|thumb]]
  
Radeon is the GNU/Linux open source graphics driver for AMD/ATI Radeon graphics cards that is often replaced by fglrx due to seemingly poor 3D acceleration. This guide will attempt to fix this, mostly by making use of the new feature-set, namely, DRI3.
+
Radeon is part of the [[GNU/Linux|Linux]] open-source graphics driver stack for AMD/ATI Radeon graphics cards that is often replaced by fglrx, the proprietary alternative, due to seemingly poor 3D acceleration and threading (soon to be provided by Mesa).  
  
''Disclaimer: This is quite bleeding edge and might not work. Should it fail, you will be on your own.
+
The stack consists of xf86-video-ati, mesa, and, for some older cards, llvm (to compile the shaders). Some cards support the new AMDGPU driver that replaces this one, as well as mesa.
''
+
 
== Before starting ==
+
==Building from source==
 +
{{warning|''This is quite bleeding edge and might not work. Should it fail, you will be on your own.''}}
 +
 
 +
=== Before starting ===
 
Check your cards feature-set: https://wiki.freedesktop.org/xorg/RadeonFeature/#index6h2
 
Check your cards feature-set: https://wiki.freedesktop.org/xorg/RadeonFeature/#index6h2
 
"''Decoder ring for engineering vs marketing names''" will tell you what model your card actually is.
 
"''Decoder ring for engineering vs marketing names''" will tell you what model your card actually is.
  
Back your xorg.conf up by issuing '''''sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf~'''''
+
Back your xorg.conf up by issuing {{ic|<nowiki>sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf~</nowiki>}}
 
 
=== What should I expect? ===
 
Run: '''''vblank_mode=0 glxgears & sleep 16 ; killall glxgears'''''
 
 
 
 
 
{| class="wikitable" style="margin: 1em auto 1em auto;"
 
|-
 
! Test
 
! GPU
 
! Before
 
! After
 
|-
 
| glxgears
 
| r9 280x (gigabyte)
 
| 3258.964 FPS
 
| 19291.922 FPS
 
|}
 
 
 
 
 
glxgears is a very simple test and it won't give you real world results, but you can use it to test a driver's 3D performance relative to another one. As you can see here, the results speak for themselves and indicate a performance increase of roughly 560%. For a real-world focused benchmark, scroll down.
 
 
 
== Requirements & dependencies ==
 
X.Org Server 1.17 (not absolutely necessary, but recommended for stability)
 
media-libs/mesa (the newest version you can find, I recommend the latest one: scroll down the page for more on this)
 
<pre>
 
  `--  media-libs/mesa  (>=11.0, preferably -git[http://www.x.org/wiki/radeonBuildHowTo/])
 
  `--  x11-libs/libdrm  (>=2.4.58, preferably -git[http://www.x.org/wiki/radeonBuildHowTo/])
 
  `--  x11-libs/libpciaccess (>=0.8.0)
 
  `--  x11-base/xorg-server (ideally, >=1.17)
 
  `--  x11-libs/glamor (>=0.6)
 
  `--  virtual/udev
 
  `--  x11-proto/fontsproto
 
  `--  x11-proto/randrproto
 
  `--  x11-proto/renderproto
 
  `--  x11-proto/videoproto
 
  `--  x11-proto/xextproto
 
  `--  x11-proto/xf86driproto
 
  `--  x11-proto/xproto
 
  `--  sys-devel/automake  (>1.15)
 
  `--  sys-devel/autoconf  (>=2.69)
 
  `--  sys-devel/libtool  (>=2.4)
 
  `--  sys-devel/m4
 
  `--  x11-misc/util-macros  (>=1.18)
 
  `--  media-fonts/font-util  (>=1.2.0)
 
  `--  virtual/pkgconfig
 
  `--  x11-proto/glproto
 
  `--  x11-proto/dri2proto
 
  `--  x11-proto/dri3proto
 
  `--  x11-proto/xineramaproto
 
</pre>
 
 
 
Note: apt and yum users need only run <code>sudo apt-get build-dep xserver-xorg-video-ati</code> and <code>sudo yum-builddep xorg-x11-drv-ati</code> respectively, to build the dependencies automagically. Arch users can install <code>xf86-video-ati</code> package to satisfy all dependencies, and portage users need only emerge the actual driver to fulfil all the dependencies.
 
 
 
== Building ==
 
# git clone git://anongit.freedesktop.org/xorg/driver/xf86-video-ati
 
# cd xf86-video-ati
 
# ./autogen.sh --prefix=/opt/xorg
 
# make
 
# sudo make install
 
 
 
Afterwards, <code>sudo vim /etc/X11/xorg.conf</code>
 
<pre>
 
    Section "Files"
 
            ModulePath "/opt/xorg/lib/xorg/modules,/usr/lib/xorg/modules"
 
    EndSection
 
</pre>
 
  
Make sure you have these as well:
+
=== Requirements & dependencies ===
 +
`--  media-libs/mesa  (>=11.0, preferably -git as this will have a major effect on performance, more so than this component<sup>[http://www.x.org/wiki/radeonBuildHowTo/]</sup>)
 +
`--  x11-libs/libdrm  (>=2.4.58, preferably -git<sup>[http://www.x.org/wiki/radeonBuildHowTo/]</sup>, since this is the library DRI uses)
 +
`--  x11-libs/libpciaccess (>=0.8.0)
 +
`--  x11-base/xorg-server (ideally, >=1.17)
 +
`--  x11-libs/glamor (>=0.6)
 +
`--  virtual/udev
 +
`--  x11-proto/fontsproto
 +
`--  x11-proto/randrproto
 +
`--  x11-proto/renderproto
 +
`--  x11-proto/videoproto
 +
`--  x11-proto/xextproto
 +
`--  x11-proto/xf86driproto
 +
`--  x11-proto/xproto
 +
`--  sys-devel/automake  (>1.15)
 +
`--  sys-devel/autoconf  (>=2.69)
 +
`--  sys-devel/libtool  (>=2.4)
 +
`--  sys-devel/m4
 +
`--  x11-misc/util-macros  (>=1.18)
 +
`--  media-fonts/font-util  (>=1.2.0)
 +
`--  virtual/pkgconfig
 +
`--  x11-proto/glproto
 +
`--  x11-proto/dri2proto
 +
`--  x11-proto/dri3proto
 +
`--  x11-proto/xineramaproto
  
<pre>
+
Certain package managers can automatically build the dependency tree for you. However, you ought to double check to make sure the above requirements coincide, in terms of versions.
  Section "Module"
 
          Load "dri"
 
          Load "dbe" # Double buffer extension // See compatibility on features page
 
          Load "glx" # OpenGL X protocol interface // See compatibility on features page
 
          Load "extmod" # Misc. required extension // See compatibility on features page
 
  EndSection
 
   
 
    Section "DRI"
 
            Group        "video"
 
            Mode        0666
 
    EndSection
 
</pre>
 
  
Then, <code>sudo vim /etc/X11/xorg.conf.d/20-radeon</code>
+
* '''''Aptitude:''''' run {{ic|sudo apt-get build-dep xserver-xorg-video-ati}};
<pre>
+
* '''''Yum:''''' run {{ic|sudo yum-builddep xorg-x11-drv-ati}};
  Section "Device"
+
* '''''Portage:''''' emerge the actual driver to satisfy all dependencies;
          Identifier "radeonVGA"
+
* '''''BUILDPKG (Arch):''''' run {{ic|sudo makepkg -s xf86-video-ati}}.
                      Driver "radeon"
 
                      Option "AccelMethod" "Glamor" # See compatibility on features page
 
                      Option "DRI3" "on" # Compatibility not very well documented, remove it if it fails
 
                      Option "EnablePageFlip" "On"
 
  EndSection
 
</pre>
 
Feel free to run <code>sudo chattr +i /etc/X11/xorg.conf</code> to keep X from overwriting this (<code>chattr -i</code> will undo this).
 
  
Example xorg.conf: http://pastebin.com/aE3e21Bn
+
=== Compiling ===
 +
# {{ic|git clone git://anongit.freedesktop.org/xorg/driver/xf86-video-ati}}
 +
# {{ic|cd xf86-video-ati}}
 +
# {{ic|<nowiki>./autogen.sh</nowiki>}}
 +
# {{ic|<nowiki>CFLAGS="-O3 -march=native" ./configure --prefix=/opt/xorg</nowiki>}}
 +
# {{ic|make -jn }}, where n is the number of jobs you want to spawn
 +
# {{ic|sudo make install}}
  
'''IMPORTANT''': Recompiling the driver will become a necessity after each major X upgrade (eg: 1.16 --> 1.17, not 1.16 --> 1.16.4), due to ABI changes.
+
Example xorg.conf (compulsory reading, since you need to determine the ModulePath under files): http://pastebin.com/raw/aE3e21Bn
  
== Testing ==
+
{{warning|Recompiling the driver will become a necessity after each major X upgrade (eg: 1.16 --> 1.17, not 1.16 --> 1.16.4), due to ABI changes.}}
To ensure DRI3 is enabled, run <code>cat /var/log/Xorg.0.log | grep -i DRI3</code>.
 
Output should be as follows:
 
<pre>
 
[    14.031] (**) RADEON(0): Option "DRI3" "on"
 
[    16.723] (**) RADEON(0): DRI3 enabled
 
</pre>
 
  
 
== External links ==
 
== External links ==
*[http://www.x.org/wiki/radeonBuildHowTo/ For more info (eg: building libdrm and mesa from source, in this order)]
+
*[http://www.x.org/wiki/radeonBuildHowTo/ For more info (eg: building libdrm and mesa from source)]
*[https://www.phoronix.com/scan.php?page=article&item=radeon-dri3-perf&num=1 More benchmarks]
+
*[https://www.phoronix.com/scan.php?page=article&item=radeon-dri3-perf&num=1 Real world benchmarks]
  
 
[[Category:Software]]
 
[[Category:Software]]
 +
[[Category:Hardware]]
 +
[[Category:HowTo]]
 +
[[Category:Tutorials]]

Latest revision as of 15:39, 14 February 2017

Xf86-video-ati.png

Radeon is part of the Linux open-source graphics driver stack for AMD/ATI Radeon graphics cards that is often replaced by fglrx, the proprietary alternative, due to seemingly poor 3D acceleration and threading (soon to be provided by Mesa).

The stack consists of xf86-video-ati, mesa, and, for some older cards, llvm (to compile the shaders). Some cards support the new AMDGPU driver that replaces this one, as well as mesa.

Building from source

Warning: This is quite bleeding edge and might not work. Should it fail, you will be on your own.

Before starting

Check your cards feature-set: https://wiki.freedesktop.org/xorg/RadeonFeature/#index6h2 "Decoder ring for engineering vs marketing names" will tell you what model your card actually is.

Back your xorg.conf up by issuing sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf~

Requirements & dependencies

`--  media-libs/mesa  (>=11.0, preferably -git as this will have a major effect on performance, more so than this component[1])
`--  x11-libs/libdrm  (>=2.4.58, preferably -git[2], since this is the library DRI uses)
`--  x11-libs/libpciaccess (>=0.8.0)
`--  x11-base/xorg-server (ideally, >=1.17)
`--  x11-libs/glamor (>=0.6)
`--  virtual/udev
`--  x11-proto/fontsproto
`--  x11-proto/randrproto
`--  x11-proto/renderproto
`--  x11-proto/videoproto
`--  x11-proto/xextproto
`--  x11-proto/xf86driproto
`--  x11-proto/xproto
`--  sys-devel/automake  (>1.15)
`--  sys-devel/autoconf  (>=2.69)
`--  sys-devel/libtool  (>=2.4)
`--  sys-devel/m4
`--  x11-misc/util-macros  (>=1.18)
`--  media-fonts/font-util  (>=1.2.0)
`--  virtual/pkgconfig
`--  x11-proto/glproto
`--  x11-proto/dri2proto
`--  x11-proto/dri3proto
`--  x11-proto/xineramaproto

Certain package managers can automatically build the dependency tree for you. However, you ought to double check to make sure the above requirements coincide, in terms of versions.

  • Aptitude: run sudo apt-get build-dep xserver-xorg-video-ati;
  • Yum: run sudo yum-builddep xorg-x11-drv-ati;
  • Portage: emerge the actual driver to satisfy all dependencies;
  • BUILDPKG (Arch): run sudo makepkg -s xf86-video-ati.

Compiling

  1. git clone git://anongit.freedesktop.org/xorg/driver/xf86-video-ati
  2. cd xf86-video-ati
  3. ./autogen.sh
  4. CFLAGS="-O3 -march=native" ./configure --prefix=/opt/xorg
  5. make -jn , where n is the number of jobs you want to spawn
  6. sudo make install

Example xorg.conf (compulsory reading, since you need to determine the ModulePath under files): http://pastebin.com/raw/aE3e21Bn

Warning: Recompiling the driver will become a necessity after each major X upgrade (eg: 1.16 --> 1.17, not 1.16 --> 1.16.4), due to ABI changes.

External links