Fedora 16 Installation Guide: Difference between revisions

From cchtml.com
(hooray edit war! feel free to discuss on the talk page)
No edit summary
 
(89 intermediate revisions by 17 users not shown)
Line 1: Line 1:
= Please consider =
= Installing the Official AMD driver =


The Free Software ''radeon'' driver is making real progress in F16's kernel 3.1 and 3.2, it's expected to get even better in kernel 3.3 and 3.4.
== Introduction ==


The kernel 3.1 driver will easily run desktop compositing (eg: ''gnome-shell'', transparent terminal). It even manages 60fps VSync at 1920x1200 in many 3D games (eg: ''Darkplaces'' Quake engine) with no problems. Depending on your CPU, constant 45fps in 1080p Minecraft is easily doable.
There are two methods to get the Official AMD driver installed on Fedora.  The first is by running the amd-driver-installer package supplied by amd.com.  This method is covered in the section "'''Official AMD Driver Package from Amd.com'''". The second is to use the rpm packages supplied by the rpm fusion repos.  This method is covered in the section "'''Pre-built packages from RPMFusion'''".


It is true that the AMD-supplied driver is the only real choice for running newer games, such as most things you'd buy through Steam, however the Free driver is more than capable for everyday desktop needs such as compositing and most native Linux games. Please research and test your requirements, and consider using the Free Software ''radeon'' driver before installing ATI's non-Free proprietary ''flgrx'' driver.
The sections titled '''Amd-driver-installer Compilation Problems on x86_64 Fedora 16''' and '''Amd-driver-installer Compilation Problems on i686 Fedora 16''' are subject to being resolved by Catalyst updates and therefore may not be relevant to installations after Catalyst version 12.4.


= Pre-built packages from RPMFusion =
== Requirements ==
 
The Amd-driver-installer from Amd.com will work best in most cases if there is no xorg.conf file present before you begin the installation process. Move any existing xorg.conf files out of the /etc/X11 directory before installation.
 
You will need at least version 11.11 (or greater) of the ATI driver for Fedora 16, earlier versions will not work with the version of Xorg that F16 ships with.
 
For Catalyst 12.5 or above, a Radeon HD5000 series (or greater) is required.  Radeon HD 2000/3000/4000 series GPU's will not be recognized by 12.5 Catalyst and above.
 
=== Amd-driver-installer Compilation Problems on x86_64 Fedora 16 ===
 
''Note: This section '''applies directly''' to users using the Official amd-driver-installer package downloaded from amd.com''
 
Due to an upstream sourcecode change in the Fedora ''kernel-headers'' package, building of AMD's ''fglrx'' module will currently fail with kernels 3.2.9-2.fc16 and later.  If you are getting the following error in your /usr/share/ati/fgrlx-install.log:
 
<pre>
 
make[1]: Entering directory `/usr/src/kernels/3.3.0-4.fc16.x86_64'
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o
In file included from /usr/src/kernels/3.3.0-4.fc16.x86_64/arch/x86/include/asm/uaccess.h:575:0,
                from include/asm-generic/termios.h:51,
                from /usr/src/kernels/3.3.0-4.fc16.x86_64/arch/x86/include/asm/termios.h:1,
                from include/linux/termios.h:5,
                from include/linux/tty.h:41,
                from include/linux/vt_kern.h:11,
                from /lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.c:35:
/usr/src/kernels/3.3.0-4.fc16.x86_64/arch/x86/include/asm/uaccess_64.h: In function ‘copy_from_user’:
/usr/src/kernels/3.3.0-4.fc16.x86_64/arch/x86/include/asm/uaccess_64.h:57:7: error: called object ‘2’ is not a function
make[2]: *** [/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o] Error 1
make[1]: *** [_module_/lib/modules/fglrx/build_mod/2.6.x] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.3.0-4.fc16.x86_64'
make: *** [kmod_build] Error 2
build failed with return value 2
[Error] Kernel Module : Failed to compile kernel module - please consult readme.
</pre>
 
Then this procedure is confirmed to work on 64 bit Fedora 16.
 
Open the file '''/usr/src/kernels/`uname -r`/arch/x86/include/asm/uaccess_64.h''' in a text editor.
 
On line 56 and 57 you will see:
 
<pre>
else
WARN(1, "Buffer overflow detected!\n");
</pre>
 
Comment this out so it reads:
 
<pre>
// else
// WARN(1, "Buffer overflow detected!\n");
</pre>
 
After saving this edit, if you have previously run amd-driver-installer unsuccessfully, you will need
to run /usr/share/ati/fgrlx-uninstall.sh to reset the system to previous starting conditions.  Now follow
the procedure in the section below titled "Official AMD Driver Package from Amd.com".
 
* Reference: http://forums.fedoraforum.org/showthread.php?t=277547
 
=== Amd-driver-installer Compilation Problems on i686 Fedora 16 ===
 
''Note: This section '''applies directly''' to users using the Official amd-driver-installer package downloaded from amd.com''
 
The following is a procedure that has been confirmed to work with i686 Fedora users.
If you are getting the following message in your /usr/share/ati/fglrx-install.log:
 
<pre>
 
[Message] Kernel Module : Found kernel module build environment, generating kernel module now.
AMD kernel module generator version 2.1
doing Makefile based build for kernel 2.6.x and higher
rm -rf *.c *.h *.o *.ko *.a .??* *.symvers
make -C /lib/modules/3.2.9-1.fc16.i686/build SUBDIRS=/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: Entering directory `/usr/src/kernels/3.2.9-1.fc16.i686'
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘KCL_fpu_begin’:
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:5804:28: error: ‘TS_USEDFPU’ undeclared (first use in this function)
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:5804:28: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o] Error 1
make[1]: *** [_module_/lib/modules/fglrx/build_mod/2.6.x] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.2.9-1.fc16.i686'
make: *** [kmod_build] Error 2
build failed with return value 2
[Error] Kernel Module : Failed to compile kernel module - please consult readme.
[Reboot] Kernel Module : dracut
 
</pre>
 
Then the following procedure should work for you.
 
Procedure is as follows:
 
 
1)  Extract amd-driver-installer into subdir.  Example:
 
chmod 700 amd-driver-installer-{{catalystdashversion}}-x86.x86_64.run
./amd-driver-installer-{{catalystdashversion}}-x86.x86_64.run --extract fglrx-12.2
 
2)  cd into directory containing firegl_public.c.  i.e.,
   
<pre>
cd  fglrx-12.2/common/lib/modules/fglrx/build_mod/
</pre>
 
3) In that dir, open a text editor, copy the following code and save to a file named "fglrx.patch":
 
<pre>
 
fixed fgrlx compilation error on 32-bit x86 arch with kernel 3.3-rc4 due to commit:
https://github.com/torvalds/linux/commit/f94edacf998516ac9d849f7bc6949a703977a7f3
later modified (in 3.3-rc5) by commit:
https://github.com/torvalds/linux/commit/7e16838d94b566a17b65231073d179bc04d590c8#diff-1
and finally backported to kernel 3.2.8.
 
Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
---
firegl_public.c |    6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
 
diff --git a/firegl_public.c b/firegl_public.c
index 6e0aa82..cb9e217 100644
--- a/firegl_public.c
+++ b/firegl_public.c
@@ -5797,10 +5797,16 @@ void ATI_API_CALL KCL_fpu_begin(void)
#ifdef CONFIG_X86_64
    kernel_fpu_begin();
#else
+#ifndef TS_USEDFPU
+    preempt_disable();
+    if (__thread_has_fpu(current))
+        __save_init_fpu(current);
+#else
    struct thread_info *cur_task = current_thread_info();
    preempt_disable();
    if (cur_task->status & TS_USEDFPU)
        __save_init_fpu(cur_task->task);
+#endif
    else
        clts();
#endif
--
1.7.5.4
 
</pre>
 
 
4)  Run the patch on firegl_public.c :
 
 
<pre>
su-
 
patch -p1 < ./fglrx.patch
 
</pre>
 
5)  At this point, if you have previously run amd-driver-installer unsuccessfully, you
need to return the system to it's starting state by running /usr/share/ati/fglrx-uninstall.sh.
Then, make sure you follow the directives in the section below titled
"Installation Prep for Amd-Driver-Installer".  After you have completed that checklist,
you can now run ati-installer.sh from the extraction subdir (in this case "fglrx-12.2")
using the following command line:
 
<pre>
su -
 
/bin/sh ./ati-installer.sh 8.95 --install
 
</pre>
 
From here you should have a successful Fglrx installation.
 
*Reference: http://phoronix.com/forums/showthread.php?68922-Patch-to-compile-fgrlx-module-on-Linux-3-3-rc4-with-x86-32-bit-arch
 
=== Multiple Monitor Setups ===
 
If you have an existing multiple monitor setup, move your existing xorg.conf to a safe place.  Let amd-driver-installer  generate a fresh working xorg.conf file for you based on what it probes from EDID monitor info. If you are having difficulties after generating a new xorg.conf, use your old xorg.conf as a reference and transfer sections of that file as needed to the new one.
 
Here are some resources for those having difficulty getting their multiple monitors running:
 
* http://www.thinkwiki.org/wiki/Xorg_RandR_1.2
* http://wiki.debian.org/XStrikeForce/HowToRandR12
* aticonfig --help
* One of the [[Ubuntu]] guides on this Wiki.
* AMD's own Catalyst documentation
 
If you need to start with a clean slate and all your monitors are connected, you can force a fresh xorg.conf to be generated taking into account the monitors present:
 
<pre>
su -
aticonfig --initial -f
</pre>
 
== Pre-built packages from RPMFusion ==
 
''Note: This section '''does not''' apply to users using the Official amd-driver-installer package downloaded from amd.com''


'''RECOMMENDED METHOD'''
'''RECOMMENDED METHOD'''
Line 13: Line 209:
This is easier than manually building the driver from AMD as you don't need to worry about passing kernel options via GRUB2, configuring DKMS, rebuilding the kernel module every time you do a kernel upgrade, or cleaning up any mess if you want to remove the driver.
This is easier than manually building the driver from AMD as you don't need to worry about passing kernel options via GRUB2, configuring DKMS, rebuilding the kernel module every time you do a kernel upgrade, or cleaning up any mess if you want to remove the driver.


=== Clean up previous AMD-supplied driver installation ===
=== Clean up previous Offical AMD driver installation ===


If you're coming from the AMD-supplied driver to RPMFusion's driver, you'll need to reinstall this package as the AMD driver installation changes files it contains.
If you're coming from the Official AMD driver to RPMFusion's AMD driver, you'll need to reinstall the ''mesa-libGL'' package as the Official AMD driver installation changes files it contains.


<pre>
<pre>
su -
su -
yum reinstall mesa-libGL
yum reinstall mesa-libGL
</pre>
=== Other issues before install driver ===
On Acer Aspire 722 (A0722) with Radeon HD 6290 (and i suppose on other machines with the same card) you must disable SELinux or the follow error will occured :
<pre>
SELinux is preventing gnome-session-c from execmod access on the file /usr/lib/dri/fglrx_dri.so. For complete SELinux messages run sealert -l <SELinux alert id>
</pre>
To disable SELinux open /etc/selinux/config file as root and set SELINUX to disabled (SELINUX=disabled).
After that driver will work as expected.<br>
<b>Note:</b> Disabling SELinux is not a very good idea. It's better to just modify the policy, by running these two commands (as root):
<pre>semanage fcontext -a -t textrel_shlib_t '/usr/lib/dri/fglrx_dri.so'
restorecon -v '/usr/lib/dri/fglrx_dri.so'</pre>
'''glxinfo'''
<pre>
direct rendering : Yes
...
OpenGL vendor string : Advanced Microd Devices Inc.
OpenGL render string : AMD Radeon HD 6290 Graphics
...
</pre>
</pre>


Line 51: Line 267:
''' Kernel module packages '''
''' Kernel module packages '''


Note that there are individual ''kmod-catalyst-'' packages which supply kernel modules for specific Fedora kernel versions. If you are using these and you upgrade the kernel without upgrading the ''kmod-catalyst-'' package, loading the proprietary driver will fail and you'll revert back to the free ''radeon'' graphics driver. Sometimes there is a day or so between Fedora upgrading their kernel and RPMFusion building a new kmod package.
Note that there are individual ''kmod-catalyst-'' packages in RPMFusion which supply kernel modules for specific Fedora kernel versions. If you use these and you upgrade the kernel without upgrading the ''kmod-catalyst-'' package, loading the proprietary driver will fail and you'll revert back to the Free ''radeon'' graphics driver. Sometimes there is a day or so between Fedora upgrading their kernel and RPMFusion building a new ''kmod-catalyst-'' package.
 
The ''akmod-catalyst'' package we installed above automatically builds a new kernel module at boot-time when the kernel is upgraded, so you'll never have to worry about this.
 
== Official AMD Driver Package from Amd.com==
 
''Note: This section '''applies directly''' to users using the Official amd-driver-installer package downloaded from amd.com''
 
=== Installation Prep for Amd-Driver-Installer ===
 
The script from AMD builds the kernel module and a set of modules for XOrg. The Official AMD installer requires some development packages to be installed:


The ''akmod-catalyst'' package we installed above automatically builds a new kernel module at boot-time when the kernel is upgraded, so you never have to worry about this.
<pre>
su -
yum install kernel-devel kernel-headers gcc gcc-c++
</pre>


= Official AMD Driver =
There can be only one copy of ''kernel-devel'' and it needs to match the running kernel. Same applies to
''kernel-headers''.  "Yum update" will always ensure that there's one latest copy of ''kernel-headers'', but
it does not do that for ''kernel-devel'', so you need to look at that yourself.  The running kernel
should be the latest one available on the update repos.  Check your current kernel version with:


=== Requirements ===
<pre>
uname -a
</pre>


At F16's release, the ATI driver did not support the version of X.Org that Fedora shipped with. This has been resolved in Catalyst 11.11 onwards. You will need version 11.11 of the ATI driver or later for F16, earlier versions will not work.
Check all installed kernel packages with


=== Preinstall required packages ===
<pre>
su -
rpm -qa | grep kernel
</pre>


The script from AMD builds a kernel module which loads AMD's proprietary binary blob, so we're going to install some development packages.
Remove any ''kernel-devel'' packages which do not match the latest installed kernel version. Example:


<pre>
<pre>
su -
su -
yum install kernel-devel kernel-headers gcc gcc-c++
rpm -ev --nodeps kernel-devel-3.2.9-1.fc16.x86_64
</pre>
</pre>


If you're on 64-bit you may also have to install this package too.
Note we are careful to specify the exact package name that was given to us by the rpm command above.
(''you need this for 64-bit nVidia drivers so I had it installed anyway, could someone please confirm/deny this requirement?'')
 
Boot into the latest kernel before continuing. Building the module on a kernel which you don't have ''-devel'' packages for will fail. Building the module on one kernel then booting into another will result in the compiled module not working.
 
Most users that are installing the Official Amd-driver-installer are looking for maximum performance with direct rendering
and OpenGL performance.  Amd-driver-installer requires that Mesa libraries be in place before it's installed, as it replaces
some of those libraries.  Therefore if you are a Crossover or Wine user, the mesa lib set will need to be in place before you
run the installer.  The following is a working example pulled from a known-good Fedora 16 x86_64 platform running Crossover:


<pre>
<pre>
su -c
su -
yum install glibc-devel
yum install mesa-dri-filesystem.i686 mesa-libGL.x86_64 mesa-dri-drivers.x86_64 mesa-libGL.i686
mesa-dri-filesystem.x86_64 mesa-libEGL.x86_64 mesa-dri-drivers.i686 mesa-libGLU.x86_64
</pre>
</pre>
Note that Crossover and Wine are 32 bit and therefore require i686 mesa libs in conjunction with the 64 bit versions.
From here, you should be ready to run the Official Amd-driver-installer.


=== Download driver ===
=== Download driver ===


Download the appropriate driver from http://support.amd.com/
Download the driver for your particular card from http://support.amd.com/


It will be called something like ''ati-driver-installer-version.run''.
  wget http://www2.ati.com/drivers/linux/amd-driver-installer-{{catalystdashversion}}-x86.x86_64.zip
  unzip amd-driver-installer-{{catalystdashversion}}-x86.x86_64.zip


=== Install driver ===
=== Install driver ===
Line 88: Line 337:
Run the file as root in the ''sh'' shell.
Run the file as root in the ''sh'' shell.


<pre>
su -
su -
chmod 700 amd-driver-installer-{{catalystdashversion}}-x86.x86_64.run
chmod +x ati-driver-installer-version.run
sh ./amd-driver-installer-{{catalystdashversion}}-x86.x86_64.run
sh ./ati-driver-installer-version.run
</pre>


Select the default install, do not generate distribution packages.
Select the default install, do not generate distribution packages.
Line 98: Line 345:
=== Confirming Installation ===
=== Confirming Installation ===


Check the build install log.
Check the build install log:


<pre>tail /usr/share/ati/fglrx-install.log</pre>
<pre>tail /usr/share/ati/fglrx-install.log</pre>


You should see data confirming the module build worked.
You should see data confirming the module build worked:


<pre>build succeeded with return value 0
<pre>build succeeded with return value 0
Line 108: Line 355:
done.</pre>
done.</pre>


=== Generate a new xorg.conf ===
=== Uninstalling Official AMD driver ===


This should do fine for most people.
Run AMD's uninstall script:


<pre>
<pre>
su -
su -
aticonfig --initial -f
sh /usr/share/ati/fglrx-uninstall.sh
</pre>
</pre>


If you have multiple monitors or X2 cards then you'll need to do some other stuff. Try ''man aticonfig'', read the Catalyst documentation, or check one of the [[Ubuntu]] guides for the correct syntax.
The following steps are not strictly required because the amd-driver-installer is written to put all files back as they were before the install. One set of files that amd-driver-installer alters is the mesa library set. To be sure of a mint-condition installation (especially if you are upgrading to the next Official driver version) reinstall the following package:


=== Uninstalling AMD-supplied driver ===
<pre>
su -
yum reinstall mesa-libGL
</pre>


Run AMD's uninstall script.
For those running Wine or Crossover from Codeweavers.com, the following command will reinstall all the mesa libraries that (should) be on your system. This example is for users running Wine/Crossover on a 64 bit system:


<pre>
<pre>
su -
su -
sh /usr/share/ati/amd-uninstall.sh
yum reinstall mesa-dri-filesystem.i686 mesa-libGL.x86_64 mesa-dri-drivers.x86_64 mesa-libGL.i686
mesa-dri-filesystem.x86_64 mesa-libEGL.x86_64 mesa-dri-drivers.i686 mesa-libGLU.x86_64
</pre>
</pre>


Reinstall this package as the AMD driver installation changes files it contains.
At this point you should be prepped to start a new amd-driver-installer session to get the latest Fglrx version.
 
= Troubleshooting =
 
In the event you install the driver and are greeted with a blank screen or corrupted video signal when starting X, you are able to manually disable the Free Software ''radeon'' driver to troubleshoot.
 
There are two methods to disable radeon module. The first is a two-step process and the other approach is listed below.
 
''Approach #1:''
 
1) Edit the /etc/modprobe.d/blacklist.conf and add radeon to the list.
 
2) Run the following:


<pre>
<pre>
su -
su -
yum reinstall mesa-libGL
/sbin/new-kernel-pkg --package kernel --mkinitrd --dracut --depmod --install $(uname -r)
</pre>
</pre>


= Troubleshooting =
That's it.  This will generate a new initramfs that does not have radeon built in. This method has the advantage of not affecting kernel mode setting as well as not needing any grub edits.  On the next boot, the radeon module should be gone. You can now reboot to console and execute steps in section above titled "''Official AMD Driver Package from Amd.com''"


In the event you install the driver and are greeted with a blank screen or corrupted video signal when starting X, you are able to manually disable the Free Software ''radeon'' driver to troubleshoot.
''Approach #2:''


Turn your system off and on again. On the GRUB boot screen, press '''e''' to edit the default boot entry, scroll down to the kernel line (which begins ''linux''), then press '''e''' again to edit the line.
Turn your system off and on again. On the GRUB boot screen, press '''e''' to edit the default boot entry, scroll down to the kernel line (which begins ''linux''), then press '''e''' again to edit the line.
Line 147: Line 410:
we'll want to edit it so it is
we'll want to edit it so it is


<pre>linux /vmlinuz-3.2.9-1.fc16.x86_64 LANG=en_US.UTF-8 radeon.modeset=0 blacklist=radeon</pre>
<pre>linux /vmlinuz-3.2.9-1.fc16.x86_64 LANG=en_US.UTF-8 radeon.modeset=0 rdblacklist=radeon blacklist=radeon</pre>


These entries do the following:
These entries do the following:
* '''radeon.modeset=0''' disables "Kernel Mode Settting" for the Free Software driver (ie: the driver telling the kernel to setup the screen resolution, instead of XOrg doing it)
* '''radeon.modeset=0''' disables "Kernel Mode Settting" for the Free Software driver (ie: the driver telling the kernel to setup the screen resolution, instead of XOrg doing it)
* '''blacklist=radeon''' stops the kernel from loading the Free Software ''radeon'' driver altogether
* '''rdblacklist=radeon blacklist=radeon''' stops the kernel from loading the Free Software ''radeon'' driver altogether


From here you can manually remove and reinstall the proprietary drivers, either with yum or with PackageKit's ''Add/Remove Software'' application, as desired.
From here you can manually remove and reinstall the proprietary drivers, either with yum or with PackageKit's ''Add/Remove Software'' application, as desired.
In the case when you try to modify grub[background_image/resolution/..], your are greeted with a blank screen or corrupted video signal while starting X. To overcome this, all you need to do is, append the following lines to /etc/default/grub:
<pre>
GRUB_GFXMODE=1280x1024x32
GRUB_GFXPAYLOAD=keep
GRUB_GFXPAYLOAD_LINUX=1280x1024x32
</pre>
and then run:
<pre>
grub2-mkconfig -o /boot/grub2/grub.cfg
</pre>

Latest revision as of 02:08, 27 December 2012

Installing the Official AMD driver

Introduction

There are two methods to get the Official AMD driver installed on Fedora. The first is by running the amd-driver-installer package supplied by amd.com. This method is covered in the section "Official AMD Driver Package from Amd.com". The second is to use the rpm packages supplied by the rpm fusion repos. This method is covered in the section "Pre-built packages from RPMFusion".

The sections titled Amd-driver-installer Compilation Problems on x86_64 Fedora 16 and Amd-driver-installer Compilation Problems on i686 Fedora 16 are subject to being resolved by Catalyst updates and therefore may not be relevant to installations after Catalyst version 12.4.

Requirements

The Amd-driver-installer from Amd.com will work best in most cases if there is no xorg.conf file present before you begin the installation process. Move any existing xorg.conf files out of the /etc/X11 directory before installation.

You will need at least version 11.11 (or greater) of the ATI driver for Fedora 16, earlier versions will not work with the version of Xorg that F16 ships with.

For Catalyst 12.5 or above, a Radeon HD5000 series (or greater) is required. Radeon HD 2000/3000/4000 series GPU's will not be recognized by 12.5 Catalyst and above.

Amd-driver-installer Compilation Problems on x86_64 Fedora 16

Note: This section applies directly to users using the Official amd-driver-installer package downloaded from amd.com

Due to an upstream sourcecode change in the Fedora kernel-headers package, building of AMD's fglrx module will currently fail with kernels 3.2.9-2.fc16 and later. If you are getting the following error in your /usr/share/ati/fgrlx-install.log:


make[1]: Entering directory `/usr/src/kernels/3.3.0-4.fc16.x86_64'
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o
In file included from /usr/src/kernels/3.3.0-4.fc16.x86_64/arch/x86/include/asm/uaccess.h:575:0,
                 from include/asm-generic/termios.h:51,
                 from /usr/src/kernels/3.3.0-4.fc16.x86_64/arch/x86/include/asm/termios.h:1,
                 from include/linux/termios.h:5,
                 from include/linux/tty.h:41,
                 from include/linux/vt_kern.h:11,
                 from /lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.c:35:
/usr/src/kernels/3.3.0-4.fc16.x86_64/arch/x86/include/asm/uaccess_64.h: In function ‘copy_from_user’:
/usr/src/kernels/3.3.0-4.fc16.x86_64/arch/x86/include/asm/uaccess_64.h:57:7: error: called object ‘2’ is not a function
make[2]: *** [/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o] Error 1
make[1]: *** [_module_/lib/modules/fglrx/build_mod/2.6.x] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.3.0-4.fc16.x86_64'
make: *** [kmod_build] Error 2
build failed with return value 2
[Error] Kernel Module : Failed to compile kernel module - please consult readme.

Then this procedure is confirmed to work on 64 bit Fedora 16.

Open the file /usr/src/kernels/`uname -r`/arch/x86/include/asm/uaccess_64.h in a text editor.

On line 56 and 57 you will see:

else
WARN(1, "Buffer overflow detected!\n");

Comment this out so it reads:

// else
// WARN(1, "Buffer overflow detected!\n"); 

After saving this edit, if you have previously run amd-driver-installer unsuccessfully, you will need to run /usr/share/ati/fgrlx-uninstall.sh to reset the system to previous starting conditions. Now follow the procedure in the section below titled "Official AMD Driver Package from Amd.com".

Amd-driver-installer Compilation Problems on i686 Fedora 16

Note: This section applies directly to users using the Official amd-driver-installer package downloaded from amd.com

The following is a procedure that has been confirmed to work with i686 Fedora users. If you are getting the following message in your /usr/share/ati/fglrx-install.log:


[Message] Kernel Module : Found kernel module build environment, generating kernel module now.
AMD kernel module generator version 2.1
doing Makefile based build for kernel 2.6.x and higher
rm -rf *.c *.h *.o *.ko *.a .??* *.symvers
make -C /lib/modules/3.2.9-1.fc16.i686/build SUBDIRS=/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: Entering directory `/usr/src/kernels/3.2.9-1.fc16.i686'
  CC [M]  /lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘KCL_fpu_begin’:
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:5804:28: error: ‘TS_USEDFPU’ undeclared (first use in this function)
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:5804:28: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o] Error 1
make[1]: *** [_module_/lib/modules/fglrx/build_mod/2.6.x] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.2.9-1.fc16.i686'
make: *** [kmod_build] Error 2
build failed with return value 2
[Error] Kernel Module : Failed to compile kernel module - please consult readme.
[Reboot] Kernel Module : dracut

Then the following procedure should work for you.

Procedure is as follows:


1) Extract amd-driver-installer into subdir. Example:

chmod 700 amd-driver-installer-15-12-x86.x86_64.run
./amd-driver-installer-15-12-x86.x86_64.run --extract fglrx-12.2

2) cd into directory containing firegl_public.c. i.e.,

cd   fglrx-12.2/common/lib/modules/fglrx/build_mod/

3) In that dir, open a text editor, copy the following code and save to a file named "fglrx.patch":


fixed fgrlx compilation error on 32-bit x86 arch with kernel 3.3-rc4 due to commit:
https://github.com/torvalds/linux/commit/f94edacf998516ac9d849f7bc6949a703977a7f3
later modified (in 3.3-rc5) by commit:
https://github.com/torvalds/linux/commit/7e16838d94b566a17b65231073d179bc04d590c8#diff-1
and finally backported to kernel 3.2.8.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
---
 firegl_public.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/firegl_public.c b/firegl_public.c
index 6e0aa82..cb9e217 100644
--- a/firegl_public.c
+++ b/firegl_public.c
@@ -5797,10 +5797,16 @@ void ATI_API_CALL KCL_fpu_begin(void)
 #ifdef CONFIG_X86_64
     kernel_fpu_begin();
 #else
+#ifndef TS_USEDFPU
+    preempt_disable();
+    if (__thread_has_fpu(current))
+        __save_init_fpu(current);
+#else
     struct thread_info *cur_task = current_thread_info();
     preempt_disable();
     if (cur_task->status & TS_USEDFPU)
         __save_init_fpu(cur_task->task);
+#endif
     else
         clts();
 #endif
-- 
1.7.5.4


4) Run the patch on firegl_public.c :


su-

patch -p1 < ./fglrx.patch

5) At this point, if you have previously run amd-driver-installer unsuccessfully, you need to return the system to it's starting state by running /usr/share/ati/fglrx-uninstall.sh. Then, make sure you follow the directives in the section below titled "Installation Prep for Amd-Driver-Installer". After you have completed that checklist, you can now run ati-installer.sh from the extraction subdir (in this case "fglrx-12.2") using the following command line:

su -

/bin/sh ./ati-installer.sh 8.95 --install

From here you should have a successful Fglrx installation.

Multiple Monitor Setups

If you have an existing multiple monitor setup, move your existing xorg.conf to a safe place. Let amd-driver-installer generate a fresh working xorg.conf file for you based on what it probes from EDID monitor info. If you are having difficulties after generating a new xorg.conf, use your old xorg.conf as a reference and transfer sections of that file as needed to the new one.

Here are some resources for those having difficulty getting their multiple monitors running:

If you need to start with a clean slate and all your monitors are connected, you can force a fresh xorg.conf to be generated taking into account the monitors present:

su -
aticonfig --initial -f

Pre-built packages from RPMFusion

Note: This section does not apply to users using the Official amd-driver-installer package downloaded from amd.com

RECOMMENDED METHOD

This is easier than manually building the driver from AMD as you don't need to worry about passing kernel options via GRUB2, configuring DKMS, rebuilding the kernel module every time you do a kernel upgrade, or cleaning up any mess if you want to remove the driver.

Clean up previous Offical AMD driver installation

If you're coming from the Official AMD driver to RPMFusion's AMD driver, you'll need to reinstall the mesa-libGL package as the Official AMD driver installation changes files it contains.

su -
yum reinstall mesa-libGL

Other issues before install driver

On Acer Aspire 722 (A0722) with Radeon HD 6290 (and i suppose on other machines with the same card) you must disable SELinux or the follow error will occured :

SELinux is preventing gnome-session-c from execmod access on the file /usr/lib/dri/fglrx_dri.so. For complete SELinux messages run sealert -l <SELinux alert id>

To disable SELinux open /etc/selinux/config file as root and set SELINUX to disabled (SELINUX=disabled). After that driver will work as expected.
Note: Disabling SELinux is not a very good idea. It's better to just modify the policy, by running these two commands (as root):

semanage fcontext -a -t textrel_shlib_t '/usr/lib/dri/fglrx_dri.so'
restorecon -v '/usr/lib/dri/fglrx_dri.so'

glxinfo

direct rendering : Yes
...
OpenGL vendor string : Advanced Microd Devices Inc.
OpenGL render string : AMD Radeon HD 6290 Graphics
...

Setup RPMFusion

There are instructions on http://www.rpmfusion.org/ but this should do it.

su -
rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm  http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

Install Catalyst driver packages

This procedure is the same for 32-bit and 64-bit, yum will automatically install the correct driver and libs for your architecture.

su -
yum install akmod-catalyst xorg-x11-drv-catalyst xorg-x11-drv-catalyst-libs

32-bit Libraries on 64-bit OS

If you want to play 32-bit games on a 64-bit Fedora installation, you will need to install the 32-bit libraries in addition to the above step.

su -
yum install xorg-x11-drv-catalyst-libs.i686

Kernel module packages

Note that there are individual kmod-catalyst- packages in RPMFusion which supply kernel modules for specific Fedora kernel versions. If you use these and you upgrade the kernel without upgrading the kmod-catalyst- package, loading the proprietary driver will fail and you'll revert back to the Free radeon graphics driver. Sometimes there is a day or so between Fedora upgrading their kernel and RPMFusion building a new kmod-catalyst- package.

The akmod-catalyst package we installed above automatically builds a new kernel module at boot-time when the kernel is upgraded, so you'll never have to worry about this.

Official AMD Driver Package from Amd.com

Note: This section applies directly to users using the Official amd-driver-installer package downloaded from amd.com

Installation Prep for Amd-Driver-Installer

The script from AMD builds the kernel module and a set of modules for XOrg. The Official AMD installer requires some development packages to be installed:

su -
yum install kernel-devel kernel-headers gcc gcc-c++

There can be only one copy of kernel-devel and it needs to match the running kernel. Same applies to kernel-headers. "Yum update" will always ensure that there's one latest copy of kernel-headers, but it does not do that for kernel-devel, so you need to look at that yourself. The running kernel should be the latest one available on the update repos. Check your current kernel version with:

uname -a

Check all installed kernel packages with

su -
rpm -qa | grep kernel

Remove any kernel-devel packages which do not match the latest installed kernel version. Example:

su -
rpm -ev --nodeps kernel-devel-3.2.9-1.fc16.x86_64

Note we are careful to specify the exact package name that was given to us by the rpm command above.

Boot into the latest kernel before continuing. Building the module on a kernel which you don't have -devel packages for will fail. Building the module on one kernel then booting into another will result in the compiled module not working.

Most users that are installing the Official Amd-driver-installer are looking for maximum performance with direct rendering and OpenGL performance. Amd-driver-installer requires that Mesa libraries be in place before it's installed, as it replaces some of those libraries. Therefore if you are a Crossover or Wine user, the mesa lib set will need to be in place before you run the installer. The following is a working example pulled from a known-good Fedora 16 x86_64 platform running Crossover:

su -
yum install mesa-dri-filesystem.i686 mesa-libGL.x86_64 mesa-dri-drivers.x86_64 mesa-libGL.i686
 mesa-dri-filesystem.x86_64 mesa-libEGL.x86_64 mesa-dri-drivers.i686 mesa-libGLU.x86_64

Note that Crossover and Wine are 32 bit and therefore require i686 mesa libs in conjunction with the 64 bit versions.

From here, you should be ready to run the Official Amd-driver-installer.

Download driver

Download the driver for your particular card from http://support.amd.com/

 wget http://www2.ati.com/drivers/linux/amd-driver-installer-15-12-x86.x86_64.zip
 unzip amd-driver-installer-15-12-x86.x86_64.zip

Install driver

Run the file as root in the sh shell.

su -
chmod 700 amd-driver-installer-15-12-x86.x86_64.run
sh ./amd-driver-installer-15-12-x86.x86_64.run

Select the default install, do not generate distribution packages.

Confirming Installation

Check the build install log:

tail /usr/share/ati/fglrx-install.log

You should see data confirming the module build worked:

build succeeded with return value 0
duplicating results into driver repository...
done.

Uninstalling Official AMD driver

Run AMD's uninstall script:

su -
sh /usr/share/ati/fglrx-uninstall.sh

The following steps are not strictly required because the amd-driver-installer is written to put all files back as they were before the install. One set of files that amd-driver-installer alters is the mesa library set. To be sure of a mint-condition installation (especially if you are upgrading to the next Official driver version) reinstall the following package:

su -
yum reinstall mesa-libGL

For those running Wine or Crossover from Codeweavers.com, the following command will reinstall all the mesa libraries that (should) be on your system. This example is for users running Wine/Crossover on a 64 bit system:

su -
yum reinstall mesa-dri-filesystem.i686 mesa-libGL.x86_64 mesa-dri-drivers.x86_64 mesa-libGL.i686
 mesa-dri-filesystem.x86_64 mesa-libEGL.x86_64 mesa-dri-drivers.i686 mesa-libGLU.x86_64

At this point you should be prepped to start a new amd-driver-installer session to get the latest Fglrx version.

Troubleshooting

In the event you install the driver and are greeted with a blank screen or corrupted video signal when starting X, you are able to manually disable the Free Software radeon driver to troubleshoot.

There are two methods to disable radeon module. The first is a two-step process and the other approach is listed below.

Approach #1:

1) Edit the /etc/modprobe.d/blacklist.conf and add radeon to the list.

2) Run the following:

su -
/sbin/new-kernel-pkg --package kernel --mkinitrd --dracut --depmod --install $(uname -r)

That's it. This will generate a new initramfs that does not have radeon built in. This method has the advantage of not affecting kernel mode setting as well as not needing any grub edits. On the next boot, the radeon module should be gone. You can now reboot to console and execute steps in section above titled "Official AMD Driver Package from Amd.com"

Approach #2:

Turn your system off and on again. On the GRUB boot screen, press e to edit the default boot entry, scroll down to the kernel line (which begins linux), then press e again to edit the line.

Add the entries radeon.modeset=0 blacklist=radeon to the end. For example, if your kernel line is

linux /vmlinuz-3.2.9-1.fc16.x86_64 LANG=en_US.UTF-8

we'll want to edit it so it is

linux /vmlinuz-3.2.9-1.fc16.x86_64 LANG=en_US.UTF-8 radeon.modeset=0 rdblacklist=radeon blacklist=radeon

These entries do the following:

  • radeon.modeset=0 disables "Kernel Mode Settting" for the Free Software driver (ie: the driver telling the kernel to setup the screen resolution, instead of XOrg doing it)
  • rdblacklist=radeon blacklist=radeon stops the kernel from loading the Free Software radeon driver altogether

From here you can manually remove and reinstall the proprietary drivers, either with yum or with PackageKit's Add/Remove Software application, as desired.

In the case when you try to modify grub[background_image/resolution/..], your are greeted with a blank screen or corrupted video signal while starting X. To overcome this, all you need to do is, append the following lines to /etc/default/grub:

GRUB_GFXMODE=1280x1024x32
GRUB_GFXPAYLOAD=keep
GRUB_GFXPAYLOAD_LINUX=1280x1024x32

and then run:

grub2-mkconfig -o /boot/grub2/grub.cfg