UPDATE: See the next post in the series for a consolidated patch allowing installation of the driver using Linux kernel version 4.1.3!
Warning: While the procedure below appears to ultimately succeed (and it seems confirmed to work beyond my system by steel’s comments on the last post),
- SDDM (the Simple Desktop Display Manager; successor to KDM) seems to freak out, presenting a white screen with some black smudgy artifacts in the upper left. I can still enter my password and see my mouse cursor, though.
- Once I get beyond SDDM, KDE works…except only one of my monitors was recognized initially.
The latter problem (2) seemed to be a result of the /etc/X11/xorg.conf file provided by the new driver installation. Fortunately, old xorg.conf files are preserved by the fglrx installation process, so I just copied my latest /etc/X11/xorg.conf.fglrx-# file (where # is some integer) back to /etc/X11/xorg.conf and rebooted, and that solved that problem; both monitors are now recognized and working properly.
As for (1), I’m working on a solution, but I thought I’d warn everyone so they aren’t disappointed if it happens to them. These instructions produce a workable result, but not yet exactly right.
Update: It looks like this may simply be a problem with my local configuration, as steel confirms that he is using SDDM and KDE without experiencing the problems I describe above, though he is experiencing other problems. I’m hopeful I can resolve the issue.
Process Development Summary
Hey, AMD has released a nice updated AMD Catalyst 15.7 driver based on that 15.20 fglrx iteration released as a .deb package for Ubuntu! The glorious part for us Fedora users: it supports X.org’s X11 Server version 1.17, which is used on Fedora 22! No longer do we need to downgrade the X.org server to make use of the latest officially released Catalyst driver. So, below, find the instructions for installation of the latest Catalyst 15.7 driver on Fedora 22 with kernel version 4.0.6-300.fc22.x86_64.
The process retains much of its content from past processes, but with the following new changes:
- Continuing to adopt open source modifications, it would appear, AMD has integrated a couple of modifications made to the firegl_public.c file described by two stanzas previously included in the ultra-2.patch file. As a result, I have removed those stanzas from the new Catalyst157.patch file provided below.
- The downgrade to X.org’s X11 Server 1.16 is no longer required! Hooray!
As I wrote last time, the new Fedora KDE Plasma Desktop Spin is wonderful, and I have taken the release of Fedora 22 as an opportunity to conduct a fresh OS installation. I store all of my data on a central server (nfsv4 + autofs = woot) and maintain administrative familiarity with my software, so blowing away and reinstalling the OS is no problem. Honestly, I recommend a rebuild if you’re well organized and it’s not too big of a headache. A fresh OS is nice.
Universal Package Prerequisites
Remaining yet unchanged, the general prerequisites are:
- 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.
- Note this is the protocol version, and not the server version discussed above and below.
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 22 installation, perform the following command to acquire the requisite packages:
dnf install gcc kernel-headers kernel-devel
Fedora 22 Products and the Proprietary AMD Catalyst Graphics Driver
Update: As Mike points out below, it appears the Catalyst driver merely fails to work with GDM, but it will support GNOME if some additional installation steps are followed. It appears all you must do is that which is documented in the “do not reboot after the installation” section and the subsequent “save it replace it” section. I would look into this myself and integrate it into these instructions if I weren’t running the KDE Spin, but feel free to ask any questions that may arise during the process or confirm that it works for others as Mike did in the comments below.
But if you don’t want to do that, I encourage you to install the Fedora 22 KDE Plasma Desktop Spin (or any non-GNOME spin to your liking).
Installing the kde-desktop-environment With Fedora 22
If you REALLY don’t want to reinstall your OS entirely, and you don’t want to try the GNOME solution above, you can execute
dnf group install "KDE Plasma Workspaces"
And it’ll probably work. I haven’t tested this yet (I’ll spin up a Fedora 22 Workstation VM soon), but make sure you use SDDM (the successor to KDM) as your Desktop Manager ’cause the GNOME Desktop Manager (GDM) breaks with the Catalyst driver, as well.. You can try following 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. Once you’ve set yourself up with KDE and SDDM in some fashion (just install the Spin), you’re in good shape to simply install the driver as described below.
1) Download the AMD Catalyst 15.7 (fglrx) driver from AMD’s site.
2) Change your working directory to your ~/Downloads directory and extract the amd-catalyst-15-5-linux-run-installers.zip file:
$ cd ~/Downloads $ unzip amd-driver-installer-15.20.1046-x86.x86_64.zip
3) Extract the run archive:
$ sh amd-driver-installer-15.20.1046-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-15.20.1046″ 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 Catalyst157.patch.
$ cd fglrx-install.wIhzk3 $ mv ~/Downloads/Catalyst157.patch.doc ~/Downloads/Catalyst157.patch #WordPress does not permit me to upload a .patch file, so I add the .doc extension to lazily get around that restraint $ mv ~/Downloads/Catalyst157.patch ./ #this is not necessary, but I do it for sanity's sake, to keep the patch file with the patched code as a reminder $ patch -p0 < Catalyst157.patch
If you are successful, you will see the following output:
patching file common/lib/modules/fglrx/build_mod/firegl_public.c Hunk #1 succeeded at 4498 (offset 30 lines). Hunk #2 succeeded at 4517 (offset 30 lines). Hunk #3 succeeded at 4548 (offset 30 lines). Hunk #4 succeeded at 4566 (offset 30 lines). patching file common/lib/modules/fglrx/build_mod/kcl_str.c
5) As Jacob Yates points out, one must copy the version.h header file into the build directory for the current kernel version:
$ sudo cp /usr/include/linux/version.h /lib/modules/`uname -r`/build/include/linux/
6) Now that you’ve patched the installation package and copied the header file needed to build the module, run the installation:
$ sudo ./ati-installer.sh 15.20 --install
7) Choose the “Install Driver 15.20 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!
Properly Maintaining your Catalyst Implementation
Being a custom kernel module, you unfortunately must rebuild the Catalyst driver every time you upgrade the kernel version or, in some cases, other GPU-dependent packages (like mesa). The surefire way to tell that you need to reinstall your driver is a notice from Steam (for example) that
OpenGL GLX context is not using direct rendering, which may cause performance problems.
The solution to this issue is to uninstall your driver, reboot, reinstall it, and reboot. Don’t wait for this error to pop up after kernel upgrades, however, because you’ll probably just see a black screen and have to enter a CLI terminal to uninstall the driver.
Before every kernel upgrade:
1. Uninstall the driver
$ sudo aticonfig --uninstall
$ shutdown -r now
3. Upgrade your system
$ sudo dnf upgrade
$ shutdown -r now
5. Reinstall the driver
$ cd /driver/location/fglrx-install.wIhzk3 #Keep your patched driver files around and ready to go! $ sudo ./ati-installer.sh 15.20 --install
It’s not so bad, but it adds a little burden. I hope to design a DKMS solution which automatically handles this for you, but I haven’t gotten to it yet.
Remember, if you see this message:
Check out the post to which that link sends you for a potential resolution for your problem. You probably have an Intel CPU with an on-die Haswell GPU combined with a Radeon GPU, but let me know if you don’t, or if you encounter an issue that that post doesn’t resolve.