Vulkan driver on Linux - problems and solutions

I got some problems with Vulkan driver on my Linux box, and I decided to describe how to solve them.

First, this drivers won’t build on newer kernels ( 4.3, 4.4 ), to fix that you need to apply this patch:

kernel/nvidia/nv-procfs.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kernel/nvidia/nv-procfs.c b/kernel/nvidia/nv-procfs.c
index 1ca106d..90865e4 100644
--- a/kernel/nvidia/nv-procfs.c
+++ b/kernel/nvidia/nv-procfs.c
@@ -360,7 +360,8 @@ nv_procfs_read_registry(
     registry_keys = ((nvl != NULL) ?
             nvl->registry_keys : nv_registry_keys);
 
-    return seq_printf(s, "Binary: \"%s\"\n", registry_keys);
+    seq_printf(s, "Binary: \"%s\"\n", registry_keys);
+    return 0;
 }
 
 static ssize_t
@@ -560,7 +561,8 @@ nv_procfs_read_text_file(
     void *v
 )
 {
-    return seq_puts(s, s->private);
+    seq_puts(s, s->private);
+    return 0;
 }
 
 NV_DEFINE_PROCFS_SINGLE_FILE(text_file);

Just save it in NVIDIA-Linux-x86_64-355.00.26 ( or in 32-bit version ) as p.diff and run

patch -p1 < p.diff

Next, it won’t run on newer X.org because it’s not ABI compatibile, and you have to add this:

Section "ServerFlags"
    Option "IgnoreABI" "1" 
EndSection

to your xorg.conf to make X start.

Next, I couldn’t start KDE ( Plasma 5 ) - it was just crashing and I didn’t bother to dig trough core dump. I’ve just installed XFCE 4 ( 4.12 ) and it worked OK with this driver.


For curious about that nv-procfs.c patch - https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6798a8caaf64fa68b9ab2044e070fe4545034e03
and thanks to juston_li for linking it on another board.