Ubuntu 16.04 with Ryzen 7 and GA-AB350 Gaming Rev. 1

At time of writing, the stock motherboard BIOS and the kernel that ships with Ubuntu 16.04 LTS do not seem to work well with a Ryzen 7 1700 and GA-AB350 Gaming (Revision 1.0) getting stuck during boot.  I was only able to boot after turning ACPI off, which limited me to a single thread.

However, Fedora’s live CD worked fine for me on this machine. What I ultimately did was clone Fedora’s kernel repo and build F25’s kernel. (At time of writing, that’s at 4.10.4) Booting with this kernel has allowed me to boot without turning ACPI off.  Apparently, one of Fedora’s patches fixes the issue I was having with my new hardware configuration.

The process is as follows:

Prerequisites: You need to have the packages installed that would allow you to build the kernel before doing this. I think all that’s needed is sudo apt-get install build-essential gcc g++ butI’m not 100% sure as I ended up installing a lot of packages while trying to get this to work. Check the Ubuntu docs on how to custom build a kernel.

(Note for the following, at this point I had switched to root, if you stay as a regular user, use sudo as appropriate.)

Now that that’s out of the way:

  1. Clone the the Fedora kernel repo with git.
    git clone git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git
  2. Then checkout branch 25, nevermind the warnings about a detached HEAD, we’re not adding anything to our kernel build so we’re not doing any commits.
    cd fedora && git checkout origin/f25
  3. Copy the non-hidden files to /usr/src/linux-4.10.4. Create the directory if it doesn’t yet exist.
    mkdir /usr/src/linux-4.10.4 && cp -rv * /usr/src/linux-4.10.4
  4. Change directory and configure the kernel build. I used the Fedora 4.8.6 config as my base.
    cd /usr/src/linux-4.10.4
    wget -O .config https://s3.amazonaws.com/rrbits/config-4.8.6-300.fc25.x86_64
    make oldconfig

    When configuring, just selecting all the defaults worked fine for me.

  5. Build your kernel
  6. Build your modules
    make modules
  7. Install your modules. Since we used oldconfig to configure it, these will have a lot of debugging symbols, so let’s strip them while we install them.
    make INSTALL_MOD_STRIP=1 modules_install
  8. Finally, we install our kernel.
    make install

Watch the final output on make install. When building on Ubuntu, it should automatically copy everything to boot, build your initrd, and run update-grub.  If it doesn’t you may have to do these steps manually, otherwise, check and make sure it grub saw your new kernel and initrd.  If it did, you should be good to go.  Make sure you use the kernel you built when you boot.

One Response to “Ubuntu 16.04 with Ryzen 7 and GA-AB350 Gaming Rev. 1”

  1. Artur

    Thanks, you just saved me from having to install Fedora. Compiling a kernel on a single core was a real pain though.

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>