The VirtualBox kernel modules do not match this version of VirtualBox 解决 (linux update,nvidia失败)
2016-10-31 00:35
555 查看
问题
arch linux 下 upgrade之后发现kernel版本没有变?!sudo pacman -S linux
安装失败?!
virtualbox 打开告诉我kernel module do not match?!
vbox的所有东西都找不到?!
CC [M] /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-drv.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-drv.c: In function ‘nvidia_drm_migrate_modeset_ownership’: /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-drv.c:455:26: error: ‘struct drm_minor’ has no member named ‘master’ !file_priv->minor->master) ^~ /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-drv.c:476:5: error: implicit declaration of function ‘drm_master_put’ [-Werror=implicit-function-declaration] drm_master_put(&file_priv->minor->master); ^~~~~~~~~~~~~~ /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-drv.c:476:37: error: ‘struct drm_minor’ has no member named ‘master’ drm_master_put(&file_priv->minor->master); ^~ /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-drv.c: In function ‘nvidia_drm_pci_set_busid’: /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-drv.c:493:11: error: dereferencing pointer to incomplete type ‘struct drm_master’ master->unique = nvidia_drm_asprintf("pci:%04x:%02x:%02x.%d", ^~ /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-drv.c: In function ‘nvidia_update_drm_driver_features’: /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-drv.c:655:36: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types] nv_drm_driver.master_drop = nvidia_drm_master_drop; ^ cc1: some warnings being treated as errors /usr/src/kernels/4.8.3-300.fc25.x86_64/scripts/Makefile.build:289: recipe for target '/tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-drv.o' failed make[3]: *** [/tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-drv.o] Error 1 CC [M] /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-utils.o CC [M] /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-crtc.o CC [M] /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-encoder.o CC [M] /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-connector.o CC [M] /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-gem.o CC [M] /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-fb.o CC [M] /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-modeset.o CC [M] /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-mmap.o CC [M] /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-linux.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-modeset.c: In function ‘nvidia_drm_atomic_commit’: /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-modeset.c:678:34: error: passing argument 1 of ‘drm_atomic_helper_swap_state’ from incompatible pointer type [-Werror=incompatible-pointer-types] drm_atomic_helper_swap_state(dev, state); ^~~ In file included from /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-modeset.c:37:0: /usr/src/kernels/4.8.3-300.fc25.x86_64/include/drm/drm_atomic_helper.h:75:6: note: expected ‘struct drm_atomic_state *’ but argument is of type ‘struct drm_device *’ void drm_atomic_helper_swap_state(struct drm_atomic_state *state, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ CC [M] /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nv-pci-table.o cc1: some warnings being treated as errors /usr/src/kernels/4.8.3-300.fc25.x86_64/scripts/Makefile.build:289: recipe for target '/tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-modeset.o' failed make[3]: *** [/tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-drm/nvidia-drm-modeset.o] Error 1 ld -r -o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-interface.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-frontend.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-instance.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-acpi.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-chrdev.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-cray.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-dma.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-gvi.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-i2c.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-mempool.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-mmap.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-p2p.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-pat.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-procfs.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-usermap.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-vm.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-vtophys.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/os-interface.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/os-mlock.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/os-pci.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/os-registry.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/os-usermap.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-modeset-interface.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv-pci-table.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nv_uvm_interface.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nvlink_linux.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/nvlink_pci.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/ebridge_linux.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia/ibmnpu_linux.o ld -r -o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-modeset/nv-modeset-interface.o /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-modeset/nvidia-modeset-linux.o LD [M] /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia.o LD [M] /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-uvm.o LD [M] /tmp/NVIDIA-Linux-x86_64-367.44/kernel/nvidia-modeset.o make[3]: Target '__build' not remade because of errors. /usr/src/kernels/4.8.3-300.fc25.x86_64/Makefile:1475: recipe for target '_module_/tmp/NVIDIA-Linux-x86_64-367.44/kernel' failed make[2]: *** [_module_/tmp/NVIDIA-Linux-x86_64-367.44/kernel] Error 2 make[2]: Target 'modules' not remade because of errors. make[2]: Leaving directory '/usr/src/kernels/4.8.3-300.fc25.x86_64' Makefile:150: recipe for target 'sub-make' failed make[1]: *** [sub-make] Error 2 make[1]: Target 'modules' not remade because of errors. make[1]: Leaving directory '/usr/src/kernels/4.8.3-300.fc25.x86_64' Makefile:81: recipe for target 'modules' failed make: *** [modules] Error 2 ERROR: The nvidia kernel module was not created. ERROR: Installation has failed. Please see the file '/var/log/nvidia-installer.log' for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.
从没见过如此清新脱俗的错误提示?!
问题原因
是的就是坑跌的nvidia! kernel更新之后nvidia的驱动用的老API,编译过!不!了! 本来很简单的patch,还半天不!更!新! 完蛋玩意儿。(此处引用Linus老人家名言,“fuck you!Nvidia!”)问题解决
于是见到某论坛有某大神自己给更新了,对的,所以我们需要更改源码。。源码位置在/var/lib/dkms/nvidia/367.44/source/
所以接下来这里的目录到kernel这 就是到source这,也就是说后面的kernel/nvidia-drm之类的就是source/nvidia-drm了,减号是删除(或者注释掉,保险),加号是添加,更改好之后在pacman -S linux就可以成功了。 最后reboot就解决了
--- NVIDIA-Linux-x86_64-370.23/kernel/nvidia-drm/nvidia-drm-drv.c 2016-08-09 01:43:19.000000000 +0200 +++ NVIDIA-Linux-x86_64-370.23.patched/kernel/nvidia-drm/nvidia-drm-drv.c 2016-08-16 20:15:01.058822359 +0200 @@ -37,6 +37,7 @@ #include "nvidia-drm-ioctl.h" #include <drm/drmP.h> +#include <drm/drm_auth.h> #include <drm/drm_crtc_helper.h> @@ -420,7 +421,7 @@ static void nvidia_drm_master_drop(struct drm_device *dev, - struct drm_file *file_priv, bool from_release) + struct drm_file *file_priv) { struct nvidia_drm_device *nv_dev = dev->dev_private; int ret; @@ -453,7 +454,7 @@ mutex_lock(&dev->master_mutex); if (!file_priv->is_master || - !file_priv->minor->master) + !file_priv->master) { goto done; } @@ -474,7 +475,7 @@ * NVKMS modeset ownership, because nvidia_drm_master_set()'s call to * grabOwnership() will fail. */ - drm_master_put(&file_priv->minor->master); + drm_master_put(&file_priv->master); file_priv->is_master = 0; ret = 0; --- NVIDIA-Linux-x86_64-370.23/kernel/nvidia-drm/nvidia-drm-modeset.c 2016-08-09 01:43:19.000000000 +0200 +++ NVIDIA-Linux-x86_64-370.23.patched/kernel/nvidia-drm/nvidia-drm-modeset.c 2016-08-16 20:15:01.058822359 +0200 @@ -675,7 +675,7 @@ goto failed; } - drm_atomic_helper_swap_state(dev, state); + drm_atomic_helper_swap_state(state, true); nvidia_drm_update_head_mode_config(state, requested_config); #1
相关文章推荐
- The VirtualBox kernel modules do not match this version of VirtualBox
- 修复VirtualBox "This kernel requires the following features not present on the CPU: pae Unable to boot – please use a kernel appropriate for your CPU"(安装深度Linux的时候就需要)
- 解决VirtualBox "This kernel requires the following features not present on the CPU: pae Unable to boot
- 解决java compiler level does not match the version of the installed java project facet
- Java compiler level does not match the version of the installed Java project facet.问题解决办法
- mvn install Geoserver under ubuntu10.04 时遇到的错误:the API of the mojo scanner is not compatible with this plugin version. 的解决方法
- 解决java compiler level does not match the version of the installed java project facet
- 修复VirtualBox "This kernel requires the following features not present on the CPU: pae Unable to boot
- 解决java compiler level does not match the version of the installed java project facet
- 解决java compiler level does not match the version of the installed java project facet
- Java compiler level does not match the version of the installed Java project facet.解决办法
- Java compiler level does not match the version of the installed Java project facet解决
- 解决java compiler level does not match the version of the installed java project facet
- 修复VirtualBox "This kernel requires the following features not present on the CPU: pae Unable to boot
- 解决java compiler level does not match the version of the installed java project facet
- 修复VirtualBox "This kernel requires the following features not present on the CPU: pae Unable to boot
- java compiler level does not match the version of the installed java project facet错误的解决
- java compiler level does not match the version of the installed java project facet错误的解决
- 解决Java compiler level does not match the version of the installed Java project facet.问题