Setting up the GOOD DRIVERS (AMDGPUPro) for my laptop ( Samsung NP470RSE ) with Linux ( Debian Stretch )

in #technology7 years ago (edited)

Why am I not using the generic drivers for my graphic card that Debian Stretch has in its repositories if they work so well??

Well it's true that the generic driver work 'more or less' well, but you can not choose which graphic card to use and you can not touch anything about it (tun it up, overclocking... etc.) so I wanted to fully use both of them and do as much as I can with them.

Since I moved from Winbugs (windows) to Debian Jessie (before that, I used Ubuntu too), I've been having problems with my hybrid (Intel/AMD) graphic (always an error message while booting my Debian Stretch, and any Linux SO), so I decided to do the good set up for my [AMD/ATI] Mars [Radeon HD 8670A/8670M/8750M] with the AMDGPUPro drivers and stop using my Intel integrated one (which was doing all the job, because of that problem).

Lets solve this!


[BONUS TIP: you can see your hardware from the terminal by typing: lspci |grep theHrdwrYouAreLookingFor]

lspci |grep AMD

The output:

01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Mars [Radeon HD 8670A/8670M/8750M] (rev ff)

1. Identify the problem

Lets see what dmesg can show as about any error related with radeon.

    dmesg |grep -i radeon

The output shows us this error in the log, which is the same as always appears while booting

    [  211.520427] radeon 0000:01:00.0: failed VCE resume (-110).

Unfortunately the huge amount of info about this error, was for Ubuntu, so...
(Ubuntu users: Do you want a real stable system? Install Debian, you will never look back )

Basically this problem becomes from the generic drivers which Debian offers in their repositories ( firmware-linux-free firmware-linux-nonfree firmware-amd-graphics ).

So once the error it's been identified, we proceed to set up the system!

2. Update the system before installing the new drivers. (WTF where are my kernel 4.11 updates??)

First of all, we should do a full update, and a full upgrade of the system and mainly of the kernel, which should be the 4.11 at the day of writing this post (this version gives you much more possibilities to interact with your graphic card).

First, lets get some root privileges, I use sudo -i instead of just sudo because it prepares the terminal environment 'more or less' as su does, more efficient, no time out.. well this is the main reason for me)

    sudo -i

(Now introduce your USER password, not the superuser or root one)

Now lets update & upgrade ( system + kernel) and post-delete the non used packages

    apt -y update && apt -y upgrade && apt -y dist-upgrade && apt -y autoremove

I didn't find any update, so let's see which kernel version am I using, because I'm sure that the 4.11.XXX is out, I've read it at Reddit some days ago.

    uname -r

(If you want to see the full info that uname brings to you, just change -r flag for -a)

I was using the 4.9!! WTF Debian!!

¡¡¡ ERROR 404 Updates not found !!!

Well I need to find them more deeply, or maybe to add some new lines to my sources.list.
Some minutes later I decided to take the second option, so I added the Debian Stretch 'backports' and the 'Proposed Updates' to my sources.list file. (I used to avoid 'backports' and 'Proposed Updates', but... anyway let's do that!)

Edit the sources.list file with nano or your favourite text editor (you need to have root power, remember :P)

    nano /etc/apt/sources.list

And you add this lines at the bottom of the file:

    ### Debian 9.X 'Stretch' 'Proposed Updates'. 
    deb http://httpredir.debian.org/debian stretch-proposed-updates main contrib non-free
    deb-src http://httpredir.debian.org/debian stretch-proposed-updates main contrib non-free
    ### Debian 9.X 'Stretch' 'Backports'.
    deb http://httpredir.debian.org/debian stretch-backports main contrib non-free
    deb-src http://httpredir.debian.org/debian stretch-backports main contrib non-free

And now we have to update and upgrade again, and the new updates (specially kernel ones) should appear... lets see...

    apt -y update && apt -y upgrade && apt -y dist-upgrade && apt -y autoremove

Well... they didn't appear :( so lets try the tabulator tip


[BONUS TIP: just write what you want to install (apt -y install linux-headers-4.11)but before pressing Enter, press tabulator and Debian will show you the options you have to install, this is useful when you can't remember the name of the package or you are not sure about which one is the best, you can do an 'apt search name_of_app' too]**

    apt -y install linux-headers-4.11
  • tabulator (x2), and it brings you this output
    linux-headers-4.11.0-0.bpo.1-all        linux-headers-4.11.0-0.bpo.1-common
    linux-headers-4.11.0-0.bpo.1-all-amd64  linux-headers-4.11.0-0.bpo.1-common-rt
    linux-headers-4.11.0-0.bpo.1-amd64      linux-headers-4.11.0-0.bpo.1-rt-amd64

From that options, I choosed that one:

    apt -y install linux-headers-4.11.0-0.bpo.1-all-amd64

Then, again, full update and upgrade

    apt -y update && apt -y upgrade && apt -y dist-upgrade && apt -y autoremove

And finally we have to reboot the system, to let the changes happen.
(If you have any problem with the new Kernel version, you can choose the old one from the GRUB menu, Debian always save the old kernel image)
YES, you should do another full update&upgrade :)

- Now we have our new Kernel rocking -

~ Before doing all this stuff, I asked a friend to compile the kernel xD, well he simply says to me that would not be a good idea for our friendship, it will take us hours even if I do everything well at first time, so I immediately decline this option ~

3. Download the drivers.

First lets see if we have already the AMDGPUPro package installed (To dream is free guys xD, obviously it won't appear )

    dpkg -l amdgpu-pro

Well as I said before, nothing appeared.

So lets download the drivers from here
If the page gives you some problems is because of the cookies, you should have visited another part of the webpage before)

4.- Install & configure the drivers.

Now we go to the dir where we want to install it from, in my case, the Downloads folder.

    cd Downloads

Extract the files

    tar -Jxvf amdgpu-pro-17.30-XXXXXX.tar.xz

**change XXXXXX with the actual build number

Now, from the file we have extracted, we run the amdgpu-pro-install script to install the graphics stack.

    ./amdgpu-pro-install -y

-y option is for not to have to confirm each time Debian ask you to do something.
Reboot time

    reboot

The configuration

Make sure that your user account is member of the video group with the command groups

To add yourself to the video group you need the sudo password and the command:

    usermod -a -G video $LOGNAME 

Then log out and log in again to make the changes happen.

Help links:
https://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Install.aspx


I hope you will find it useful! If you want more sysAdmin tutorials/posts just let me know in the comments and votingUP!!
And obviously if you think that something it's wrong just let me now too! I am just an student learning :)

CryptoBlock Fam_

Sort:  

Congratulations @cryptoblock! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Congratulations @cryptoblock! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!