PDA

View Full Version : Install AMD/ATI Driver in Kali Linux 1.x



blackMORE
2013-06-13, 03:09
I always had issues with ATI/Intel gfx cards in pretty much every version of Linux I've used. Kali is no different. Following guide would help to resolve the problem for everyone with similar issues. Many thanks to 'Sani Morphic' for his original post. Also big thanks goes to "http://wiki.debian.org/ATIProprietary" for their updates on Linux Header and ATIEventSD notes.

Note: This guide works fine with Kernel 3.7. (as available in official Kali repository).

I've kept a copy of this guide here: Install AMD ATI Driver (fglrx) in Kali Linux 1.x (http://www.blackmoreops.com/2013/10/22/install-amd-ati-driver-fglrx-in-kali-linux-1-x/)
Users who wish to try our AMD APP SDK, Pyrit and CAL++ to make GPU cracking faster, please read the following guides:
How to install AMD APP SDK in Kali Linux? (http://www.blackmoreops.com/2013/11/22/install-amd-app-sdk-kali-linux/)
How to install CAL++ in Kali Linux? (http://www.blackmoreops.com/2013/11/22/install-cal-kali-linux/)
How to install Pyrit in Kali Linux? (http://www.blackmoreops.com/2013/11/22/install-pyrit-in-kali-linux/)

Note: Kali Linux 1.0.6 users running Kernel version 3.12.6

If you're a Kali Linux 1.0.6 users running Kernel version 3.12.6 following instructions will not work anymore. Follow these new instructions on how to Install AMD ATI proprietary driver (fglrx) in Kali Linux 1.0.6 running Kernel version 3.12.6 (http://www.blackmoreops.com/2014/02/11/install-amd-ati-proprietary-driver-fglrx-in-kali-linux-1-0-6-running-kernel-version-3-12-6/)

Step 1


apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev* xorg-driver-fglrx


Check your /etc/apt/sources.list



# deb cdrom:[Debian GNU/Linux 7.0 _Kali_ - Official Snapshot amd64 LIVE/INSTALL Binary 20130315-11:02]/ kali contrib main non-free
# deb cdrom:[Debian GNU/Linux 7.0 _Kali_ - Official Snapshot amd64 LIVE/INSTALL Binary 20130315-11:02]/ kali contrib main non-free

deb http://http.kali.org/kali kali main non-free contrib
deb-src http://http.kali.org/kali kali main non-free contrib

## Security updates
deb http://security.kali.org/kali-security kali/updates main contrib non-free
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free


Step 2

apt-get update

Step 3


apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,')
apt-get install fglrx-driver fglrx-control fglrx-glx fglrx-atieventsd fglrx-modules-dkms
apt-get install fglrx-glx-ia32
...

Error! Bad return status for module build on kernel: 3.7-trunk-amd64 (x86_64)
Consult /var/lib/dkms/fglrx/12-6+point/build/make.log for more information.



Step 4 (download patch and patch)

Need to patch the kernel
Download patch from here (http://www.blackmoreops.com/wp-content/uploads/2013/10/fglrx-3.71.patch) (I've personally used this patch but users are advised to check/verify it before installing.)

Download and "fglrx-3.7.patch (http://www.blackmoreops.com/wp-content/uploads/2013/10/fglrx-3.71.patch)" and copy to /root
(Thanks to Henry Hermawan (http://henryhermawan.blogspot.com.au/2012/12/amd-catalyst-patch-for-kernel-37x.html) for posting this patch)

Copy the file fglrx-modules-dkms_1%3a12-6+point-3_amd64.deb //check if amd6 architecture or i386, based on which version you're using filename might be slightly different

to /root

from

/var/cache/apt/archives



cp /var/cache/apt/archives/fglrx-modules-dkms_1%3a12-6+point-3_amd64.deb /root

Step 5 (patch and repack)



mkdir -p extract/DEBIAN
dpkg-deb -x fglrx-modules-dkms_1%3a12-6+point-3_amd64.deb extract/
dpkg-deb -e fglrx-modules-dkms_1%3a12-6+point-3_amd64.deb extract/DEBIAN

cp fglrx-3.7.patch extract/usr/src/fglrx-12-6+point/
cp Downloads/fglrx-3.7.patch extract/usr/src/fglrx-12-6+point/
cd extract/usr/src/fglrx-12-6+point/
patch -p0 < fglrx-3.7.patch

patching file firegl_public.c
Hunk #1 succeeded at 3890 (offset -2 lines).
Hunk #2 succeeded at 3920 (offset -2 lines).
Hunk #3 succeeded at 3935 (offset -2 lines).
Hunk #4 succeeded at 3944 (offset -2 lines).
Hunk #5 succeeded at 3982 (offset -2 lines).
Hunk #6 succeeded at 4013 (offset -2 lines).
Hunk #7 succeeded at 4023 (offset -2 lines).
Hunk #8 succeeded at 4044 (offset -2 lines).

cd /root
mkdir build
dpkg-deb -b extract/ build/
dpkg-deb: building package `fglrx-modules-dkms' in `build//fglrx-modules-dkms_1%3a12-6+point-3_amd64.deb'.

cd build
dpkg -i *.deb
...
DKMS: install completed.

Generate xorg configuration


aticonfig --initial -f

Step 6 (radeon and reboot)



leafpad /boot/grub/grub.cfg

you see this:


### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 3.7-trunk-amd64' --class debian --class gnu-linux --class gnu --class os {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root 7f79eea2-1668-407f-b7ed-d5613fecd26c
echo 'Loading Linux 3.7-trunk-amd64 ...'
linux /boot/vmlinuz-3.7-trunk-amd64 root=UUID=7f79eea2-1668-407f-b7ed-d5613fecd26c ro initrd=/install/gtk/initrd.gz quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.7-trunk-amd64
}

add radeon.modeset=0 in the end of the following line

linux /boot/vmlinuz-3.7-trunk-amd64 root=UUID=7f79eea2-1668-407f-b7ed-d5613fecd26c ro initrd=/install/gtk/initrd.gz quiet

So the line above becomes this:

linux /boot/vmlinuz-3.7-trunk-amd64 root=UUID=7f79eea2-1668-407f-b7ed-d5613fecd26c ro initrd=/install/gtk/initrd.gz quiet radeon.modeset=0

Note: "fee64a58-2e36-43f5-962d-8c33f936d452" UUID would be different for every PC. Use your one here.

Save and exit

reboot

Feedback is most welcome.

Edit Note: A version of this Guide will be added here (http://www.blackmoreops.com/?p=1) including patch file.

Gr4nD T3R0R
2013-06-23, 09:37
brother your link is working (fglrx-3.7.patch)

Gr4nD T3R0R
2013-06-23, 09:39
oh i found it please update your patch link with this one
https://docs.google.com/file/d/0B4VfWnVnFzi4a3R6N2xnOC1TWlU/edit?pli=1

blackMORE
2013-06-23, 12:23
ah yes, Thanks for pointing it out. Post updated. I'm keeping a more updated version here: http://wiki.cchtml.com/index.php/Kali

skysploit
2013-06-28, 20:10
blackMORE,
Great job! This worked so good that I made it a bash script... You can get it here: https://docs.google.com/file/d/0B3s5DO68wWL-X1BEb0tOTXRPS1k/edit?usp=sharing

I tested it using the XFX Double D Radeon HD 7870 and the Kali 1.0.3 amd64 ISO...

~skysploit

brazen
2013-07-08, 21:07
so awesome! Thank you so much! I want to learn this stuff so much! THANKS!

dexvils
2013-08-13, 01:39
so awesome..thanks this is I need

blackMORE
2013-08-14, 02:43
@skysploit

Sorry, the file you have requested does not exist.

I'll remove your link from Wiki for now. Thanks

Doel
2013-08-30, 04:59
Work 100% Thanks :)

thomasb9511
2013-09-23, 00:54
What about OpenCL support?
I install the AMD APP SDK and get an odd error

root@kali:~# oclhashcat+ -m 0 098f6bcd4621d373cade4e832627b4f6 --force
/usr/bin/oclhashcat+: line 3: 4467 Segmentation fault ./oclHashcat-plus.bin "$@"

and if I run clinfo I get

root@kali:~# clinfo
Segmentation fault

Does anyone have recent guide to setup opencl?

blackMORE
2013-09-23, 05:24
What about OpenCL support?
I install the AMD APP SDK and get an odd error

root@kali:~# oclhashcat+ -m 0 098f6bcd4621d373cade4e832627b4f6 --force
/usr/bin/oclhashcat+: line 3: 4467 Segmentation fault ./oclHashcat-plus.bin "$@"

and if I run clinfo I get

root@kali:~# clinfo
Segmentation fault

Does anyone have recent guide to setup opencl?
Haven't really played with OpenCL. However this post (http://www.backtrack-linux.org/forums/showthread.php?t=40917) might be what you're after .. the ideology would be same I assume. A quick Google search returned a number of guides for Debian based installation (given that BT was quite different to Kali, Debian installation guides are more suited to your needs)..
This (http://wiki.tiker.net/OpenCLHowTo)looks promising ..

thomasb9511
2013-09-23, 17:39
Haven't really played with OpenCL. However this post (http://www.backtrack-linux.org/forums/showthread.php?t=40917) might be what you're after .. the ideology would be same I assume. A quick Google search returned a number of guides for Debian based installation (given that BT was quite different to Kali, Debian installation guides are more suited to your needs)..
This (http://wiki.tiker.net/OpenCLHowTo)looks promising ..

I did that. The version your that guide installs of amd driver is an older version like 12.x not 13.1 or 13.4 and that is what is required for the AMD APP SDK. Plus, that tiker guide is for the cpu not the gpu.

thomasb9511
2013-09-23, 17:57
We just need a giude that sets up both the AMD GPU drivers and the AMD APP SDK.

Roxie2
2013-09-24, 00:22
I checked my sources.list and did not have the following listed:

deb-src http://security.kali.org/kali-security kali/updates main contrib non-free

Please tell me how to get the updates.

Thanks loads, Roxie2

ut0ugh1
2013-09-24, 09:07
quite simple dude

echo -n deb-src http://security.kali.org/kali-security kali/updates main contrib non-free >> /etc/apt/sources.list && apt-get update

Roxie2
2013-09-24, 21:01
ut0ugh1,

Thanks for the info. I entered the above echo command with the following result:

"Err http://security.kali.org kali/updates release.gpg
could not resolve 'security.kali.org'
Reading package lists. . .Done"

There was more, but that was the main thing. Would you please reconsider the echo statement?

Greatly appreciate your help.

Roxie2

ut0ugh1
2013-09-28, 10:46
i have successfully installed either latest official or latest beta with

apt-get install --reinstall libgl1-mesa-glx -y && ldconfig -p | grep libGL.so.1
still persist problem in running x org so by now there is no gui. :( any help

ut0ugh1
2013-09-28, 10:57
@ Roxie2

leafpap /etc/apt/leafpad /etc/apt/sources.list
in that file you shoud only have 2 lines with rows starting with cdrom and then you should substitute all other by pasting

deb http://http.kali.org/kali kali main non-free contrib
deb http://security.kali.org/kali-security kali/updates main contrib non-free
deb-src http://http.kali.org/kali kali main non-free contrib
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free
and 2 lines with rows starting with cdrom.

zerokewl
2013-10-03, 05:27
Thank you for your guide, i was able to get a older version installed following this.

Pytrit works fine after this, but i can't get oclhashcat to work because 13.1 or 13.4 is required. When i install the 13.4 ATI Drivers for my 2xHD5870's, there is a library error when trying to open CCC. Any ideas how to resolve that issue ? There are lots of other people out there im sure wondering the same thing.

Thank you.

ut0ugh1
2013-10-03, 15:15
a solution that partially solve is ,as I told you, if your problem is the same I got (missing libGL.so.1)

apt-get install --reinstall libgl1-mesa-glx -y && ldconfig -p | grep libGL.so.1 .

martimarti
2013-10-03, 23:32
Hello to everyone,

AMD Radeon HD 7500M/7600M Series - this is my video card, HP ProBook 4540s - this is my notebook.

I installed Kali Linux following the instructions and all that. I installed the driver, restarted but after that when I put in terminal "pyrit list_cores" result is:
Pyrit 0.4.0 (C) 2008-2011 Lukas Lueg http://pyrit.googlecode.com [^]
This code is distributed under the GNU General Public License v3+

The following cores seem available...
0000001: 'CPU-Core (SSE2)'
#2: 'CPU-Core (SSE2)'
#3: 'CPU-Core (SSE2)'
0000004: 'CPU-Core (SSE2)'

When I type "aticonfig --initial" result:
Uninitialised file found, configuring.
Using /etc/X11/xorg.conf
Saving back-up to /etc/X11/xorg.conf.original-1

Am I missing something? I searched and tried different ways but none seems to work. If I'm doing something wrong, please correct me!

Thank you!

Quadturbo
2013-10-09, 04:54
Setup:
AMD 7970 x 4

Kali install went fine.
Followed fglrx install by blackmore (thanks) and it was the ONLY instruction that worked.

Problem is that the resolution looks crappier than when I had "radeon.modeset=0" alone by itself in grub.cfg.

The other problem, is that I just can't get pyrit list_cores to recognize the GPUs.

I installed AMDSDK 2.7...no go.
I tried AMDSDK 2.8....no go.

After I finally installed cpyrit opencl....no go.

I tried going back to xserver 1.11 and installing the newest Catalyst 13.4 from AMD....no go.
I patched Catalyst 13.4 and 13.1 with fglrx 3.7 patch....no go.

Every single link in my google search has become pink.
Anyone have any suggestions for recognizing an AMD GPU HD?

Thanks

machine
2013-10-16, 01:42
You have no idea how grateful I am for this, man. I registered here just to tell you that. It works flawlessly. Thank you so much.
I'm using a Dell Precision M4700 with an AMD FirePro M4000 videocard if anyone has a similar setup, so you know it works perfectly with this patch.

Nanex_Drew
2013-11-01, 05:23
thanks very good guide, I worked without problems with a hd 5870 and 3.7 kernel, but the kernel upgrade to 3.10-3 not work for me. -

you know if there is a new way of doing it with 3.10-3 kernel?

Thank you.

blackMORE
2013-11-01, 21:05
thanks very good guide, I worked without problems with a hd 5870 and 3.7 kernel, but the kernel upgrade to 3.10-3 not work for me. -

you know if there is a new way of doing it with 3.10-3 kernel?

Thank you.
I've got to test it before I can post it here. Till then, if you choose 3.7 Kernel, my initial instructions still works.
Also you could try Krzysztof Kolasa's github post and patched (he's more specific to Ubuntu) but I would assume it might work. Thanks

Nanex_Drew
2013-11-01, 23:09
I try to Kolasa before without results ... I try with: fglrx-12.104 and fglrx-13.152 from kolasa
also try to patch: fglrx fglrx-3.71.patch and-3.8.patch from Henry Hermawan
I can only hope.... if I find any solution the posting over here
continue testing!!

thanks Blackmore!!

PD: sorry for my English.-

Shining_KoW210
2013-11-04, 22:38
I used this guide to install on my 1.0.5 fresh hard drive install.

I have two HD Radeon 6870's and the drivers installed fine but now I have this problem.

http://i110.photobucket.com/albums/n89/knightsofwar10/th_Screenshotfrom2013-11-03231228_zpsa67e5e1c.png (http://s110.photobucket.com/user/knightsofwar10/media/Screenshotfrom2013-11-03231228_zpsa67e5e1c.png.html)

bandeross83
2013-11-10, 18:24
Step 6 (radeon and reboot)



leafpad /boot/grub/grub.cfg






head -3 /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#


Try this:


sed 's/quiet/quiet radeon.modeset=0/g' -i /etc/default/grub
update-grub
reboot

Lancha
2013-11-14, 16:43
how install driver in kali 1.0.5 32 bits for SAPPHIRE HD 2400PRO AGP

r0dn3y
2013-11-15, 17:21
First of all, thanks for the great guide..

Now, I'm having an issue. The system specs for the computer are located below the question. I have run through your guide, as well as using an older method to attempt to install the drivers from the AMD site.

When I install using your method, and attempt to run aticonfig --initial -f, I get "No supported adapters detected".
When I installing using the downloaded drivers from AMD's site, aticonfig works, and clinfo registers my GPUs but when I reboot, I get dumped to the shell and on attempts to run gdm3 I get errors about being unable to lock org.gnome.DisplayManager. the GDM service starts without a problem, but wont actually put me into the desktop environment.

Any help anyone could provide would be greatly appreciated.


System Specifications

CPU: Core i7 3970x
GPU: 2x AMD Radeon HD 7990
RAM: 32GB DDR3 1866
HDD: 3x 265GB Samsung Pro SSD

tte
2013-11-19, 15:01
Many thanks bro... very useful! Everyting works fine on 5700 HD - HP G-72.

brunotacca
2013-12-16, 19:39
This guide messed up my kali installation...

I was trying to set up my ati radeon 7970m on my alienware m17x r4...
I did all the steps fine but in the last one I got a message "no supported adapters...".
I changed the grub.cfg and rebooted, after that, I had no graphics at all.

Im reinstalling my system now, cause I dont know how to get back to the previous state.

Thanks.

brunotacca
2013-12-17, 16:48
Tryied again...

Same result, after the step 5, I got:

DKMS: install completed.
and then, aticonfig --initial -f, gave me:

aticonfig: no supported adapter detected"

Rebooted and, black screen on gdm3. Just the text cursor blinking...
at tty6 I logged and tryied: "service gdm3 restart", it did restart, but to the same state, black screen with a text cursor blinking.

I do need help to get my Kali to the next level using the full power of my graphic card.
I reinstalled Kali again, and I'm updating/upgrading it right now.
I'm running on a Alienware M17xR4, with Radeon HD 7970m.

If anyone can help-me with it, I can run tests, show logs, and any commands you like... just ask please.

Thank you in advance.

blackMORE
2013-12-18, 01:10
Im reinstalling my system now, cause I don't know how to get back to the previous state.
No need to reinstall. All you had to do is press CTRL+ALT+F2 (or any of the Function keys) to login into terminal and delete /etc/X11/xorg.conf. (and revert back grub.cfg).

msgissatan
2013-12-20, 01:52
Thank you for share!
But not work

()blivion
2014-01-27, 02:17
Am I correct in assuming that this won't work for the most recent legacy ATI cards? (I.e... Radeon HD2000 - HD4000)

What should I need to do different to make this work for those generation cards, if anything?

hashsmash
2014-08-26, 12:42
Hello,
Can you help with installing AMD Catalyst™ 14.4 Proprietary Linux x86 Display Driver on 3.14-kali1-686-pae?
Everything updated and upgraded.
I downloaded zip file here http://support.amd.com/en-us/download/desktop?os=Linux%20x86#amd-catalyst-packages.
Unpacked it and ran using ./ .
I chose automatic install.
Then installation ends with an error message.
Here is the errorlog file:


Supported adapter detected.
Check if system has the tools required for installation.
Uninstalling any previously installed drivers.
Unloading radeon module...
Unloading drm module...
Error: Module drm is in use by: ttm i915 drm_kms_helper
[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/3.14-kali1-686-pae/build SUBDIRS=/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: Entering directory `/usr/src/linux-headers-3.14-kali1-686-pae'
CC [M] /lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘KCL_GetEffectiveUid’:
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:1787:5: error: incompatible types when returning type ‘kuid_t’ but ‘KCL_TYPE_Uid’ was expected
/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:1793:1: warning: control reaches end of non-void function [-Wreturn-type]
make[4]: *** [/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o] Error 1
make[3]: *** [_module_/lib/modules/fglrx/build_mod/2.6.x] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.14-kali1-686-pae'
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 : update-initramfs


This installation updates xorg.conf to this:


Section "ServerLayout"
Identifier "aticonfig Layout"
Screen 0 "aticonfig-Screen[0]-0" 0 0
EndSection

Section "Module"
EndSection

Section "Monitor"
Identifier "aticonfig-Monitor[0]-0"
Option "VendorName" "ATI Proprietary Driver"
Option "ModelName" "Generic Autodetecting Monitor"
Option "DPMS" "true"
EndSection

Section "Device"
Identifier "aticonfig-Device[0]-0"
Driver "fglrx"
BusID "PCI:3:0:0"
EndSection

Section "Screen"
Identifier "aticonfig-Screen[0]-0"
Device "aticonfig-Device[0]-0"
Monitor "aticonfig-Monitor[0]-0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection

After restart i have blackscreen with cursor blinking. When i then clear xorg.conf everything runs like before. I also tried to install 14.6 beta drivers but my discrete adapter wasn't recognized.

Thanks for help.

cyberoky
2015-03-07, 21:14
After command apt-get update a get some errors :/
can someone help me explains that is wrong?



root@kali:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux Kali Linux 1.0.9
Release: Kali Linux 1.0.9
Codename: n/a
root@kali:~# leafpad /etc/apt/sources.list
root@kali:~# apt-get update
Get:1 http://http.kali.org kali Release.gpg [836 B]
Get:2 http://security.kali.org kali/updates Release.gpg [836 B]
Get:3 http://http.kali.org kali Release [21.1 kB]
Err http://http.kali.org kali Release

Get:4 http://security.kali.org kali/updates Release [11.0 kB]
Err http://security.kali.org kali/updates Release

Fetched 33.7 kB in 1s (22.2 kB/s)
Reading package lists... Done
W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://http.kali.org kali Release: The following signatures were invalid: KEYEXPIRED 1425567400 KEYEXPIRED 1425567400 KEYEXPIRED 1425567400

W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://security.kali.org kali/updates Release: The following signatures were invalid: KEYEXPIRED 1425567400 KEYEXPIRED 1425567400 KEYEXPIRED 1425567400

W: Failed to fetch http://http.kali.org/kali/dists/kali/Release

W: Failed to fetch http://security.kali.org/kali-security/dists/kali/updates/Release

W: Some index files failed to download. They have been ignored, or old ones used instead.
root@kali:~#

g0tmi1k
2015-04-04, 00:02
Please search.
Already been answered: https://forums.kali.org/showthread.php?24687-Problem-with-apt-get-update&highlight=1425567400