Kernel – 5.1-rc1 is out – VMware Fix Available, but NVIDIA Fails.
Kernel 5.1-rc1 has been released, and brief details are here: http://lkml.iu.edu/hypermail/linux/kernel/1903.2/00496.html
VMware with the Kernel 5.0 patches fails to compile vmmon, but thanks to Michal Kubeček, a fix is currently available at https://github.com/mkubecek/vmware-host-modules/tree/workstation-15.0.3-test. I have applied this, and VMware 15.0.3 compiles and loads/runs OK with Kernel 5.1-rc1.
NVIDIA 418.43 compile fails soon after commencing:
...................... /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-418.43/kernel/common/inc/nv-list-helpers.h:94:19: error: redefinition of ‘list_is_first’ static inline int list_is_first(const struct list_head *list, ^~~~~~~~~~~~~ In file included from /usr/src/linux-5.1-rc1/include/linux/preempt.h:11, from /usr/src/linux-5.1-rc1/include/linux/spinlock.h:51, from /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-418.43/kernel/common/inc/nv-lock.h:16, from /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-418.43/kernel/common/inc/nv-linux.h:19, from /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-418.43/kernel/nvidia/nv-frontend.c:13: /usr/src/linux-5.1-rc1/include/linux/list.h:214:19: note: previous definition of ‘list_is_first’ was here static inline int list_is_first(const struct list_head *list, ^~~~~~~~~~~~~ ....................
It seems that ‘list_is_first‘ is now already defined in the latest kernel code, so a simple fix is to rename it in the NVIDIA source to something more unique..
I appears in ~/nvidia-uvm/uvm8_range_tree.c and ~/common/inc/nv-list-helpers.h , so I just renamed each occurrence from ‘list_is_first‘ to ‘nv_list_is_first‘, and the compile continued OK past the previous error point, but then failed later:
............ CC [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-418.43/kernel/nvidia-uvm/nvCpuUuid.o CC [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-418.43/kernel/nvidia-uvm/uvm8.o /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-418.43/kernel/nvidia-uvm/uvm8.c:187:14: error: initialization of ‘vm_fault_t (*)(struct vm_fault *)’ {aka ‘unsigned int (*)(struct vm_fault *)’} from incompatible pointer type ‘int (*)(struct vm_fault *)’ [-Werror=incompatible-pointer-types] .fault = uvm_vm_fault_sigbus_wrapper ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-418.43/kernel/nvidia-uvm/uvm8.c:187:14: note: (near initialization for ‘uvm_vm_ops_disabled.fault’) /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-418.43/kernel/nvidia-uvm/uvm8.c:525:21: error: initialization of ‘vm_fault_t (*)(struct vm_fault *)’ {aka ‘unsigned int (*)(struct vm_fault *)’} from incompatible pointer type ‘int (*)(struct vm_fault *)’ [-Werror=incompatible-pointer-types] .fault = uvm_vm_fault_wrapper, ^~~~~~~~~~~~~~~~~~~~ /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-418.43/kernel/nvidia-uvm/uvm8.c:525:21: note: (near initialization for ‘uvm_vm_ops_managed.fault’) /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-418.43/kernel/nvidia-uvm/uvm8.c:526:21: error: initialization of ‘vm_fault_t (*)(struct vm_fault *)’ {aka ‘unsigned int (*)(struct vm_fault *)’} from incompatible pointer type ‘int (*)(struct vm_fault *)’ [-Werror=incompatible-pointer-types] .page_mkwrite = uvm_vm_fault_wrapper, ^~~~~~~~~~~~~~~~~~~~ /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-418.43/kernel/nvidia-uvm/uvm8.c:526:21: note: (near initialization for ‘uvm_vm_ops_managed.page_mkwrite’) /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-418.43/kernel/nvidia-uvm/uvm8.c:609:21: error: initialization of ‘vm_fault_t (*)(struct vm_fault *)’ {aka ‘unsigned int (*)(struct vm_fault *)’} from incompatible pointer type ‘int (*)(struct vm_fault *)’ [-Werror=incompatible-pointer-types] .fault = uvm_vm_fault_sigbus_wrapper, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-418.43/kernel/nvidia-uvm/uvm8.c:609:21: note: (near initialization for ‘uvm_vm_ops_semaphore_pool.fault’) cc1: some warnings being treated as errors make[3]: *** [/usr/src/linux-5.1-rc1/scripts/Makefile.build:279: /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-418.43/kernel/nvidia-uvm/uvm8.o] Error 1 make[2]: *** [/usr/src/linux-5.1-rc1/Makefile:1566: _module_/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-418.43/kernel] Error 2 make[2]: Leaving directory '/usr/src/linux-5.1-rc1' make[1]: *** [Makefile:170: sub-make] Error 2 make[1]: Leaving directory '/usr/src/linux-5.1-rc1' make: *** [Makefile:79: modules] Error 2
So far, I have not found a patch for this problem..
Robert Gadsdon. March 17, 2019.
I’ve made a patch for the NVIDIA driver, but it should be noted that the system I’ve tested 5.1-rc1 ultimately failed to boot.
Boot got stuck in the middle of the systemd initialization process. You may want to take care before testing this one out.
Also I’m sorry if this got double posted, my other browser wasn’t cooperating the first time around.
Patch, and notes, here: https://gitlab.com/snippets/1836938
Interesting.. I’ve been working on this, using a different approach, and I now have something that is not elegant, but seems to work..
Details will be in my latest article..
RG
I took your ideas, and prepared a working patch for 418.56 on 5.1:
https://www.dsscaw.com/resources/nvidia-418.56-kernel-5.1.diff
I hope it’s useful!
https://github.com/mkubecek/vmware-host-modules/tree/workstation-15.0.3-test
Is now also needed for 5.0.5
Here’s a working patch against the (Debian) 418.56 DKMS sources and 5.1. https://www.dsscaw.com/resources/nvidia-418.56-kernel-5.1.diff
Hi nick, i have tested you patch in kernel 5.1.6 and nvidia (vulkan) driver 418.52.10 and seems “works”
i quited the world works because i have a strangle behavior
now the desktop (kde in my case) now have a tearing (the image is split in two in horizontal way) in the midle of the display, is notorious when move any window over the desktop. this can’t captured with any screenshot app, but i can captured with a vid
https://www.youtube.com/watch?v=wMXEzfbniTc
is a patch propblem or is a driver error?
greetings