Update: See the next post in this series for kernel version 4.04.
Below, find the updated installation instructions for the AMD Catalyst 14.12 (fglrx) driver on Fedora 21 with kernel version 3.19.1-201.fc21.x86_64. If you’re interested in the technical details of these problems and their resolution (beyond applying the patch I provide, that is), then continue reading in the section entitled “Details: Overcoming the New Issues.”
Universal Package Prerequisites
As stated by the “installer.html” document provided by the driver, the prerequisites are as follows:
- GCC version 3.3.3 or higher.
- Kernel headers or kernel sources matching version of the kernel you’re running.
Please consult to documentation for your distribution how to get and install this.
- XFree86 version 4.1.X, 4.2.X, 4.3.X, or XOrg version 6.8.X (Fedora 20 does not use XFree86) or higher.
Heed the warning:
- If you have multiple version of X Window System installed on your computer the installer will try to detect the default X, and install the driver for the detected version. However, you could experience problems trying to run other versions of X after this. Also, if your X Window System is installed into a nonstandard location, installation of the driver could be either problematic or incomplete.
With a fully up-to-date Fedora 21 installation, perform the following command to acquire the requisite packages:
yum install gcc kernel-headers kernel-devel
Fedora 21 Products and the Proprietary AMD Catalyst Graphics Driver
So, as you are likely aware, the Catalyst driver does not work with GNOME. As you may also be aware, Fedora 21 Workstation, the product designed for the purposes you’re most likely to have in mind if you’re using your system like a normal person, integrates GNOME into the OS more than previous Fedora iterations. In fact, if you’re using Fedora 21 Workstation, you won’t even see the GNOME Desktop Environment group in yum – it’s hidden by default. Removing the GNOME Desktop Environment from the Workstation implementation is difficult and attempts to install alternate Desktop Environments currently meet with package conflict issues.
Using GNOME with the AMD Catalyst Driver on Fedora 21
Thanks to reader Fox for directing me to Red Hat intern Levente Kurusa’s guide which allows users to install the Catalyst driver on a system running GNOME. The problem is, as you might expect, it’s quite the burdensome process. In my estimation, it’s easier to simply use KDE, but if you’re really attached to GNOME, you might give his method a try.
Using KDE With Fedora 21
The best course of action for someone interested in running KDE in Fedora 21 is to either install the KDE Spin or upgrade from a version of Fedora 20 already using KDE with the nonproduct product option.
Now, if you’re like me and you accidentally upgraded to Fedora 21 Workstation (and therefore now have GNOME on your system), you’ll find that certain issues occur (see the link above) and changing Fedora 21 products is not easy. I haven’t yet really dug into the product architecture so I don’t have the best answer regarding the move from Workstation to Nonproduct, but you can still install KDE (see the “changing Fedora 21 products is not easy” link above) and keep GNOME on your system for times during kernel upgrades (and therefore the required uninstallation and reinstallation of the Catalyst driver) when you need a GNOME fix or something. Just make sure you use KDM as your Desktop Manager (I haven’t tested the procedure on Fedora 21, but I suspect it’s identical to the procedure I laid out in the original post on this subject way back in March of 2014 – let me know if it doesn’t work for you), ’cause the GNOME Desktop Manager (GDM) breaks with the Catalyst driver, as well.
Once you’ve set yourself up with KDE and KDM on Fedora 21, you’re in good shape to simply install the driver using a slightly modified version of the Fedora 20 procedure which has been presented on this site for some time:
Note: If you’ve already followed the instructions on this blog for installing version 14.12 of the AMD Catalyst driver on Fedora 21 and you still have the driver files to which you applied the 3.17_kernel.patch file, you can skip directly to step 5 below to apply the new 3.19_kernel.patch file and install the driver.
1) Download the AMD Catalyst 14.12 (fglrx) driver from AMD’s site.
2) Change your working directory to your ~/Downloads directory and extract the amd-catalyst-14-4-linux-x86-x86-64.zip file (it will extract into a directory named fglrx-14.501.1003 in the current working directory):
cd ~/Downloads unzip amd-catalyst-omega-14.12-linux-run-installers.zip
3) Change your working directory to the fglrx-14.501.1003 directory and extract the driver file:
cd fglrx-14.501.1003/ sh amd-driver-installer-14.501.1003-x86.x86_64.run --extract
Here, you’ll see a message which reads something like: “Created directory fglrx-install.wIhzk3″ and then “Verifying archive integrity… All good.” followed by a “Uncompressing AMD Catalyst(TM) Proprietary Driver-14.501.1003″ followed by a lot of dots.
4) Now, you should see a newly created folder called fglrx-install.whateveryourcomputernamedit (mine, for example, was fglrx-install.wIhzk3). Change your working directory appropriately and apply the 3.17_kernel.patch:
cd fglrx-install.wIhzk3 mv ~/Downloads/3.17_kernel.patch ./ #this is not necessary, but I do it for sanity's sake patch -p0 < 3.17_kernel.patch
If you are successful, you will see the following output:
patching file common/lib/modules/fglrx/build_mod/kcl_acpi.c
5) Now, apply the 3.19_kernel.patch file from the same location:
cd fglrx-install.wIhzk3 mv ~/Downloads/3-19_kernel-patch3.doc ./3.19_kernel.patch #Again, this is not necessary (you could just apply the patch from its location in Downloads), but I do it for sanity's sake (and keep the patch with the rest of the driver files) #Also, WordPress continues to mess up the name of the file when I upload it, hence the inappropriate "3" patch -p0 < 3.19_kernel.patch
If you are successful, you will see the following output:
patching file common/lib/modules/fglrx/build_mod/firegl_public.c
6) Now that you’ve patched the installation package, run the installation:
sudo ./ati-installer.sh 14.501 --install
7) Choose the “Install Driver 14.501 on X.Org 6.9 or later 64-bit” option from the Setup Wizard, and then simply follow the prompts.
Ensure that you do not select “Generate Distribution Specific Driver Package (Recommended)”. This will only work if you use one of the officially supported Linux distributions listed on AMD’s site (Fedora is not included).
8) Reboot your machine and enjoy!
Details: Overcoming the New Issues
As everyone who attempted to reinstall the AMD Catalyst 14.12 driver after updating Fedora 21 to use kernel 3.19 found out, the installation fails with the standard error cry of the Catalyst driver:
DKMS part of installation failed. Please refer to /usr/share/ati/fglrx-install.log for details
Johnny Chang graciously offered up the contents of his installation log for analysis. The primary area of interest seemed to me to be:
doing Makefile based build for kernel 2.6.x and higher rm -rf *.c *.h *.o *.ko *.a .??* *.symvers make -C /lib/modules/3.19.1-201.fc21.x86_64/build SUBDIRS=/usr/lib/modules/fglrx/build_mod/2.6.x modules make: Entering directory ‘/usr/src/kernels/3.19.1-201.fc21.x86_64′ CC [M] /usr/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o /usr/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘kasSetExecutionLevel’: /usr/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:4819:5: error: implicit declaration of function ‘__get_cpu_var’ [-Werror=implicit-function-declaration] orig_level = __get_cpu_var(kasExecutionLevel); ^ /usr/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:4820:38: error: lvalue required as left operand of assignment __get_cpu_var(kasExecutionLevel) = level; ^ /usr/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: At top level: /usr/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:6396:12: warning: ‘KCL_fpu_save_init’ defined but not used [-Wunused-function] static int KCL_fpu_save_init(struct task_struct *tsk) ^ cc1: some warnings being treated as errors scripts/Makefile.build:257: recipe for target ‘/usr/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o’ failed
So one could summarize that log in pointing out that we have three issues to deal with:
- firegl_public.c:4819:5: error: implicit declaration of function ‘__get_cpu_var’ [-Werror=implicit-function-declaration] orig_level = __get_cpu_var(kasExecutionLevel)
- firegl_public.c:4820:38: error: lvalue required as left operand of assignment __get_cpu_var(kasExecutionLevel) = level;
- firegl_public.c:6396:12: warning: ‘KCL_fpu_save_init’ defined but not used [-Wunused-function] static int KCL_fpu_save_init(struct task_struct *tsk)
(1) and (2) are related issues, with the problem seeming to be that the __get_cpu_var function isn’t declared. I hypothesized that this might mean the new kernel 3.19 headers don’t contain a declaration the installation software is expecting because the kernel has been updated so that these functions have been renamed or replaced.
Philm from the Manjaro team (bless that man) has saved us again. Going on the hunch I described above, Google led me to see that Philm has released a patch for Manjaro which we can reappropriate to Fedora. His solution seems to support my hypothesis, for he simply replaces __get_cpu_var with __this_cpu_read in (1) and he replaces __get_cpu_var with __this_cpu_write in (2). He’s integrated this patch into a broader Manjaro solution for this driver, it appears, so I offer a simpler patch for our purposes in the installation instructions above.