I've been hacking away, trying to get Vulkan working on my Ubuntu 14.04 laptop (Late-2013 MacBook Pro [11,2]). It's more or less working. vulkaninfo
appears to complete without error, and both the LunarG example programs run, though with a number of warnings. At this point the problem is just that the vulkan driver is not finished for my hardware (Haswell).
Here are the steps I took to get some almost-working drivers.
- Install LunarG's Vulkan SDK
- Update to Linux Kernel 4.2 via the Ubuntu 14.04 LTS Enablement Stack
- Enable DRI3 by copying
20-intel.conf
above to/usr/share/X11/xorg.conf.d/20-intel.conf
- Reboot and make sure that DRI3 is now mentioned in
/var/log/Xorg.0.log
- Checkout the vulkan branch of the mesa source code with
git clone -b vulkan http://anongit.freedesktop.org/git/mesa/mesa.git
- The newest versions depend on a slightly newer version of libdrm than comes with 14.04, so roll back the repository back to the latest working driver version with
git reset --hard b83785d86d2c7f07323920615c72a9f09695a9a7
- Apply the patch supplied below with
git apply fix-missing-memfd-header.patch
to correct for the missing memfd headers. - Install build dependencies listed on the mesa website. I think
sudo apt-get install python-mako bison flex build-essential autoconf
covers everything that's needed. - Check the README in the mesa repository for up-to-date build instructions. At time of this writing, you can build with
autoreconf -vfi && ./configure --with-dri-drivers=i965 --with-gallium-drivers= && make -j4
. You can add--enable-debug
to configure if you want a build that will print more detailed vkError messages. - I hacked around a permissions problem by running
sudo chmod 666 /dev/dri/renderD128
. Apparently there is supposed to be a script that adds your user to an access control list (ACL) on login. That doesn't seem to exist on Ubuntu 14.04, though. - Set
VK_ICD_FILENAMES
so the LunarG loader finds everything correctly. You'll need to do this in the same shell that runs your program.README.intel-vulkan.txt
gives you a command, but it refers to a non-existent file. Instead useexport VK_ICD_FILENAMES="$MESA_TOP/src/intel/vulkan/dev_icd.json"
, replacing$MESA_TOP
with the absolute path of the directory containing the mesa source code. - You're done! Run
vulkaninfo
and/or try to run the VulkanSDK examplecube
. Instructions to build and run the latter are on the LunarG website.
My vulkaninfo and cube output are here for reference.
@lvasilis09 I haven't seen those particular problems, but there have been updates to the repository since I originally wrote this. The latest version of mesa that I could get working is
b83785d86d2c7f07323920615c72a9f09695a9a7
. I've updated the instructions to check out that version.If you struggle with it for too long, I might suggest waiting for Ubuntu 16.04. There is a PPA, which will make it much easier to get the drivers.