#Warning this guide will have you build your own kernel which can cause breakage and you will no longer be officially supported by Canonical
First, we need to make sure your system is up to date.
sudo apt-get update && sudo apt-get upgrade
when it ask for you to accept the updates look to see if an update to your kernel or headers are being updated. If so after updating reboot your machine.
Now that you are up to date we need to beable to get our hands on the source code for Ubuntu’s kernel
Go to your Software & Updates
settings and under the Ubuntu Software
tab click the Source code
button
We are going to be follwing this guide with a some tweaks. If you want to follow along here you go.
https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
We need to get our hands on the tools to build a kernel.
sudo apt-get build-dep linux-image-$(uname -r)
this will grab the needed tools for the kernel you are currently on
Lets move over to doing this as root
sudo su
make sure you are in root’s home directory
cd
Lets download that kernel source code! Get a coffee this may take a bit. You can also use git if you don’t want to add a repository.
apt-get source linux-image-$(uname -r)
That made a new directory and we need to navigate to that
ls
you should see something similar to linux-4.8.0
cd linux-4.8.0
Now we need to change some permissions so we can edit the config
chmod a+x debian/rules
chmod a+x debian/scripts/*
chmod a+x debian/scripts/misc/*
Lets modify the config
You really only need to modify the the kernel you plan on using (most likely amd64-generic) so you can press no on the arm and powerpc configs
fakeroot debian/rules clean
fakeroot debian/rules editconfigs
Navigate through the menus as so
you are going to want to press y
on that option if Enable AMD powerplay componet
is not enabled press y
on that as well
save and change any of the other configs you want of press n
to ignore them
Now lets build the kernel(s)
fakeroot debian/rules clean
There are two options here.
fakeroot debian/rules binary-headers binary-generic
if all you want is the generic kernel
fakeroot debian/rules binary
if you want all the builds use this.
This will take some time so find something to do. Like… make a tutorial.
This is going build a kernel and headers as a .deb
packages for easy install
Move back to root’s home
cd
lets look for .deb files to install
ls *.deb
you should see something like this:
linux-cloud-tools-4.8.0-22-generic_4.8.0-22.24_amd64.deb linux-headers-4.8.0-22-generic_4.8.0-22.24_amd64.deb linux-image-extra-4.8.0-22-generic_4.8.0-22.24_amd64.deb linux-headers-4.8.0-22_4.8.0-22.24_all.deb linux-image-4.8.0-22-generic_4.8.0-22.24_amd64.deb inux-tools-4.8.0-22-generic_4.8.0-22.24_amd64.deb
Great, lets install that kernel.
sudo dpkg -i linux4.8.0-22.24.deb
You may have to adjust version number
Now we have to turn on cik support in your boot loader (grub2)
nano /etc/grub
add amdgpu.exp_hw_support=1
on the GRUB_CMDLINE_LINUX_DEFAULT
line
Hit ctrl-x
and y
to save and exit
We are going to turn off (blacklist) the old radeon driver
nano /etc/modprobe.d/blacklist.conf
add blacklist radeon
at the end of the file and save and exit the same way you did in the grub config
Update your boot loader
update grub
And reboot
reboot
check your video driver
sudo lshw -c video