Posts tagged - fglrx

Fedora 18, fglrx and XvBA

Since I’ve already upgraded my machines to Fedora 19, I figured I should finish this entry… As a side note, I updated using FedUp , which has worked mostly flawlessly on all my machines.

One of the reasons people use the RPM Fusion drivers is for ease of updating packages, which I fully understand. Consequently, one can update with the AMD/ATI variant, which doesn’t seem to be mentioned often or at all. All you need is DKMS and my little patch (see below) for the AMD Catalyst. The Linux Engineering team at Dell wrote DKMS (Dynamic Kernel Module Support). DKMS is a framework for Linux drivers that are not part of the Linux source: like proprietary drivers. When you have DKMS installed and update the kernel, DKMS will build the module automatically.

diff -puNr fglrx-13.4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c fglrx-13.4/common/lib/modules/fglrx/build_mod/firegl_public.c
--- fglrx-13.4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c	2013-01-15 10:42:53.000000000 -0500
+++ fglrx-13.4/common/lib/modules/fglrx/build_mod/firegl_public.c	2013-03-09 11:09:39.147353586 -0500
@@ -98,6 +98,9 @@
 // ============================================================
+#ifndef VM_RESERVED
 // always defined
 #define __AGP__BUILTIN__
diff -puNr fglrx-13.4.orig/common/lib/modules/fglrx/build_mod/ fglrx-13.4/common/lib/modules/fglrx/build_mod/
--- fglrx-13.4.orig/common/lib/modules/fglrx/build_mod/	2013-01-15 10:42:53.000000000 -0500
+++ fglrx-13.4/common/lib/modules/fglrx/build_mod/	2013-03-14 21:23:10.378185394 -0400
@@ -199,6 +199,9 @@ cd $current_wd
 # ==============================================================
 # locate and verify contents of kernel include file path
+## Create link to version.h
+link /usr/src/kernels/${uname_r}/include/generated/uapi/linux/version.h /usr/src/kernels/${uname_r}/include/linux/version.h
 # verify match with respective line in linux/version.h
 # sample: #define UTS_RELEASE "2.4.0-test7"

The first part of the patch defines VM_RESERVED , which was removed/changed as of Linux 3.7 . The second part of the part of the patch adds to the install scripts used by DKMS install, which creates a link to version.h . If you’ve tried to install fglrx with AMD’s installer, it probably will complain about a missing version.h file, which this patch fixes.

Installing AMD Catalyst drivers

## 1. Install DKMS
yum install dkms
## 2. Install dependencies for fglrx
yum install bash chkconfig fontconfig freetype glibc libgcc libICE libSM libstdc++ libX11 libXcursor libXext libXfixes libXinerama libXrandr libXrender libXxf86vm nx ocl-icd-devel qt qt-x11
## 3. Restart the computer
## 4. Unzip the AMD file you've downloaded
## 5. Extract the Catalyst package contents into a folder called fglrx-13.4
./ --extract fglrx-13.4
## 6. Patch the installer
patch -p0 <fglrx-13.4-fc18.patch
## 7. Enter the directory to start the install
cd fglrx-13.4
## 8. Install the patched AMD driver
./ 13.4 --install

Updating packages with the AMD’s Catalyst

AMD’s installer moves a few things around and directs the symlinks to their libraries. AMD provides some scripts to move things around.

## Switch to Open-Source drivers
$(rpm --eval %{_libdir})/fglrx/switchlibGL intel && $(rpm --eval %{_libdir})/fglrx/switchlibglx intel
## You want to update packages...
yum update
## Switch to AMD drivers
$(rpm --eval %{_libdir})/fglrx/switchlibGL amd && $(rpm --eval %{_libdir})/fglrx/switchlibglx amd

XvBA driver updates

I’ve updated the XvBA driver SRPM to be a little easier for those not use to debugging: added some hard to miss messages when certain build error occurs and updated the build requirements. In addition, I finally read the AMD license—unless a lawyer tells me otherwise—I have included XvBA-SDK in the SRPM. Perhaps, I will make a devel package to install the XvBA-SDK.
Consequently, I also changed the build process when building against a AMD/ATI install the process is a little bit different: amdbuild must be defined to 1 .

rpmbuild -bb SPECS/libva-xvba-driver.spec --define='amdbuild 1'

Without the define option, the package is built for the RPM Fusion drivers. Since I made the above changes, I decided there was no reason I shouldn’t build the RPMS for people.
Fedora 17 XvBA links:
Fedora 18 XvBA links:

Again, if anybody has issues or questions please feel free to comment.


Fedora 17, fglrx and XvBA

I decided to finally update my computer to Fedora 17 (Beefy Miracle) this past weekend. Overall, the upgrade went smoothly considering there is a bunch of lint on my system because I’ve been upgrading it since FC8. I did run into some graphics issues…

Since I play games and graphics chips are black-boxes, I use the ATI/AMD binary blob: Catalyst aka fglrx. Using the binary blob is going to be a problem when I start using Qt 5 because it depends on XCB instead of XLIB. As I’ve mentioned before, Fedora is a pure Linux distribution. Therefore, you’ll have to use methods outside of Fedora to install proprietary drivers. The “recommended method” is to use the RPM Fusion drivers. The RPM Fusion drivers did not work for me under Fedora 16. Consequently, using the installer from AMD did work with Fedora 16.

I’m pleased to say the RPM Fusion drivers for Fedora 17 did work but not completely. Modern day graphics cards have hardware that assist in decoding video, which is another reason I use the proprietary drivers. When AMD’s XvBA is not in use, the CPU load ranges from 30-50% but I digress. After installing the RPM Fusion catalyst drivers, I immediately built the XvBA rpm and installed it. Unfortunately, when I started VLC the video acceleration didn’t work. Since I firmly believe in the open-source way, I filed a bug. A possible fix: make libGL part of the alternates like java is. Consequently, I’ll be using the proprietary driver until the bug is resolved or the open-source community receives the secret sauce from AMD.

Quick How-to

# 1. Download the catalyst driver from AMD (aka fglrx)
# 2. Decompress/unzip the download
unzip amd-driver-installer-catalyst-*.zip
# 3. Install AMD's version of fglrx. NOTE: RPM-Fusion driver does not work.
# 4. Restart
# 5. Make sure the catalyst/fglrx driver is working
# 6. Download XvBa Source RPM
# 7. Build RPM
rpmbuild --rebuild libva-xvba-driver-0.8.0-4.fc17.src.rpm
# 8. Install the built RPM
yum install ~/rpmbuild/RPM/`uname -m`/libva-xvba-driver-0.8.0-4.fc17.x86_64.rpm

Please feel free to comment if you have any issues.


Fedora 18, fglrx and XvBA