<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi all,</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
i found a fix here: </div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<a href="https://launchpadlibrarian.net/712960879/nvidia-graphics-drivers-470_470.223.02-0ubuntu2.debdiff" id="LPlnk429805" class="OWAAutoLink">https://launchpadlibrarian.net/712960879/nvidia-graphics-drivers-470_470.223.02-0ubuntu2.debdiff</a></div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Simply you need to edit the file /var/lib/dkms/nvidia-legacy-390xx/390.157/source/nvidia-drm/nvidia-drm-drv.c and apply this patch:</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<pre><div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><i>+--- a/nvidia-drm/nvidia-drm-drv.c
++++ b/nvidia-drm/nvidia-drm-drv.c
+@@ -745,29 +745,29 @@ static const struct drm_ioctl_desc nv_drm_ioctls[] = {
+ #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
+ DRM_IOCTL_DEF_DRV(NVIDIA_GEM_IMPORT_NVKMS_MEMORY,
+ nv_drm_gem_import_nvkms_memory_ioctl,
+- DRM_RENDER_ALLOW|DRM_UNLOCKED),
++ DRM_RENDER_ALLOW),
+ #endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */
+
+ DRM_IOCTL_DEF_DRV(NVIDIA_GEM_IMPORT_USERSPACE_MEMORY,
+ nv_drm_gem_import_userspace_memory_ioctl,
+- DRM_RENDER_ALLOW|DRM_UNLOCKED),
++ DRM_RENDER_ALLOW),
+ DRM_IOCTL_DEF_DRV(NVIDIA_GEM_MAP_OFFSET,
+ nv_drm_gem_map_offset_ioctl,
+- DRM_RENDER_ALLOW|DRM_UNLOCKED),
++ DRM_RENDER_ALLOW),
+ DRM_IOCTL_DEF_DRV(NVIDIA_GET_DEV_INFO,
+ nv_drm_get_dev_info_ioctl,
+- DRM_RENDER_ALLOW|DRM_UNLOCKED),
++ DRM_RENDER_ALLOW),
+
+ #if defined(NV_DRM_FENCE_AVAILABLE)
+ DRM_IOCTL_DEF_DRV(NVIDIA_FENCE_SUPPORTED,
+ nv_drm_fence_supported_ioctl,
+- DRM_RENDER_ALLOW|DRM_UNLOCKED),
++ DRM_RENDER_ALLOW),
+ DRM_IOCTL_DEF_DRV(NVIDIA_FENCE_CONTEXT_CREATE,
+ nv_drm_fence_context_create_ioctl,
+- DRM_RENDER_ALLOW|DRM_UNLOCKED),
++ DRM_RENDER_ALLOW),
+ DRM_IOCTL_DEF_DRV(NVIDIA_GEM_FENCE_ATTACH,
+ nv_drm_gem_fence_attach_ioctl,
+- DRM_RENDER_ALLOW|DRM_UNLOCKED),
++ DRM_RENDER_ALLOW),
+ #endif
+
+ DRM_IOCTL_DEF_DRV(NVIDIA_GET_CLIENT_CAPABILITY,
+@@ -776,19 +776,19 @@ static const struct drm_ioctl_desc nv_drm_ioctls[] = {
+ #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
+ DRM_IOCTL_DEF_DRV(NVIDIA_GET_CRTC_CRC32,
+ nv_drm_get_crtc_crc32_ioctl,
+- DRM_RENDER_ALLOW|DRM_UNLOCKED),
++ DRM_RENDER_ALLOW),
+ DRM_IOCTL_DEF_DRV(NVIDIA_GET_CRTC_CRC32_V2,
+ nv_drm_get_crtc_crc32_v2_ioctl,
+- DRM_RENDER_ALLOW|DRM_UNLOCKED),
++ DRM_RENDER_ALLOW),
+ DRM_IOCTL_DEF_DRV(NVIDIA_GEM_EXPORT_NVKMS_MEMORY,
+ nv_drm_gem_export_nvkms_memory_ioctl,
+- DRM_RENDER_ALLOW|DRM_UNLOCKED),
++ DRM_RENDER_ALLOW),
+ DRM_IOCTL_DEF_DRV(NVIDIA_GEM_ALLOC_NVKMS_MEMORY,
+ nv_drm_gem_alloc_nvkms_memory_ioctl,
+- DRM_RENDER_ALLOW|DRM_UNLOCKED),
++ DRM_RENDER_ALLOW),
+ DRM_IOCTL_DEF_DRV(NVIDIA_GEM_EXPORT_DMABUF_MEMORY,
+ nv_drm_gem_export_dmabuf_memory_ioctl,
+- DRM_RENDER_ALLOW|DRM_UNLOCKED),
++ DRM_RENDER_ALLOW),
+ #endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */
+ };</i></div><div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><i><br></i></div><div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br></div><div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Replace all DRM_RENDER_ALLOW|DRM_UNLOCKED with DRM_RENDER_ALLOW (delete DRM_UNLOCKED) .</div><div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Now it will compile successfully all nvidia modules.</div><div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Regards</div><div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br></div><div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">Attila</div><div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);"><br></div></pre>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
</body>
</html>