Voici la méthode pour installer le pilote propriétaire AMD avec le noyau 4.
A souligner que je l'ai testé sous Fedora 21 et que cette méthode convient aussi bien pour les noyaux 3.19 que 4.0. Je pense qu'elle convient aussi au noyau 3.17 mais je vérifierai plus tard.
Pour commencer:
s'assurer qu'on dispose bien des prérequis, les paquets gcc, kernel-header, kernel-devel
créer un fichier texte nommé par exemple 4_0-kernel.patch avec vi ou edit contenant:
--- common/lib/modules/fglrx/build_mod/kcl_acpi.c 2014-09-23 10:42:10.000000000 -0400
+++ common/lib/modules/fglrx/build_mod/kcl_acpi.c 2014-11-13 16:44:23.187112123 -0500
@@ -831,7 +831,7 @@
static acpi_status KCL_ACPI_Slot_No_Hotplug(KCL_ACPI_DevHandle handle, u32 lvl, void *data, void **rv)
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,7)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,7) && LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)
struct acpi_device *tdev = NULL;
struct pci_dev *pdev = (struct pci_dev *)data;
int device = 0;
--- common/lib/modules/fglrx/build_mod/firegl_public.c 2015-03-22 14:13:36.628837777 -0400
+++ common/lib/modules/fglrx/build_mod/firegl_public.c 2015-03-22 14:14:43.678029922 -0400
@@ -4468,8 +4468,13 @@
if (cpu_has_pge)
{
- cr4 = read_cr4();
- write_cr4(cr4 & ~X86_CR4_PGE);
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
+ cr4 = read_cr4();
+ write_cr4(cr4 & ~X86_CR4_PGE);
+ #else
+ cr4 = __read_cr4();
+ __write_cr4(cr4 & ~X86_CR4_PGE);
+ #endif
}
__flush_tlb();
@@ -4482,7 +4487,11 @@
write_cr0(cr0 & 0xbfffffff);
if (cpu_has_pge)
{
- write_cr4(cr4);
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
+ write_cr4(cr4);
+ #else
+ __write_cr4(cr4);
+ #endif
}
local_irq_restore(flags);
@@ -4509,8 +4518,13 @@
if (cpu_has_pge)
{
- cr4 = read_cr4();
- write_cr4(cr4 & ~X86_CR4_PGE);
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
+ cr4 = read_cr4();
+ write_cr4(cr4 & ~X86_CR4_PGE);
+ #else
+ cr4 = __read_cr4();
+ __write_cr4(cr4 & ~X86_CR4_PGE);
+ #endif
}
__flush_tlb();
@@ -4522,7 +4536,11 @@
write_cr0(cr0 & 0xbfffffff);
if (cpu_has_pge)
{
- write_cr4(cr4);
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
+ write_cr4(cr4);
+ #else
+ __write_cr4(cr4);
+ #endif
}
local_irq_restore(flags);
@@ -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);
}
/** \brief Type definition for kas_spin_lock() parameter */
--- common/lib/modules/fglrx/build_mod/kcl_str.c 2014-11-28 21:02:10.000000000 +0100
+++ common/lib/modules/fglrx/build_mod/kcl_str.c 2015-05-05 21:49:39.903037577 +0200
@@ -169,7 +169,11 @@
const char* s2,
KCL_TYPE_SizeSigned count)
{
- return strnicmp(s1, s2, count);
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
+ return strnicmp(s1, s2, count);
+ #else
+ return strncasecmp(s1, s2, count);
+ #endif
}
/** \brief Locate character in string
télécharger le fichier du pilote AMD Catalyst 14.12 (fglrx) driver depuis le site AMD
ici
Changer le répertoire courant pour celui où le fichier a été enregistré par exemple ~/Telechargements
dézipper le fichier téléchargé:
$ cd ~/Telechargements
$ unzip amd-catalyst-omega-14.12-linux-run-installers.zip
changer pour le répertoire qui vient d'être créé puis extraire le pilote:
$ cd fglrx-14.501.1003/
$ sh amd-driver-installer-14.501.1003-x86.x86_64.run --extract
Vous avez un message comme "“Created directory fglrx-install.xxxxxxx″ puis “Verifying archive integrity… All good.” suivi de “Uncompressing AMD Catalyst(TM) Proprietary Driver-14.501.1003″, et des points qui s'affichent.
Vous pouvez voir qu'un nouveau répertoire vient d'être créé nommé fglrx-install.{quelquechose}
Déplacer ou recopier le fichier 4_0-kernel.patch qu'on a créé plus tôt dans ce répertoire fglrx-install.{quelquechose}.
appliquer le patch avec la commande:
patch -p0 < 4_0-kernel.patch
on doit obtenir les messages suivants:
(Stripping trailing CRs from patch; use --binary to disable.)
patching file common/lib/modules/fglrx/build_mod/kcl_acpi.c
patching file common/lib/modules/fglrx/build_mod/firegl_public.c
patching file common/lib/modules/fglrx/build_mod/kcl_str.c
passer sous root:
su (éviter su - car ça fait changer de répertoire), etc
on doit recopier un fichier des headers:
# cp /usr/include/linux/version.h /lib/modules/`uname -r`/build/include/linux/
l'opération est presque terminée, il reste a exécuter toujours sous root:
./ati-installer.sh 14.501 --install
On ne doit normalement pas avoir d'erreur. Le fichier log est consultable dans /usr/share/ati/install.log.
Rebooter et vérifier en tapant dans un terminal: fglrxinfo que c'est bien le pilote fglrx qui est actif.