Installing the Proprietary AMD Catalyst 15.5 (fglrx 15.101) driver on Fedora 22 with Linux Kernel 4.04

Update:  See the next post in the series!  The new Catalyst 15.7 driver no longer requires the X.org downgrade.  Hooray!

Process Development Summary

Below, find the updated installation instructions for the AMD Catalyst 15.5 driver on Fedora 22 with kernel version 4.0.4-303.fc22.x86_64.

The process retains much of its content from past processes, but with the following new changes:

  1. The modification described by the patch stanza for kcl_acpi.c in the ultra.patch (originally from Philm of the Manjaro team, all the way back in November 2014) has made its way into fglrx 15.101, so the patch operation is no longer required!  I have removed the stanza from the new ultra-2.patch version provided below.
  2. Fedora 22 uses X.org’s X11 Server version 1.17, whereas Fedora 21 tops out at X.org’s X11 Server version 1.16.  While the new Catalyst 15.20 driver released to the Ubuntu community as a deb package supports X.org X11 Server 1.17, it is not an easy job to install it in Fedora 22.  The recent general Linux release of the Catalyst 15.5 driver can be installed with the below method, and involves downgrading the X.org X11 Server in Fedora 22 to the Fedora 21 packages.
    1. It is a simple, reversible, and seemingly safe operation, all conducted with standard tools (dnf, primarily).  I have followed the procedure for my production desktop at home and everything is stable and without observable issue.  Nonetheless, we’ve had little time for testing, so the potential impact of the procedure on future software packages for Fedora 22 are not thoroughly known (if anything requires Xorg X11 Server 1.17, for example, we’d be in trouble).  I did conduct a very large package upgrade operation after completing the process below and suffered no ill effects in a virtual environment, so things seem pretty good.  Hopefully, AMD releases a driver compatible with X.org X11 Server 1.17 soon and we can upgrade and get on with it.

That’s it!

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.

Prerequisite Discussion

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

Again, as has been the case for some time, the Catalyst driver does not work with GNOME.  As you may also be aware, Fedora 22 Workstation, the mainstream 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.  As I have written before, changing Fedora products is no easy task, and as I wrote above, I encourage you to install the Fedora 22 KDE Plasma Desktop Spin (or any non-GNOME spin to your liking) fresh!

Installing the kde-desktop-environment With Fedora 22

If you REALLY don’t want to reinstall, 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 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 KDM in some fashion (just install the Spin), you’re in good shape to simply install the driver as described below.  First, you need to downgrade Fedora 22 to the X.org X11 Server package version 1.16, so that the Catalyst driver doesn’t throw an angry segmentation fault:

Downgrading Fedora 22 KDE Plasma Desktop Spin to X.org X11 Server 1.16

1)  Isolate the multi-user.target so you don’t have to worry about the X server while you work

# systemctl isolate multi-user.target

2)  Add the Fedora 21 repositories from which we will obtain the older X.org X11 server 1.16 packages (it looks like a lot of people failing to get dnf downgrade to work might not be doing this)

# cd /etc/yum.repos.d/
# cp fedora.repo fedora21.repo
# vim fedora21.repo
     :%s/\[fedora/\[fedora21/g
     :%s/$releasever/21/g
     :%s/$basearch/x86_64/g
     :wq
# cp fedora-updates.repo fedora21-updates.repo
# vim fedora21-updates.repo
     :%s/\[updates/\[updates21/g
     :%s/$releasever/21/g
     :%s/$basearch/x86_64/g
     :wq
# vim fedora.repo
     Add "exclude=xorg-x11-server-Xorg xorg-x11-server-common" to the [fedora] stanza
     :wq
# vim fedora-updates.repo
     Add "exclude=xorg-x11-server-Xorg xorg-x11-server-common" to the [updates] stanza
     :wq
# dnf repolist 

(fedora21 repositories appear as expected)

3)  Manually install the GPG Keys

# cd /etc/pki/rpm-gpg/
# curl https://getfedora.org/static/95A43F54.txt > ./RPM-GPG-KEY-fedora-21-primary
# curl https://getfedora.org/static/A0A7BADB.txt > ./RPM-GPG-KEY-fedora-21-secondary
# for LINK in `find -name RPM-GPG-KEY-fedora-22\* -type l`; do LINKMV=`echo $LINK | sed 's/22/21/g'`; if [[ $LINK =~ armhfp|i386|x86_64 ]]; then ln -s RPM-GPG-KEY-fedora-21-primary $LINKMV; else ln -s RPM-GPG-KEY-fedora-21-secondary $LINKMV; fi; done;

4)  Downgrade the important packages

# dnf --allowerasing downgrade xorg-x11-server-common xorg-x11-server-Xorg

5)  Reboot

# shutdown -r now

6)  Fully update your system

# dnf upgrade

(The xorg-x11-server-common and xorg-x11-server-Xorg packages should not be listed for upgrade to .fc22 packages.)

If all went well, continue on.  If not, let me know what’s going on and we’ll see what we can do.

Installation Instructions

1)  Download the AMD Catalyst 15.5 (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-catalyst-omega-15.5-linux-run-installers.zip

3)  Extract the run archive:

$ sh amd-catalyst-omega-15.5-linux-run-installers.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 ultra-2.patch:

$ cd fglrx-install.wIhzk3
$ mv ~/Downloads/ultra-2.patch.doc ~/Downloads/ultra-2.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/ultra-2.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 < ultra-2.patch

If you are successful, you will see the following output:

(Stripping trailing CRs from patch; use --binary to disable.)
patching file common/lib/modules/fglrx/build_mod/firegl_public.c
patching file common/lib/modules/fglrx/build_mod/kcl_str.c

If you have a unpacked .run file with previously-applied patches, you can still apply the ultra-2.patch – just address appropriately the prompts you receive during execution; when asked to reverse a patch operation, decline (it’s thinking you might want that since you’ve already applied the patch, as it can tell).  If you don’t feel like messing with it at all, just remove the directory containing the previously-patched content and extract a new directory from the .run file per step 3 above.

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.101 --install

7)  Choose the “Install Driver 15.101 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.

General Guidelines

Before every kernel upgrade:

1.  Uninstall the driver

$ sudo aticonfig --uninstall

2.  Reboot

$ shutdown -r now

3.  Upgrade your system

$ sudo dnf upgrade

4.  Reboot

$ 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.101 --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.

Troubleshooting

Remember, if you see this message:

“Your Graphics adapter is not supported by this driver. Installation will not proceed”

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.

Advertisements
This entry was posted in Information Technology and tagged , , . Bookmark the permalink.

74 Responses to Installing the Proprietary AMD Catalyst 15.5 (fglrx 15.101) driver on Fedora 22 with Linux Kernel 4.04

  1. R4v3nPr0 says:

    I was able to install Catalyst 15.5 in Fedora 21 thanks to your guides. By the way. There is a script for openSUSE 13.2 that allows to install the fglrx 15.200 from Ubuntu. This generate RPM files. I will try to install them on Fedora 22 and then I tell you if it worked.

  2. Jay says:

    Thanks worked great! Thanks for the awesome work & writeup

  3. user says:

    I hope RPMFusion packager reads this….

    • Yeah, unfortunately, as I understand it, the RPM Fusion package maintainer for the Catalyst driver ceased support years ago. I’ve been contemplating doing it myself, but it appears not to be a trivial matter.

  4. i have intel CPU and Radeon GPU and after install driver fedora doesn’t start

    • 1) Did the installation complete without error?
      2) Can you post the contents of your Xorg.0.log from the failed boot? I presume “fedora doesn’t start” means your system actually boots up but you don’t have a GUI? Did you try using Ctrl+Alt+F2 to get to another terminal? If so, could you interact with the machine using the command line?

      • Igoryan says:

        Yes, i can using Ctrl+Alt+F3, errors in install log:
        rmmod: ERROR: Module radeon is in use
        Unloading drm module…
        rmmod: ERROR: Module drm is in use by: ttm i915 drm_kms_helper radeon

      • So, just to be clear and make sure I understand, are you saying you did this:

        1) Install driver per the instructions in this post.
        2) During the installation, you received notice that the installation completed successfully.
        3) You rebooted, and now you cannot use your Desktop Environment – you get a black screen and have to change to another terminal using Ctrl+Alt+F3
        4) While in the other terminal, you can see the error you posted in the /usr/share/ati/fglrx-install.log

        Is that right?

        If so, I was actually asking for the contents of your /var/log/Xorg.0.log file – basically just the end where it tells us why X was unable to start (and hence you have a black screen at boot). I actually have the error you quote in my fglrx-install.log, and my installation succeeded and my system works fine, so I don’t think it tells us what went wrong with your installation.

      • Igoryan says:

        Xorg.0.log:
        [ 39.352]
        X.Org X Server 1.17.1
        Release Date: 2015-02-10
        [ 39.352] X Protocol Version 11, Revision 0
        [ 39.352] Build Operating System: 3.19.5-200.fc21.x86_64
        [ 39.352] Current Operating System: Linux localhost.localdomain 4.0.4-303.fc22.x86_64 #1 SMP Thu May 28 12:37:06 UTC 2015 x86_64
        [ 39.352] Kernel command line: BOOT_IMAGE=/vmlinuz-4.0.4-303.fc22.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/swap rd.lvm.lv=fedora/root rhgb quiet LANG=ru_RU.UTF-8
        [ 39.352] Build Date: 19 May 2015 08:29:46AM
        [ 39.352] Build ID: xorg-x11-server 1.17.1-12.fc22
        [ 39.352] Current version of pixman: 0.32.6
        [ 39.352] Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
        [ 39.352] Markers: (–) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
        [ 39.352] (==) Log file: “/var/log/Xorg.0.log”, Time: Fri Jun 5 22:11:36 2015
        [ 39.400] (==) Using config file: “/etc/X11/xorg.conf”
        [ 39.400] (==) Using config directory: “/etc/X11/xorg.conf.d”
        [ 39.400] (==) Using system config directory “/usr/share/X11/xorg.conf.d”
        [ 39.449] (==) ServerLayout “aticonfig Layout”
        [ 39.449] (**) |–>Screen “aticonfig-Screen[0]-0” (0)
        [ 39.450] (**) | |–>Monitor “aticonfig-Monitor[0]-0”
        [ 39.468] (**) | |–>Device “aticonfig-Device[0]-0”
        [ 39.468] (==) Automatically adding devices
        [ 39.468] (==) Automatically enabling devices
        [ 39.468] (==) Automatically adding GPU devices
        [ 39.468] (==) FontPath set to:
        catalogue:/etc/X11/fontpath.d,
        built-ins
        [ 39.468] (==) ModulePath set to “/usr/lib64/xorg/modules”
        [ 39.468] (II) The server relies on udev to provide the list of input devices.
        If no devices become available, reconfigure udev or disable AutoAddDevices.
        [ 39.468] (II) Loader magic: 0x81ade0
        [ 39.468] (II) Module ABI versions:
        [ 39.468] X.Org ANSI C Emulation: 0.4
        [ 39.468] X.Org Video Driver: 19.0
        [ 39.468] X.Org XInput driver : 21.0
        [ 39.468] X.Org Server Extension : 9.0
        [ 39.473] (++) using VT number 1

        [ 39.473] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
        [ 39.473] (II) xfree86: Adding drm device (/dev/dri/card0)
        [ 39.476] (–) PCI:*(0:0:2:0) 8086:0166:103c:183e rev 9, Mem @ 0x63000000/4194304, 0x50000000/268435456, I/O @ 0x00005000/64, BIOS @ 0x????????/131072
        [ 39.476] (–) PCI: (0:1:0:0) 1002:6840:103c:183e rev 0, Mem @ 0x40000000/268435456, 0x62000000/131072, I/O @ 0x00004000/256, BIOS @ 0x????????/131072
        [ 39.476] (II) “glx” will be loaded by default.
        [ 39.476] (II) LoadModule: “glx”
        [ 39.573] (II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
        [ 39.613] (II) Module glx: vendor=”Advanced Micro Devices, Inc.”
        [ 39.613] compiled for 6.9.0, module version = 1.0.0
        [ 39.616] (II) LoadModule: “fglrx”
        [ 39.616] (II) Loading /usr/lib64/xorg/modules/drivers/fglrx_drv.so
        [ 40.822] (II) Module fglrx: vendor=”FireGL – AMD Technologies Inc.”
        [ 40.822] compiled for 1.4.99.906, module version = 15.10.4
        [ 40.822] Module class: X.Org Video Driver
        [ 40.833] (II) Loading sub module “fglrxdrm”
        [ 40.833] (II) LoadModule: “fglrxdrm”
        [ 40.833] (II) Loading /usr/lib64/xorg/modules/linux/libfglrxdrm.so
        [ 40.911] (II) Module fglrxdrm: vendor=”FireGL – AMD Technologies Inc.”
        [ 40.911] compiled for 1.4.99.906, module version = 15.10.4
        [ 40.911] (II) AMD Proprietary Linux Driver Version Identifier:15.10.4
        [ 40.911] (II) AMD Proprietary Linux Driver Release Identifier: 15.101.1001
        [ 40.911] (II) AMD Proprietary Linux Driver Build Date: Apr 14 2015 15:18:13
        [ 40.913] (WW) Falling back to old probe method for fglrx
        [ 41.207] (II) Loading PCS database from /etc/ati/amdpcsdb /etc/ati/amdpcsdb.default
        [ 41.246] ukiDynamicMajor: found major device number 247
        [ 41.246] ukiDynamicMajor: found major device number 247
        [ 41.246] ukiOpenByBusid: Searching for BusID PCI:1:0:0
        [ 41.246] ukiOpenDevice: node name is /dev/ati/card0
        [ 41.247] ukiOpenDevice: open result is 18, (OK)
        [ 41.840] ukiOpenByBusid: ukiOpenMinor returns 18
        [ 41.840] ukiOpenByBusid: ukiGetBusid reports PCI:1:0:0
        [ 41.903] (–) Chipset Supported AMD Graphics Processor (0x6840) found
        [ 41.956] (II) fglrx: intel VGA device detected, load intel driver.
        [ 41.956] (II) LoadModule: “intel”
        [ 41.956] (II) Loading /usr/lib64/xorg/modules/drivers/intel_drv.so
        [ 42.063] (II) Module intel: vendor=”X.Org Foundation”
        [ 42.063] compiled for 1.17.1, module version = 2.99.917
        [ 42.063] Module class: X.Org Video Driver
        [ 42.063] ABI class: X.Org Video Driver, version 19.0
        [ 42.064] (II) fglrx(0): pEnt->device->identifier=0x22a43d0
        [ 42.067] (II) intel(1): pEnt->device->identifier=(nil)
        [ 42.067] (EE) Screen 1 deleted because of no matching config section.
        [ 42.067] (II) UnloadModule: “intel”
        [ 42.067] (II) fglrx(0): Loading PCS database from /etc/ati/amdpcsdb /etc/ati/amdpcsdb.default
        [ 42.067] (EE)
        [ 42.067] (EE) Backtrace:
        [ 42.100] (EE) 0: /usr/libexec/Xorg (OsLookupColor+0x139) [0x599dd9]
        [ 42.114] (EE) 1: /lib64/libc.so.6 (__restore_rt+0x0) [0x7f1015d9db1f]
        [ 42.164] (EE) 2: /usr/lib64/xorg/modules/drivers/fglrx_drv.so (xdl_xs116_atiddxLeaveVT+0x30) [0x7f10128b21e0]
        [ 42.164] (EE) 3: /usr/libexec/Xorg (xf86DeleteScreen+0x5a) [0x483c6a]
        [ 42.164] (EE) 4: /usr/libexec/Xorg (InitOutput+0xc93) [0x47d463]
        [ 42.164] (EE) 5: /usr/libexec/Xorg (remove_fs_handlers+0x22a) [0x43e14a]
        [ 42.165] (EE) 6: /lib64/libc.so.6 (__libc_start_main+0xf0) [0x7f1015d89790]
        [ 42.165] (EE) 7: /usr/libexec/Xorg (_start+0x29) [0x428729]
        [ 42.166] (EE) 8: ? (?+0x29) [0x29]
        [ 42.166] (EE)
        [ 42.166] (EE) Segmentation fault at address 0x10
        [ 42.166] (EE)
        Fatal server error:
        [ 42.166] (EE) Caught signal 11 (Segmentation fault). Server aborting
        [ 42.166] (EE)
        [ 42.166] (EE)
        Please consult the Fedora Project support
        at http://wiki.x.org
        for help.
        [ 42.166] (EE) Please also check the log file at “/var/log/Xorg.0.log” for additional information.
        [ 42.166] (EE)
        [ 42.169] (EE) Server terminated with error (1). Closing log file.

      • Ah, ok – what output does the following command generate on your system?

        dnf list installed xorg-x11*

  5. igoryan says:

    Last metadata expiration check performed 2:18:43 ago on Fri Jun 5 20:33:33 2015.
    Установленные пакеты
    xorg-x11-apps.x86_64 7.7-13.fc22 @System
    xorg-x11-drv-ati.x86_64 7.5.0-3.fc22 @System
    xorg-x11-drv-evdev.x86_64 2.9.2-1.fc22 @System
    xorg-x11-drv-fbdev.x86_64 0.4.3-20.fc22 @System
    xorg-x11-drv-intel.x86_64 2.99.917-10.20150526.fc22 @System
    xorg-x11-drv-libinput.x86_64 0.10.0-2.fc22 @System
    xorg-x11-drv-nouveau.x86_64 1:1.0.11-2.fc22 @System
    xorg-x11-drv-openchrome.x86_64 0.3.3-14.fc22 @System
    xorg-x11-drv-qxl.x86_64 0.1.3-2.fc22 @System
    xorg-x11-drv-synaptics.x86_64 1.8.2-2.fc22 @System
    xorg-x11-drv-vesa.x86_64 2.3.2-20.fc22 @System
    xorg-x11-drv-vmmouse.x86_64 13.0.99-1.fc22 @System
    xorg-x11-drv-vmware.x86_64 13.0.2-8.20150211git8f0cf7c.fc22 @System
    xorg-x11-drv-wacom.x86_64 0.29.0-2.fc22 @System
    xorg-x11-font-utils.x86_64 1:7.5-28.fc22 @System
    xorg-x11-fonts-misc.noarch 7.5-14.fc22 @System
    xorg-x11-server-Xorg.x86_64 1.17.1-12.fc22 @System
    xorg-x11-server-common.x86_64 1.17.1-12.fc22 @System
    xorg-x11-server-utils.x86_64 7.7-15.fc22 @System
    xorg-x11-utils.x86_64 7.5-19.fc22 @System
    xorg-x11-xauth.x86_64 1:1.0.9-2.fc22 @System
    xorg-x11-xbitmaps.noarch 1.1.1-7.fc21 @System
    xorg-x11-xinit.x86_64 1.3.4-8.fc22 @System
    xorg-x11-xkb-utils.x86_64 7.7-13.fc22 @System

    • Ah ha, so it looks like you missed the step that downgrades you to xorg-x11-server-Xorg and xorg-x11-server-common (among others) fc21 versions. Try uninstalling your driver (aticonfig –uninstall) and then following the procedure in this post from start to finish and let me know how it goes.

  6. iUser says:

    Mmm…so if I understand it correctly, if I would stay on Fedora 21 I would not have to downgrade the Xorg… On the other hand, waiting for AMD to release new driver can be as long as waiting for next Fedora release (we got new driver after 5 months!).
    Difficult choices…
    I guess I will try with the upgrading Fedora and downgrading the Xorg. It will probably be faster than waiting for AMD.

    Thank you very much for the guide, I will try to execute it soon(TM) 😛

    • Yeah, if you stay with Fedora 21, you won’t have to downgrade your Xorg packages. However, you also won’t have easy access to the new KDE Plasma Desktop 5 and other Fedora 22 features, so I recommend the upgrade. The downgrade should only be a temporary solution until AMD releases a new driver with X.org X11 Server 1.17 support, and it doesn’t seem to adversely impact anything in Fedora 22 as far as I can tell, so it seems to me the superior choice.

      • iUser says:

        Hmmm… Okay, I will try. I will update Fedora while the Kernel matches Your guide (heh 4.0.4, 404 Not Found joke anyone?). Then I will apply the guide and hope I did it right 😛
        I work usually on MATE Desktop but I like KDE as well, I admit.
        Last time the “matter of time” for AMD was 5 months, I don’t want to go against them because they make great graphic cards but the support for Linux seems to be weaker and weaker for some reason 😦

  7. Bryan Schleigh says:

    when i enter the command “mv ~/Downloads/ultra-2.patch.doc ~/Downloads/ultra.patch” i get the error “mv: cannot stat ‘/home/bryan/Downloads/ultra-2.patch.doc’: No such file or directory
    Any help here?

  8. It worked here in Kubuntu 14.10 (Dell Inspiron 15 with hybrid AMD/Intel card) with custom compiled 4.0.4 kernel (I did not need to downgrade Xorg, bur needed to apply the patch). Also, with compiled kernel, there are some different versions of “version.h” inside ‘/usr/src/linux-4.0.4’. The one I copied to “/lib/modules/4.0.4/build/include/linux/” was “/usr/src/linux-4.0.4/include/generated/uapi/linux/version.h”. Thanks very much for the tutorial and the patch. You are amazing!

  9. Don says:

    Thank you SO MUCH!!! Your patch and procedures saved my configuration, after several weeks of tinkering and 3 different installations. Great Job! Do you accept donations?

    • Wow, no one’s ever asked me if I accept donations before. I’m touched by your generosity, but as of now, this is purely a public service and my wage is with God, as it were. If you feel like donating nonetheless, feel free to give to the SPCA or UNICEF on my behalf. =)

  10. iUser says:

    With a little bit of struggle under command line (runlevel 3) I was able to make it work.
    Your guide is 100% great 😀
    Thank you very much for help.
    Let’s hope AMD will soon(TM) bring next update, this time better one.

    • Not only AMD should get effor, RPMFusion could also give some small update (with these patches in fc22 branch) for people … just pack it and add check to not install by default ( xorg =< 1.16) , but with switch or command-line parameter.

  11. fred says:

    Odd,
    These are the modifications I required
    The linking script at step three had errors, had to manually make links
    use the grub argument
    changing sudo ./ati-installer.sh 15.101 –install
    to this sudo ./ati-installer.sh 15.2 –install

    Now stuck with dimmed laptop display (too dark to read no way to turn up brightness) display is working over hdmi (wasn’t prior to install). so just this to fix

    • Huh – where did you get your driver files? The 15.20 driver was released to the Ubuntu community as a .deb package, and your installation line makes me think that’s what you’re working with, somehow.

      • fred says:

        Driver was downloaded from the AMD site (using your link). I did just previously have ubuntu on this partition but enabling the fglrx also brought a blank screen (didn’t try external monitor and didn’t check to see if it was just the backlight). Think it was another page on your site talking about if .101 or.2 was higher that gave me the idea to try that.

        More weirdness.
        I also have win7 as a dualboot in this laptop so i tried uninstalling the vga drivers that asus had on their site and installing the latest on the amd site for windows (also 15.5). SAME no backlight issue with the stable driver in windows. (non stable win drivers won’t install)

        Additionally in fedora catalyst identifies
        graphics card amd radeon hd 7400m (windows catalyst identifies as hd6470m (and is correct))
        software – driver packaging version – 15.101.1001-150414a-184705c

        It is too bad as I can now run two external displays, doubt that will continue to work after running sudo aticonfig –uninstall

  12. fred says:

    on a fresh install i have done this;
    yum install gcc kernel-headers kernel-devel
    1) Download the AMD Catalyst 15.5 (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-catalyst-omega-15.5-linux-run-installers.zip
    3) Extract the run archive:
    $ sh amd-catalyst-omega-15.5-linux-run-installers.run –extract
    cd fglrx-install.X4jtYJ
    —-Here is the new part, done with two external’s plugged in to confirm switch to discrete gpu. The monitors turn on but don’t refresh, laptop screen goes off—–
    su
    echo MDIS > /sys/kernel/debug/vgaswitcheroo/switch
    ./ati-installer.sh 15.101 –install

    The installer detects the gpu and begins the install but fails due to dependencies, I can’t seem to Google a solution. so stuck here

    Log – /usr/share/ati/fglrx-install.log
    Supported adapter detected.
    Check if system has the tools required for installation.
    fglrx installation requires that the system have kernel headers. /lib/modules/4.0.4-301.fc22.x86_64/build/include/linux/version.h cannot be found on this system.
    One or more tools required for installation cannot be found on the system. Install the required tools before installing the fglrx driver.
    Optionally, run the installer with –force option to install without the tools.
    Forcing install will disable AMD hardware acceleration and may make your system unstable. Not recommended.

    Links to where i found the code
    http://www.linuxquestions.org/questions/slackware-14/how-to-switch-between-graphics-processors-using-vga-switcheroo-4175437338/
    http://rosinstrument.com/pb/m/16575.htm

  13. fred says:

    So i fixed that error with your code
    sudo cp /usr/include/linux/version.h /lib/modules/`uname -r`/build/include/linux/
    then
    echo MDIS > /sys/kernel/debu/vgaswitcheroo/switch
    then
    ./ati-installer.sh 15.101 –install

    Now my log file has this info — /usr/share/ati/fglrx-install.log——

    Supported adapter detected.
    Check if system has the tools required for installation.
    Uninstalling any previously installed drivers.
    Unloading radeon module…
    rmmod: ERROR: Module radeon is in use
    Unloading drm module…
    rmmod: ERROR: Module drm is in use by: ttm i915 drm_kms_helper radeon
    [Message] Kernel Module : Trying to install a precompiled kernel module.
    [Message] Kernel Module : Precompiled kernel module version mismatched.
    [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/4.0.4-301.fc22.x86_64/build SUBDIRS=/usr/lib/modules/fglrx/build_mod/2.6.x modules
    make[1]: Entering directory ‘/usr/src/kernels/4.0.4-301.fc22.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 ‘kcl_mem_pat_setup’:
    /usr/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:4471:15: error: implicit declaration of function ‘read_cr4’ [-Werror=implicit-function-declaration]
    cr4 = read_cr4();
    ^
    /usr/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:4472:9: error: implicit declaration of function ‘write_cr4’ [-Werror=implicit-function-declaration]
    write_cr4(cr4 & ~X86_CR4_PGE);
    ^
    /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:18: 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:258: recipe for target ‘/usr/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o’ failed
    make[2]: *** [/usr/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o] Error 1
    Makefile:1394: recipe for target ‘_module_/usr/lib/modules/fglrx/build_mod/2.6.x’ failed
    make[1]: *** [_module_/usr/lib/modules/fglrx/build_mod/2.6.x] Error 2
    make[1]: Leaving directory ‘/usr/src/kernels/4.0.4-301.fc22.x86_64’
    Makefile:88: recipe for target ‘kmod_build’ failed
    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

  14. fred says:

    on another fresh install, these are what i changed
    had to install patch
    then the install would give an xorg version error if not run as root
    when run as root would not open graphical installer until this line was run
    echo MDIS > /sys/kernel/debug/vgaswitcheroo/switch
    This was with the grub edit radeon.runpm=0

    now x wont start and xorg has these errors, doesn’t matter if started with or without grub edit

    [ 9.601] (–) Chipset Supported AMD Graphics Processor (0x6760) found
    [ 9.602] (WW) fglrx: No matching Device section for instance (BusID PCI:0@1:0:1) found
    [ 9.602] (II) fglrx: intel VGA device detected, load intel driver.
    [ 9.602] (II) LoadModule: “intel”
    [ 9.602] (II) Loading /usr/lib64/xorg/modules/drivers/intel_drv.so
    [ 9.602] (II) Module intel: vendor=”X.Org Foundation”
    [ 9.602] compiled for 1.16.3, module version = 2.99.916
    [ 9.602] Module class: X.Org Video Driver
    [ 9.602] ABI class: X.Org Video Driver, version 18.0
    [ 9.602] (WW) PowerXpress feature is not supported on A+I Mux platform. Please uninstall fglrx driver.
    [ 9.602] (EE) this is a Muxless PX A+I platform, we doesn’t supported it
    [ 9.602] (EE) No devices detected.
    [ 9.602] (EE)

  15. Sev says:

    Good Evening,

    Thanks for the post I’m slowly working through it to get my AMD card working for the first time on Fedora*Fedora22 even better :D* But I’m getting this error I haven’t tried to move on to the next steps yet since I got this. Please let me know if you can assist

    sed: -e expression #1, char 4: unknown command: `2′
    sed: -e expression #1, char 4: unknown command: `2′
    sed: -e expression #1, char 4: unknown command: `2′
    ln: failed to create symbolic link ‘./RPM-GPG-KEY-fedora-21-secondary’: File exists
    sed: -e expression #1, char 4: unknown command: `2′
    ln: failed to create symbolic link ‘./RPM-GPG-KEY-fedora-21-primary’: File exists
    sed: -e expression #1, char 4: unknown command: `2′
    ln: failed to create symbolic link ‘./RPM-GPG-KEY-fedora-21-primary’: File exists
    sed: -e expression #1, char 4: unknown command: `2′
    ln: failed to create symbolic link ‘./RPM-GPG-KEY-fedora-21-secondary’: File exists
    sed: -e expression #1, char 4: unknown command: `2′
    ln: failed to create symbolic link ‘./RPM-GPG-KEY-fedora-21-secondary’: File exists
    sed: -e expression #1, char 4: unknown command: `2′
    ln: failed to create symbolic link ‘./RPM-GPG-KEY-fedora-21-secondary’: File exists

    Thanks in advance,

    • Sorry about that! I transcribed that command improperly with a typo – remove the slash in front of the first ‘s’ in the sed command syntax (See Andrei Amuraritei’s post below.) I’ve modified my post so that the syntax is now correct, so you should be able to copy and paste directly from it if you like.

  16. R4v3nPr0 says:

    Hello everyone, I hope the admin page read this. Today I was able to install the AMD Catalyst 15.3 driver from Ubuntu in Fedora 22 with GNOME. I hope the site administrator contact me to explain how it was that I did it, so he can make a guide. Sorry for my bad English.

    • Hey, that’s great – it looks like you’re not the only one given the recent Phoronix article discussing benchmarks using that driver with Fedora 22. I’ve been planning on looking into it this weekend, but if you have a set of steps you can post, feel free.

      • R4v3nPr0 says:

        Hello again, to install the AMD Catalyst 15.3 in Fedora 22 with KDE I had to make my own version of the driver and the installer or I think that’s what I did.

        To install the driver on Fedora you need to do is download the controller that I made from here: https://mega.co.nz/#!q09CzB7L!iCrIJqhWD5De-P_n-D6vPc3XCLsreEBo1avtyC99IeE

        After downloading it you have to run the following commands:

        su
        dnf install gcc kernel-devel kernel-headers dkms fakeroot
        cp /usr/include/linux/version.h /lib/modules/`uname -r`/build/include/linux/
        sh ati-installer.sh 15.20.1013 –install
        aticonfig –initial

        Note: The driver is patched to work with the Kernel 4.0.4. I do not know if work with other versions of the kernel.

  17. Thanks for the instructions.
    There’s a typo(?) in your GPG for line which didn’t work, this fixes it:
    for LINK in `find -name RPM-GPG-KEY-fedora-22\* -type l`; do LINKMV=`echo $LINK | sed ‘s/22/21/g’`; if [[ $LINK =~ armhfp|i386|x86_64 ]]; then ln -s RPM-GPG-KEY-fedora-21-primary $LINKMV; else ln -s RPM-GPG-KEY-fedora-21-secondary $LINKMV; fi; done;

  18. Sev says:

    I appreciate all the support you have given to helping get the drivers installed. I am now also running Amd catalyst drivers on fed 22 kde. Enjoying some Linux gaming 😀

  19. Joao says:

    Hello. I’m trying to use your instructions to get my ATI graphics working, but I’m getting some errors: when I do dnf repolist I get the following: Error: Failed to synchronize cache for repo ‘updates21’ from ‘https://mirrors.fedoraproject.org/metalink?repo=updates-released-f21&arch=x86_64’: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
    What am I doing wrong?
    Thanks in advance

    • Well, from the looks of it, that link is correct and should work. What happens when you attempt to reach it in a browser? I am prompted to download the metadata.xml file. If you can’t reach the site, something may be wrong with your local area network and your ability to reach the Internet. Do you connect through a proxy, per chance?

    • Hey man, thanks for the effort – I’ll check it out as soon as I can.

      • Anyways, If you need, you can share your ideas and / or progress. I could have some free time to help making this possible. For example, create SPEC file 🙂

    • aQuil says:

      Thanks so much R4v3nPr0. Worked perfectly for me with Xorg Server 1.17 and Kernel 4.05.

    • Oh, thanks, man!!! I guess making RPM package to install this is too much to ask…? Fedora COPR provides free build system for major architectures. And setup simple. Maybe you can try? ( I have no free PC for that. My home PC usually does Vagrant + Puppet + Jenkins + QA stuff ) 🙂

      • Yeah, I need to get that going – it’d be really nice to maintain a simple RPM package for the Catalyst driver. Sadly, this is what I can manage at the moment – a lot of free time I have not. I do plan on getting to that, though.

  20. bonengo says:

    hi, i got an issue, i made [[[cp /usr/include/linux/version.h /lib/modules/`uname -r`/build/include/linux/
    cp: impossible de créer le fichier standard « /lib/modules/4.0.5-300.fc22.x86_64/build/include/linux/ »: Aucun fichier ou dossier de ce type
    ]]] FOr explain the system say than i cannot create the folder for version.h, but in fact « /lib/modules/4.0.5-300.fc22.x86_64/build/ ” exist but i cannot modifiy it event as root for apply…

    that’s the last thing i would have to do before to do an installation…
    Any suggestions?

    • That’s very strange. Do you have all the prerequisite packages installed? I believe kernel-headers would provide the files you need – the “build” directory should be a symbolic link to /usr/src/kernels/4.0.5-300.fc22.x86_64 which I believe is provided by kernel-devel. Check to ensure you have kernel-devel (and the other prerequisite packages) installed and let me know what you find.

      • bonengo says:

        well i have all the files needed, it sound like there a symbolic link never been made, or a write/lecture issue, but i do it as root user, so I don’t know…

        Note : not first time than i have issues like than with linux, requesting files already existing but not finding them…

  21. usmangt says:

    Hi, I have read your documentation. You mentioned that it probably should work with any non-GNOME based fedora spin. So will it work on XFCE. ??

    Asking to be sure as struglling since f21 (followed many gnome guides and in the end system crashed 😦 )

    I kinda like XFCE as lightweight so if this works with fglrx then would be cool

  22. usmangt says:

    Also one thing. As I have already an up to date system. So now i have different version of kernel-headers 4.0.5 (not same as you wrote in guide):

    [usman@dhcppc3 ~] $ rpm -qa | grep kernel
    libreport-plugin-kerneloops-2.6.0-1.fc22.x86_64
    kernel-modules-extra-4.0.5-300.fc22.x86_64
    kernel-devel-4.0.5-300.fc22.x86_64
    kernel-modules-4.0.4-301.fc22.x86_64
    kernel-tools-4.0.5-300.fc22.x86_64
    kernel-tools-libs-4.0.5-300.fc22.x86_64
    abrt-addon-kerneloops-2.6.0-1.fc22.x86_64
    kernel-4.0.5-300.fc22.x86_64
    kernel-4.0.4-301.fc22.x86_64
    kernel-core-4.0.4-301.fc22.x86_64
    kernel-modules-4.0.5-300.fc22.x86_64
    kernel-headers-4.0.5-300.fc22.x86_64
    kernel-modules-extra-4.0.4-301.fc22.x86_64
    kernel-tools-libs-devel-4.0.5-300.fc22.x86_64
    kernel-core-4.0.5-300.fc22.x86_64

    So will the installation work ?

    • Well, I haven’t used XFCE, so I can’t say with certainty whether it will work or not. I don’t think the kernel version you cite will cause problems, but I haven’t tried it yet either. You can always give it a shot and let me know how it goes – reversing the steps I have provided is a simple matter.

  23. Tyson says:

    Does not work with Fedora 21 kernel 4.0.5.
    Used ‘amd-catalyst-omega-15.5-linux-run-installers.run’ and ‘ultra-2.patch’ as described in installation steps above.
    Hangs at “Started GNOME Display Manager”
    Had to go to a terminal and do the ‘aticonfig –uninstall’ thing to get back to normal.
    Any idea why it does not work?

    • Well, my solution requires that you not use the GNOME Display manager or GNOME. The Wayland code prevents the Catalyst driver from functioning properly (as explained in the post). I used the Fedora 21 KDE Spin, and now I use the Fedora 22 KDE Spin. If you’re interested, I highly recommend the upgrade to Fedora 22 – Plasma Desktop 5 is killer.

    • iUser says:

      It’s a really long story but to put it in few words:
      – Gnome 3 since beginning is acting up when it comes to Propertiary Drivers (AMD and probably nVidia too).
      – Gnome 3 if memory serves had (and maybe still has?) some problems when it comes to “super” desktop (Compiz and such).

      Also in my opinion looks ugly but I’m not gonna punish anyone for using it. xD
      If you like Gnome and don’t mind a bit old-school look, MATE is your answer.
      If you don’t mind KDE, then either latest KDE or Trinity Desktop Environment (TDE), however for TDE you need external repository.

      XFCE and other “light” desktops are pretty nice choices too, I think I was using XFCE before discovering MATE.

      Also I have installed on backup PC Fedora 22 and will try to update to Kernel 4.0.5 and do AMD Catalyst installation according to this great guide. I will try to post results ASAP in new post or whatnot…

      Now where is my PAC-7000 Golem with backup parts…

      iUser

      • iUser says:

        Oh snap, at the moment I was writing it I haven’t noticed that there is Kernel 4.0.6 ._.
        OH WELL! On this PC if something will go wrong, I can always start over.

        iUser

  24. iUser says:

    Success!
    $ uname -r
    4.0.6-300.fc22.x86_64
    $ glxinfo | grep ‘direct rendering’
    direct rendering: Yes

    The only thing that happened a bit oddly was that after installing Catalyst it couldn’t reboot by itself. However after reboot by the magic button it made itself to the graphical mode, Steam has finally started working &c.
    I can confirm above Kernel as valid for that guide as well 🙂

    Thank You very much Bitwiseoperator!

    Excelsior!

  25. steel says:

    Today AMD released the new Catalyst 15.7 Driver (based on 15.20), unfortunately this driver only supports kernels up to 3.19. The ultra-2.patch file needs to be modified for installing the driver on Fedora 22 with Kernel 4.0.x. You need to remove the following lines because they already implemented a compatibility with the 4.0.x Kernel at this position:

    @@ -4816,8 +4816,8 @@
    {
    unsigned long orig_level;

    – orig_level = __get_cpu_var(kasExecutionLevel);
    – __get_cpu_var(kasExecutionLevel) = level;
    + orig_level = __this_cpu_read(kasExecutionLevel);
    + __this_cpu_write(kasExecutionLevel, level);

    return orig_level;
    }
    @@ -4829,7 +4829,7 @@
    */
    static unsigned long kas_GetExecutionLevel(void)
    {
    – return __get_cpu_var(kasExecutionLevel);
    + return __this_cpu_read(kasExecutionLevel);
    }

    After these modifications and following your instructions i could successfully install the 15.7 driver on Fedora 22.

    thanks & regards

  26. whitesoundcl says:

    patch -p0 < ultra-2.patch
    bash: patch: no se encontró la orden (Doesn't find the order)
    Please help

  27. Zaggyr says:

    Everytime I try run this command:
    patch -p0 < ultra-2.patch

    it appears:

    bash: patch: command not found…
    Install package 'patch' to provide command 'patch'? [N/y]

    What should I choose? Yes or No?

    • Zaggyr says:

      Sorry, patch wasn’t installed, but after install, I could get the command to run, but the result appeared this:

      $ patch -p0 < ultra-2.patch
      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).
      Hunk #5 FAILED at 4834.
      Hunk #6 FAILED at 4847.
      2 out of 6 hunks FAILED — saving rejects to file common/lib/modules/fglrx/build_mod/firegl_public.c.rej
      patching file common/lib/modules/fglrx/build_mod/kcl_str.c

      Is it correct?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s