I installed Ubuntu on my Macbook Pro, but ran into graphics driver issues...
TL;DR I downgraded (reinstalled) to Ubuntu 16.04, installed the proprietary AMDGPU-Pro driver, and everything works fine now it mostly works.

Installing Ubuntu on my Mac went fairly smoothly. I created a bootable USB install drive from an Ubuntu ISO using the Mac hdiutil command. Guides for older Macs mention needing to install the rEFIt boot manager, but in my case I didn't seem to need this at all. My Mac was happy to boot Ubuntu using UEFI.

Although, after the install, I noticed that my graphics would occasionally start glitching:

I never had issues when I was running Mac OS X, so I'm fairly confident that this is a graphics driver issue rather than a hardware issue.

Looking at my /var/log/Xorg.0.log, I noticed it was filled with:

[    41.360] (WW) RADEON(0): radeon_dri2_flip_event_handler: Pageflip completion event has impossible msc 2120 < target_msc 2121
[    42.609] (WW) RADEON(0): radeon_dri2_flip_event_handler: Pageflip completion event has impossible msc 2194 < target_msc 2195
...

Ubuntu 16.04 and 16.10 use the open-source "radeon" graphics driver for AMD GPUs. It's great to see a push towards using open-source drivers, but it's not so great when they glitch. There used to be a proprietary "fglrx" driver available, but that was removed in 16.04. Fortunately for me, there is an experimental "AMDGPU" driver that supports new AMD graphics cards.

According to the ArchLinux wiki, the open-source AMDGPU driver is in the recently released Linux 4.9 kernel (but may be disabled by default). However, the 4.9 kernel image isn't in the officially supported Ubuntu repositories yet. (I tried installing it from a PPA, but messed up pretty bad because I didn't really know what I was doing)

There's also the proprietary AMDGPU-Pro driver. Officially, it only supports Ubuntu 16.04, but some users claim that with a little patch it can be made to work on 16.10.

I don't see "AMD Radeon R9 M370X" explicitly listed as one of the supported graphics cards on the AMDGPU-Pro website. However, when I run lspci | grep VGA, I get: Venus XT [Radeon HD 8870M / R9 M270X/M370X], and the R9 M270X graphics card is supported.

Looking at my /var/log/Xorg.0.log with the AMDGPU-Pro driver installed, I noticed it is now filled with:

[    15.274] (WW) AMDGPU(0): amdgpu_dri2_flip_event_handler: Pageflip completion event has impossible msc 656 < target_msc 657
[    15.457] (WW) AMDGPU(0): amdgpu_dri2_flip_event_handler: Pageflip completion event has impossible msc 666 < target_msc 667


Okay, so perhaps things still aren't working perfectly under the hood. But at least I don't visually see any glitches anymore.


Final word of caution: at the moment, the top Google hit for "amdgpu-pro" is the beta AMDGPU-Pro 16.40 driver for Linux. Don't install this! Use the AMDGPU-Pro 16.50 driver (or later) instead.

The AMDGPU-Pro 16.40 driver comes with some serious caveats!

If you get the wrong driver and end up locked out of the GUI, fn-ctrl-alt-F1 to switch to a tty terminal, and run amdgpu-pro-uninstall



Update 6 May 2018: I've been using Ubuntu on my MacBook for over a year now, and there are a few issues that I didn't initially notice. The camera doesn't work (Arch claims to have a reverse-engineered driver for this, but I can't vouch for it); I can't figure out how to reduce the screen backlight strength (Arch claims to have a kernel patch for this); some software requires keys that aren't on the Mac keyboard (e.g. insert) so either require guessing the the function key combinations (insert = fn-return) or defining your own (e.g. with xmodmap); Firefox Quantum 59.0.2 crashes any tabs that use OpenGL due to an issue with the AMDGPU-Pro driver attempting to access resources outside of its sandbox (although there will be a fix for this in Firefox 60); and about once per month my desktop locks up, I switch to a tty terminal, find it filled with [drm:amdgpu_cs_ioctl [amdgpu]] *ERROR* Failed to process the buffer list -22! [drm:amdgpu_cs_ioctl [amdgpu]] *ERROR* amdgpu_cs_list_validate(validated) failed., and have to hard reboot (I don't know what causes it, but this bug report suggests that similar AMDGPU errors tend to occur when playing video with the monitor switched off, which seems possible, as it only seems to happen to me at work where I use an external monitor).