{"id":3390,"date":"2025-12-18T17:23:45","date_gmt":"2025-12-19T01:23:45","guid":{"rendered":"https:\/\/rglinuxtech.com\/?p=3390"},"modified":"2025-12-18T17:23:45","modified_gmt":"2025-12-19T01:23:45","slug":"nvidia-hack-for-kernel-6-19-support-use-at-your-own-risk","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=3390","title":{"rendered":"NVIDIA &#8211; Hack for Kernel 6.19 Support..  Use at Your Own Risk!"},"content":{"rendered":"<p><strong>Nasty Hack Time&#8230;<\/strong><\/p>\n<p>This is a summary of the changes I made to the NVIDIA &#8216;<em>kernel-open<\/em>&#8216; MIT\/GPL code to get driver <strong>580.119.02<\/strong> working with Kernel <strong>6.19-rc1<\/strong>..<br \/>\n<em><strong>This is a hack, and is not made by a professional, so use at your own risk, and do not use in a business-critical environment!<\/strong><\/em><br \/>\nAs mentioned in the previous article, I have tested this with Fedora 43 KDE\/Plasma running VMware Workstation 25.0.0 with a Win10 Guest, and all seems to work as it should&#8230; These changes do not include kernel version tests, so the resulting driver is only for the 6.19.x kernel, and &#8211; it seems &#8211; only for the later RTX generation of GPUs&#8230;<\/p>\n<p><em><span style=\"font-family: Courier New, Courier, monospace;\"><strong>~\/kernel-open\/common\/inc\/nv-mm.h<\/strong><\/span><\/em><br \/>\naround line 200:<br \/>\nThis already includes the &#8216;correct&#8217; code, but the obscure test around it now fails, exposing the &#8216;incorrect&#8217; code, so remove it, leaving the correct code only..<br \/>\nRemove<br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>#if !NV_CAN_CALL_VMA_START_WRITE<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>\u00a0nv_vma_start_write(vma);<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>\u00a0ACCESS_PRIVATE(vma, __vm_flags) |= flags;<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>#elif defined(NV_VM_AREA_STRUCT_HAS_CONST_VM_FLAGS)<\/strong><\/span><br \/>\nand<br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>#else<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>\u00a0vma-&gt;vm_flags |= flags;<\/strong><\/span><br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>#endif<\/strong><\/span><br \/>\n&#8211; leaving just<br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>vm_flags_set(vma, flags);<\/strong><\/span><\/p>\n<p>&#8211; and do the same to the next (similar) code, leaving just<br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>vm_flags_clear(vma, flags);<\/strong><\/span><\/p>\n<p><span style=\"font-size: 16px;\"><em><span style=\"font-family: Courier New, Courier, monospace;\"><strong>~\/kernel-open\/nvidia\/nv-dma.c<\/strong><\/span><\/em><\/span><br \/>\naround line 718:<br \/>\nchange<br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>return (ops-&gt;map_resource != NULL);<\/strong><\/span><br \/>\nto<br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>return NV_TRUE;<\/strong><\/span><\/p>\n<p><em><span style=\"font-family: Courier New, Courier, monospace;\"><strong>~\/kernel-open\/nvidia\/nv-pci.c<\/strong><\/span><\/em><br \/>\naround line 229:<br \/>\nchange<br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>r = pci_resize_resource(pci_dev, NV_GPU_BAR1, requested_size);<\/strong><\/span><br \/>\nto<br \/>\n<span style=\"font-family: Courier New, Courier, monospace;\"><strong>r = pci_resize_resource(pci_dev, NV_GPU_BAR1, requested_size, 0);<\/strong><\/span><\/p>\n<p>This, as you can see, is an unsophisticated hack, so hopefully someone who really knows what they are doing can produce a &#8216;proper&#8217; patch!<\/p>\n<p>I need to get a compatible driver for my systems with GTX GPUs, but this is going to be a problem, as I tried all versions going back to 570.124.04 dated February 2025, and the &#8216;kernel-open&#8217; option (<strong><span style=\"font-family: Courier New, Courier, monospace;\">-M open<\/span><\/strong>) still gave the warning:<br \/>\n<strong>&#8220;The &#8216;MIT\/GPL&#8217; kernel modules are incompatible with the GPU(s) detected on this system.&#8221;<\/strong><\/p>\n<p>I should mention that changing the licence on GPL code is <span style=\"text-decoration: underline;\"><strong>not<\/strong><\/span> a solution..<\/p>\n<p><strong><em>Robert Gadsdon. December 18th 2025.<\/em><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nasty Hack Time&#8230; This is a summary of the changes I made to the NVIDIA &#8216;kernel-open&#8216; MIT\/GPL code to get driver 580.119.02 working with Kernel 6.19-rc1.. This is a hack, and is not made by a professional, so use at your own risk, and do not use in a business-critical environment! As mentioned in the previous article, <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=3390\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5,6,11,14,15,18,19],"tags":[2791,2794,161,182,2790,277],"class_list":["post-3390","post","type-post","status-publish","format-standard","hentry","category-compilation","category-crash-and-burn","category-hacks","category-kernel","category-linux-2","category-nvidia","category-opinion","tag-580-119-02","tag-at-your-own-risk","tag-fix","tag-hack","tag-kernel-6-19-rc1","tag-nvidia-2"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/3390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3390"}],"version-history":[{"count":2,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/3390\/revisions"}],"predecessor-version":[{"id":3392,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/3390\/revisions\/3392"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}