How to install AMD graphic drivers on Ubuntu 18.04
Solution 1
You should be able to use the open source drivers that come with your system. You may just need to use the common nomodeset fix:
How do I set 'nomodeset' after I've already installed Ubuntu?
Using the built in driver is usually sufficient for radeon cards.
If you have done other mucking around, or added the PPA for the NVIDIA drivers (sorry about that) you can clean up with the following:
sudo apt-add-repository -r ppa:graphics-drivers/ppa && \
sudo apt update && \
sudo apt upgrade && \
sudo apt autoremove && \
sudo apt autoclean
Now, add the AMD updates PPA and update:
sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt-get update
sudo apt upgrade
Then reconfigure your packages to be safe:
sudo apt install --reinstall xserver-xorg-video-amdgpu
sudo dpkg --configure -a
sudo dpkg-reconfigure gdm3 ubuntu-session xserver-xorg-video-amdgpu
Finally, you can enable accelerated video:
sudo apt-get install mesa-vdpau-drivers
Then to test the VDPAU driver with mpv use:
mpv --hwdec=vdpau yourvideofile
Now reboot the computer and make sure it still works. It does? Good! Now reboot once again and see if you can remove the nomodeset boot option. If it will work without it, this might improve performance.
Finally, once you are logged into the GUI, go to Settings > Devices > Displays and make sure the resolution is properly set.
If performance is still not up to standards after all of the above, you can manually install the closed source driver as a last resort.
If you decide you would still like to use the proprietary driver, you will need to download and install it. According to the output you posted, you need to download this driver:
AMD Radeon™ HD 8670M Series GPU Drivers & Support
Click on the "Linux x86_64" box and download the zip file.
You can follow this guide or post any additional updates to your question and I will improve the answer accordingly.
Solution 2
Since I struggled with the problem for a whole day and Joshua's answer didn't work for me I thought it might help to provide my solution.
My mistake was that although I have Ubuntu 18.04 installed on VMware® Workstation 15, I was trying to resolve the problem based on my host machine's AMD graphic adapter. I copy the solution that worked for me below:
The issue is with Wayland. While Ubuntu defaults to an X11 session, for some reason they left it enabled for GDM.
You can certainly replace GDM with LightDM, but an easier option would be to:
sudo nano /etc/gdm3/custom.conf
Then change the line:
#WaylandEnable=false
to
WaylandEnable=false
Press Ctrl+O and then Ctrl+X and reboot. If you don't wish to reboot you can do
sudo systemctl restart gdm
Which will restart your windows session (this assumes ssh into the box to fix as above).
Related videos on Youtube
nikhil123
I am a Full-stack web developer who works as a freelancer
Updated on September 18, 2022Comments
-
nikhil123 over 1 year
I had always been a Windows user, But yesterday I downloaded and install Ubuntu 18.04 LTS from this page, But I can't find a way to install AMD graphic drivers,
Right now Linux only works in recovery mode, in normal mode it shows a blank purple screen and nothing works, after searching on internet I found there could be something wrong with my graphic drivers, I have tried many things to install AMD graphic drivers on my laptop, But nothing seems to work, I ran this command on my laptop
lspci -nn | grep -E 'VGA|Display'
and the results are
00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) 01:00.0 Display controller [0380]: Advanced Micro Devices, Inc. [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / R7 M520] [1002:6660]
So I have a hybrid graphic cards or something, I tried this installation guide, but didn't work (even for the users in comment section),
It was very easy on windows, I would switch back to windows, But just wanted to ask here for last time. is there any solution available for installing AMD graphic drivers on Ubuntu 18.04 ?
Thanks!
-
Terrance almost 6 yearsWhen you tried the
sudo add-apt-repository ppa:oibaf/graphics-drivers
thensudo apt update
did you get any errors? Usually after thesudo apt update
it will automatically install the drivers. It worked fine for me in 18.04. Have you also tried disabling Secure Boot in the BIOS before installing these drivers? -
nikhil123 almost 6 yearsthanks for your comment, Yes, secure boot was already disabled, i just ran those two commands you mentioned, And both was successful, what i supposed to do now? @Terrance
-
Terrance almost 6 yearsYou should just reboot. Then you can check your version by running
lshw -c video
You should be able to seedriver=
-
nikhil123 almost 6 years@Terrance ok, i rebooted the laptop, and ran that command i got this output
*-display UNCLAIMED description: Display controller product: Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / R7 M520] vendor: Advanced Micro Devices, Inc. [AMD/ATI] ....
It seems like i have installed the amd drivers, But in Software & Updates->Additional Drivers it says , "No additional drivers available" and i have still the problem with normal boot (blank freezed purple screen), actually installing amd doesn't seem to change anything, anyway, thanks for your help :) -
Rinzwind almost 6 yearsPlease use the normal Ubuntu method askubuntu.com/questions/1065852/…
-
-
Joshua Besneatte almost 6 yearsI have updated the answer to apply to AMD... thanks.
-
nikhil123 almost 6 yearshi, thanks for your answer, i tried those two commands with sudo, and it actually installed some drivers with proper progress bar. but still i can't boot in normal mode and in recovery mode my screen visuals are become worst, when i scroll down or up in firefox, half of page scrolls and other half doesn't , anyway, i am switching back to windows, it seem like my laptop is not compatible for linux
-
Rinzwind almost 6 yearsFar too dangerous. Please use the PPA dedicated to this.
-
Joshua Besneatte almost 6 yearslinux is the most compatible operating system... unfortunately the first answer I posted only applied to nvidia.. my mistake. please see my updated answer to install drivers for amd. you should be able to use the stock drivers. you might just need to add n
-
nikhil123 almost 6 years@JoshuaBesneatte hi, thanks :), that
nomodeset
fix worked for me, with that fix normal boot works, but now the graphics visuals are too bad, i think that is because of those two commands i ran, is there any way to revert that -
Joshua Besneatte almost 6 yearsyou can do
sudo apt-add-repository -r ppa:graphics-drivers/ppa && sudo apt update && sudo apt upgrade && sudo autoremove && sudo autoclean
then runsudo dpkg --reconfigure -a
and reboot... let me know if your graphics improve from there -
nikhil123 almost 6 yearsi got this error
dpkg: error: unknown option --reconfigure
when i ransudo dpkg --reconfigure -a
-
Joshua Besneatte almost 6 yearssory, it's --configure, not reconfigure
-
nikhil123 almost 6 years@JoshuaBesneatte, hi, yes, --configure didn't throw any error, i ran it and restart the laptop, but graphics are still the same, Hmm, maybe linux is compatible with my laptop, but i think it is too complicated for me, actually trying to switch to linux itself was a big mistake for me (i accidentally deleted whole my disk data which was very important to me,( that was my mistake, i choose wrong option while installing it) , And i have been trying to fix theses installation issue since yesterday so lots of time wasted). I think windows is best for me. thanks for you help :)
-
Joshua Besneatte almost 6 yearsthere might be a few new things to learn, but in the long run linux will cause you much less headache than windows, you are so, close, don't give up now. now that you are able to boot up, let's see if we can improve your graphics peroformance. have you looked in
settings
-devices
-displays
to make sure your screen resolution is correct? -
Joshua Besneatte almost 6 yearsLet us continue this discussion in chat.
-
nikhil123 almost 6 yearshi, thanks for your kind words, but i have switched back to windows, there are few other reasons i decided to do so, i realized many of the software which i use normally are not supported by linux and there are no good alternatives (ex. IDM(internet download manager)), or i have some tutorials to get them install, So i had to switch back to windows, maybe later i will install linux with dual boot or in virtualbox, thanks for your time man :)
-
Joshua Besneatte almost 6 yearsReally? I have never understood the "this is difficult, let's quit" attitude... However, if you change your mind, I will always be here to help.
-
iamandrewluca about 5 yearsAfter doing steps in the answer, ubuntu-desktop is frozen. I login, I see desktop, but can't do anything.
-
iamandrewluca about 5 yearsOk, desktop frozes because I enabled 3d acceleration but is not supported on my r250
-
Odif Yltsaeb about 5 yearsHi @JoshuaBesneatte. I've gone and followed this guide and set up the drivers. I've follower this guide github.com/lutris/lutris/wiki/Installing-drivers and neither have actually changed much. How can i tell if i've actually accomplised anything since when i go to ubuntu settings detail page my gpu still shows up as Intel one not AMD one
-
Lobon over 4 yearsHi @JoshuaBesneatte Do you think this is also a solution for askubuntu.com/questions/1203841/… ?
-
Lobon over 4 years@JoshuaBesneatte Do you know what drivers do I have to dowunload for this lspci -nn | grep -E 'VGA|Display' output: lobon@lobon-Lenovo-IdeaPad-L340-15API:~$ lspci -nn | grep -E 'VGA|Display' 03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Picasso [1002:15d8] (rev c1)
-
Joshua Besneatte about 4 years@Lobon not sure... you might get more info with
sudo lshw -class diplay
-
Lobon about 4 yearsThanky you @JoshuaBesneatte. This is what I get: *-display descripción: VGA compatible controller producto: Picasso fabricante: Advanced Micro Devices, Inc. [AMD/ATI] id físico: 0 información del bus: pci@0000:03:00.0 versión: c1 anchura: 64 bits reloj: 33MHz capacidades: pm pciexpress msi msix vga_controller bus_master cap_list configuración: driver=amdgpu latency=0 recursos: irq:58 memoria:c0000000-cfffffff memoria:d0000000-d01fffff ioport:1000(size=256) memoria:d0600000-d067ffff
-
Joshua Besneatte about 4 years@Lobon just use the open source drivers from the ppa... those should work fine
-
Adupa Vasista almost 4 yearsEven though I finished all the steps and removed
nomodeset
option in thegrub
file, I am still getting the output forlspci -nn | grep -E 'VGA|Display'
is00:02.0 VGA compatible controller [0300]: Intel Corporation Skylake GT2 [HD Graphics 520] [8086:1916] (rev 07) 01:00.0 Display controller [0380]: Advanced Micro Devices, Inc. [AMD/ATI] Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445 / 530/535 / 620/625 Mobile] [10... (rev 83)
. Is it normal?. And when I go toabout
section insettings
It is showing asAMD® Radeon (tm) r7 m340 / Mesa Intel® HD Graphics 520 (SKL GT2)
-
Mohammed Omer over 3 yearsimagine what it works on focal fossa ubuntu 20.04 my computer encounter horrible lagging and sluggish after while of installing fresh os, i didnot do the no-modest thing , just the AMD RDI driver and rest of commands
-
Mohammed Omer over 3 yearsmine was RV635 [Radeon HD 3650/3750/4570/4580]
-
Gediz GÜRSU about 2 yearsI also find out removing and reinstalling these packages , and nvidia must be uninstalled otherwise strange artifacts happens.... However re-install and reconfigure is a lot easier than manually removing and installing using dpkg. Thank you. I also remember adding some lines to grub and editing xorg.conf to use amd-gpu ...