{"id":899,"date":"2013-10-23T08:53:15","date_gmt":"2013-10-23T07:53:15","guid":{"rendered":"http:\/\/rglinuxtech.com\/?p=899"},"modified":"2013-10-23T08:53:15","modified_gmt":"2013-10-23T07:53:15","slug":"nvidia-auto-patching","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=899","title":{"rendered":"NVIDIA &#8211; Auto-Patching.."},"content":{"rendered":"<p>As we seem to be stuck for some time with NVIDIA drivers incompatible with the latest kernels, patching seems to be more of a necessity, now.<\/p>\n<p>Thanks to a comment from <strong>Giordano<\/strong>, I have learned of a way to &#8216;automatically&#8217; patch any NVIDIAxxxxxx.run file directly, and re-create a corresponding NVIDIAxxxxxx.run file which <span style=\"text-decoration: underline;\">includes<\/span> the patch..\u00a0\u00a0\u00a0 The help function does not go into much actual detail, but by the usual trial and error I managed to figure it out!<\/p>\n<p>The command format is:<\/p>\n<pre># .\/NVIDIAxxxxxx.run --apply-patch &lt;patch-file-name&gt;\r\n<em>or (on some systems)<\/em>\r\n# sh .\/NVIDIAxxxxxx.run --apply-patch &lt;patch-file-name&gt;<\/pre>\n<p>&#8211; and will give a corresponding &#8216;patched&#8217; self-extracting\/executing file called <strong>NVIDIAxxxxxx<em>-custom<\/em>.run<\/strong><\/p>\n<p>The only quirk, is that the patch file itself needs to be in a certain format..<\/p>\n<p>Many patch files contain a specific reference to the files to be patched, as follows:<\/p>\n<pre>--- NVIDIA-Linux-x86_64-319.60\/kernel\/nv-drm.c\u00a0 2013-09-26 01:02:38.000000000 +0400\r\n+++ NVIDIA-Linux-x86_64-319.60\/kernel\/nv-drm.c\u00a0 2013-09-26 01:02:38.000000000 +0400<\/pre>\n<p>Or &#8211; in some cases:<\/p>\n<pre>--- a\/kernel\/nv-drm.c\u00a0 2013-09-26 01:02:38.000000000 +0400\r\n+++ b\/kernel\/nv-drm.c\u00a0 2013-09-26 01:02:38.000000000 +0400<\/pre>\n<p>But &#8211; for the &#8216;auto patch&#8217;, this needs to be changed to<\/p>\n<pre>--- kernel\/nv-drm.c\u00a0 2013-09-26 01:02:38.000000000 +0400\r\n+++ kernel\/nv-drm.c\u00a0 2013-09-26 01:02:38.000000000 +0400<\/pre>\n<p>Then (for example):<\/p>\n<pre><strong># .\/NVIDIA-Linux-x86_64-319.60.run --apply-patch nvidia_312_patch_run.patch<\/strong>\r\nVerifying archive integrity... OK\r\nUncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 319.60.............\r\n.....................................................................................\r\npatching file kernel\/nv-drm.c\r\npatching file kernel\/nv-linux.h\r\n.................\r\nAdding files to archive named \"NVIDIA-Linux-x86_64-319.60-custom.run\"...\r\n.\/libvdpau.so.319.60\r\n.\/.manifest\r\n.\/glxext.h\r\n.\/glx.h\r\n.\/mkprecompiled\r\n.\/libGL.la\r\n.\/glext.h\r\n<em>&lt;long list of files...&gt;<\/em>\r\n.\/nvidia-smi.1.gz\r\n.\/nvidia-persistenced\r\n.\/libnvidia-ml.so.319.60\r\n.\/nvidia-installer.1.gz\r\n.\/gl.h\r\n.\/libnvidia-ifr.so.319.60\r\n\r\nCRC: 2418980242\r\nMD5: d593f39a7b899b47502c7f1c3e808e96\r\n\r\nSelf-extractible archive \"NVIDIA-Linux-x86_64-319.60-custom.run\" successfully created.<\/pre>\n<p>This patched <strong>NVIDIA-Linux-x86_64-319.60-custom.run<\/strong> can then be used in place of the original..<\/p>\n<p>Of course, as I write this, and after many weeks of waiting, I have just noticed there is &#8211; finally &#8211; an updated NVIDIA driver on the download site!<\/p>\n<p><em>Robert Gadsdon.\u00a0\u00a0 October 23, 2013.<\/em><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As we seem to be stuck for some time with NVIDIA drivers incompatible with the latest kernels, patching seems to be more of a necessity, now. Thanks to a comment from Giordano, I have learned of a way to &#8216;automatically&#8217; patch any NVIDIAxxxxxx.run file directly, and re-create a corresponding NVIDIAxxxxxx.run file which includes the patch..\u00a0\u00a0\u00a0 The help <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=899\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","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],"tags":[678,277,296,679,1175],"class_list":["post-899","post","type-post","status-publish","format-standard","hentry","category-compilation","category-crash-and-burn","category-hacks","category-kernel","category-linux-2","category-nvidia","tag-format","tag-nvidia-2","tag-patch","tag-run","tag-success"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/899","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=899"}],"version-history":[{"count":1,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/899\/revisions"}],"predecessor-version":[{"id":900,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/899\/revisions\/900"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=899"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=899"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=899"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}