Skylake Graphics on Linux Mint and Ubuntu

For those who don't want to read this whole article, and instead just want the answer on how to get Skylake graphics working on Linux, the answer is to use Ubuntu 15.10 Wily Werewolf. The onboard graphics will work out of the box with this release of Ubuntu. I have not yet been able to get it working under Mint. Now if you want to read more about the journey, and some of the troubleshooting steps I took, read on! (Perhaps someone smarter than I can get the remaining steps to work)

Having spent more than a few years now trying to keep my primary machine up and running with all of the latest tech, I finally decided it was time to upgrade to a new machine. After much internal debate and online window shopping, I decided to go with the latest Intel Skylake Core i5 processor as the center of my new desktop. Being the latest in their line of processors, and generally seeing great results for its performance, it seemed like an easy decision. I ordered all of the components I needed, and put everything together without much difficulty. Then, of course, came the problems. It wouldn't be a new computer setup without encountering some sort of problem, right?

I have been primarily a Linux user for quite a number of years now. While I ocassionally have to boot up OSX or Windows for various projects, the vast majority of my time is spent in Linux. Being a developer by trade, it is usually easier to get all of the tools that I need quickly and easily under Linux. And honestly, I have been using it with regularity for so long now that it is the most comfortable environment for me. For desktop environments, Mint has been my distro of choice for much of that time. I generally prefer Debian-based distros, at least partially because I tend towards Debian for my server environments as well. Debian itself is a great platform for server environments, but I tend to find it a bit lacking as a desktop environment. A large part of that is the deliberately slow update cycle of its packages, which is a benefit when used as a server, but can be a hindrance when used as a desktop, especially when dealing with the latest hardware. Ubuntu is one of the most popular distros for desktop Linux, but I personally have preferences away from some of their choices (which we will get in to later). Mint has, for the most part, been extremely suited to my personal needs.

So after getting my new computer all put together, and ensuring a proper boot, I set off to install the OS. I downloaded Linux Mint 17.2 Rafaela, being the most recent version. Right off the bat running the live preview, the graphics problems started. While using the HDMI graphics port, the resolution was set extremely low for my monitor, and I got a notice that it was running in "Software Rendering Mode" as a result of not being able to properly load the graphics drivers.

Cinnamon running in software rendering mode

I pressed on with the install, resolving to take care of this graphics problem once the rest of the install had been completed. All other portions went quite smoothly, as they usually do when installing Mint. My initial hope that the graphics would be fixed simply by having a permanent install were quickly dashed. I did discover that switching over the the DVI port was able to put the monitor at the correct resolution. The software rendering mode notice remained, however, and it was clear the performance would not be up to par.

My first troubleshooting step was upgrading the kernel. By default, Mint 17.2 runs the 3.16 kernel. 3.19 was the most recent directly available to install through their GUI tools, so I installed that one and rebooted, only to encounter the same problems. I then used a PPA to install the 4.2 kernel (most recent stable kernel), and was still in the same situation.

After searching around, I came across a series of articles on Phoronix, especially this one, which identified the issue I was having, and offered a solution. Namely, to enable preliminary hardware support in the kernel by appending "i915.preliminary_hw_support=1" to the kernel command line in GRUB.

Another reboot, and another moment of frustration as the software rendering notice remained. I made sure to double check all of the system information in various places to ensure that the reported drivers were indeed not being loaded properly. This was to make sure that it was a problem with the kernel loading, as opposed to some problem higher up in the chain of X or Mint's software. A quick run through of lspci, lsmod, glxinfo, and related confirmed that the problem did indeed exist at the level of the kernel trying to load the proper drivers.

After a quick browse through dmesg, I finally got some progress on discovering the error. It confirmed that the kernel was trying to load the proper driver (which also ensured that my kernel command line instructions were being properly parsed), but that an error occurred while it was being loaded. After some more searching on these error messages, I came across this bug thread which detailed the problem I was having. It turned out that initramfs-tools (an Ubuntu library) was not properly resolving certain symlinks for the drivers at certain stages. Solutions were starting to look close, especially as the bug had been resolved in that thread! However, a big hurdle then appeared. The fix for this particular bug had been released for the Wily release of Ubuntu, but had yet to be backported to older releases. This posed a problem, as Mint 17.2 is built on Ubuntu 14.04 Trusty. Since Trusty is an LTS release, it is a good decision to base other releases upon that version as Mint has done. But in my particular case, until the initramfs bug is resolved in the Trusty release, Mint would remain with the Skylake graphics problems.

Now I am sure that building the initramfs-tools package from source on Trusty, including the latest bugfixes, would not be of too much difficulty (relatively speaking, at least). But by this point, I was personally ready to move on. If nothing else, more and more deviations from the standard install and repositories would require ongoing maintenance of the machine to ensure that updates do not result in broken packages, or undoing of the custom fixes that I had implemented. So I made a decision to ditch Mint for the time being, and instead go with Ubuntu 15.10. At the very least, it should allow me to get over the particular hurdle I was facing here, and ensure that it would work before sinking more time in to another dead-end.

Then it was back to the downloads page to retrieve an Ubuntu iso, and another clean install. To my surprise, upon installation, the graphics drivers were loaded correctly right off the bat. There was no need for upgrading the kernel (especially since the default kernel in Wily is 4.2.0), and there was no need for the hardware compatibility flag. Everything loaded up perfectly.

Ubuntu correct graphics driver settings

I am still debating on returning to Mint once the fixes for this are included in the appropriate libraries, or when I feel like devoting the time to dive deeper in to fixing it myself, but for now I at least have a stable installation with all of the graphics support that I need. Switching over to Cinnamon instead of Unity as installed by default takes care of many of my personal preferences against Ubuntu, and a bit more customization should resolve the rest.

So there you have it. If you want Skylake graphics working in Linux, skip Mint for the time being. I have heard that Fedora is also working properly with Skylake, in addition to Ubuntu, though I personally have not tested it yet. If you have knowledge of Skylake's status in other distros, feel free to add your comments below. I will do my best to keep this post updated with the latest information when I hear of more details that develop.