inttf NVIDIA 340.xx, 418.xx, 435.xx Patcher for Kernel 5.18/5.17/5.16/5.15/5.14/5.13 [BASH Script] - Comment Page: 5

This is a BASH script, which download NVIDIA installer, extract it, patch it and make new patched installer package. This is very quickly tested alpha version so if you have any problems please let me know or if this works as it should you can also let me know. I use here currently ARCH Linux Patches + my own patches. Currently this works with NVIDIA 340.108 / 418.113 / 435.21 drivers and latest 5.18, 5.17, 5.16, 5.15, 5.14, 5.13, 5.12, 5.11, 5.10 and 5.9 kernels. This should work with any distribution. You just need install wget and patch packages. Check video version of guide: Watch More Videos and Subscribe to if-not-true-then-false.com Youtube Channel Download and Use inttf NVIDIA...

184 comments on “inttf NVIDIA 340.xx, 418.xx, 435.xx Patcher for Kernel 5.18/5.17/5.16/5.15/5.14/5.13 [BASH Script] - Comment Page: 5

1 3 4 5 6 7
    1. I was able to use this patch to get NVIDIA driver 460.80 working on kernel 5.15. It would be nice if the shell script could be updated accordingly.

      diff -Nurp NVIDIA-Linux-x86_64-460.80.orig/kernel/common/inc/nv-time.h NVIDIA-Linux-x86_64-460.80/kernel/common/inc/nv-time.h
      — NVIDIA-Linux-x86_64-460.80.orig/kernel/common/inc/nv-time.h 2021-05-07 07:11:13.000000000 +0000
      +++ NVIDIA-Linux-x86_64-460.80/kernel/common/inc/nv-time.h 2021-12-27 20:54:47.759983626 +0000
      @@ -205,7 +205,7 @@ static inline NV_STATUS nv_sleep_ms(unsi
      // the requested timeout has expired, loop until less
      // than a jiffie of the desired delay remains.
      //
      – current->state = TASK_INTERRUPTIBLE;
      + current->__state = TASK_INTERRUPTIBLE;
      do
      {
      schedule_timeout(jiffies);
      diff -Nurp NVIDIA-Linux-x86_64-460.80.orig/kernel/nvidia-drm/nvidia-drm-crtc.c NVIDIA-Linux-x86_64-460.80/kernel/nvidia-drm/nvidia-drm-crtc.c
      — NVIDIA-Linux-x86_64-460.80.orig/kernel/nvidia-drm/nvidia-drm-crtc.c 2021-05-07 07:11:13.000000000 +0000
      +++ NVIDIA-Linux-x86_64-460.80/kernel/nvidia-drm/nvidia-drm-crtc.c 2021-12-27 21:49:57.541971000 +0000
      @@ -227,8 +227,9 @@ static bool __is_async_flip_requested(co
      }

      static int nv_drm_plane_atomic_check(struct drm_plane *plane,
      – struct drm_plane_state *plane_state)
      + struct drm_atomic_state *atomic_state)
      {
      + struct drm_plane_state *plane_state = atomic_state->planes->state;
      int i;
      struct drm_crtc *crtc;
      struct drm_crtc_state *crtc_state;
      @@ -276,12 +277,12 @@ done:
      }

      static void nv_drm_plane_atomic_update(struct drm_plane *plane,
      – struct drm_plane_state *old_state)
      + struct drm_atomic_state *old_state)
      {
      }

      static void nv_drm_plane_atomic_disable(struct drm_plane *plane,
      – struct drm_plane_state *old_state)
      + struct drm_atomic_state *old_state)
      {
      }

      diff -Nurp NVIDIA-Linux-x86_64-460.80.orig/kernel/nvidia-drm/nvidia-drm-drv.c NVIDIA-Linux-x86_64-460.80/kernel/nvidia-drm/nvidia-drm-drv.c
      — NVIDIA-Linux-x86_64-460.80.orig/kernel/nvidia-drm/nvidia-drm-drv.c 2021-05-07 07:11:13.000000000 +0000
      +++ NVIDIA-Linux-x86_64-460.80/kernel/nvidia-drm/nvidia-drm-drv.c 2021-12-27 21:57:28.059969281 +0000
      @@ -865,9 +865,9 @@ static void nv_drm_register_drm_device(c

      dev->dev_private = nv_dev;
      nv_dev->dev = dev;
      – if (device->bus == &pci_bus_type) {
      + /* if (device->bus == &pci_bus_type) {
      dev->pdev = to_pci_dev(device);
      – }
      + } */

      /* Register DRM device to DRM sub-system */

      Reply
      • Hi Andrew,

        Thanks for sharing this, looks nice. I will update script, if this is needed. So do you have some specific reason why you want to run NVIDIA 460.80 Drivers?

        Reply
    2. Been using this script to get my Vostro 2510 with GeForce 8400M GS working for a long time now on every new kernel that comes out.
      I have it on 5.15.13 currently and can even use Xanmod as well! 8)

      Will there be support for kernel 5.16 soon?

      This script is a life saver, I don’t know what I’ll do if it stops being updated as this is the only way I’ve been keeping my laptop up to date.

      Thank you JR for all your work!

      Reply
      • 5.16.3-xanmod1 working beautifully. 8)
        Guess I just had to wait. 8) Thanks!
        Absolutely amazing that I’m getting the life out of
        this laptop I’m getting thanks to this little script! I’m on the latest stable kernel with full NVIDIA
        on a Vostro 2510! 8) Can’t say thanks enough! U rok!

        Reply
    3. did not work on kernel 5.15.10 on my laptop 1ntel i7-740 with GT215M(GT335M).

      Part of nvidia-installer-log:
      make[1]: Entering directory ‘/usr/src/linux-headers-5.15.10’
      test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
      echo >&2; \
      echo >&2 ” ERROR: Kernel configuration is invalid.”; \
      echo >&2 ” include/generated/autoconf.h or include/config/auto.conf are missing.”;\
      echo >&2 ” Run ‘make oldconfig && make prepare’ on kernel src to fix it.”; \
      echo >&2 ; \
      /bin/false)
      warning: the compiler differs from the one used to build the kernel
      The kernel was built by: gcc (Pisi Linux) 10.3.0
      You are using: cc (Pisi Linux) 10.3.0
      /usr/bin/make -f ./scripts/Makefile.build obj=/tmp/selfgz644/NVIDIA-Linux-x86_64-340.108/kernel \
      single-build= \

      Reply
      • Maybe try at shell:
        CC=[path to gcc here] (hit enter)
        Then try running it again.

        Reply
    4. Maybe try at shell:
      export CC=[path to gcc here] (hit enter)
      Then try running it again.

      Reply
    5. Hello. I have such a problem that after installing the patched driver 340.108 on the 5.13 kernel, it starts to eat up very much RAM and swap. HDD under the weld constantly works and writes and writes something there. I have 4gb Ram and it is also completely full. The system is very slow. Thanks in advance!!!

      Reply
      • Hi Sergey,

        This is not normal at all.

        Could you first, post output of following command:

        lspci |grep -E "VGA|3D"
        Reply
    6. Hi. My name is Andrew,
      First of all, thank you for your contribution to tackle the problem.
      My System has an old Geforce 9600GT card and I am running uBuntu Studio 20.10.(Kernel 5.13.xx) I had follow your instruction to install the NVIDIA 304.108 driver.(downloaded from NVIDIA). The patch file was generated successfully so far, but when I ran the patched driver install (NVIDIA-Linux-x86_64-340.108-patched-kernel-5.15.run; ran as root user, used command: ( ./NVIDIA-Linux-x86_64-340.108-patched-kernel-5.15.run ));the Konsole screen showed ¨done¨, but my system hangs afterwards, no more response and I had to do a hard restart to ¨recovery mode again¨ to continue. Any idea?? (I am a newbie in Linux) Your help is highly appreciated.

      Reply
      • Hello Andrew,

        Could you post, firsts output of following command:

        lspci |grep -E "VGA|3D"
        Reply
    7. Thank you for Patch!

      I will install the driver right away and hope that it works my Linux is in the black window screen I had to wait a long time before I could continue at least 1.5 years the standard driver does not work in linux the screen remained in the black window you could only use linux 19xx 20xx with nomodeset the graphics start a shame, I hope the patch is finally worth it to be able to use the good graphics again as before in Linuxmint 16,17,18 (: Thank you very much for the tutorial!!

      Reply
    8. I’m on kernel 5.15.17-xanmod2 and it’s running great!
      Just wanna say thanks again and also ask again about 5.16.X.

      I realize this is still an early kernel but if it isn’t difficult to upgrade the
      script to include it, it would be nice. Thanks.
      I’m on 20.04 LTS and have found versions of the new kernel that have been built for
      20.04 and work on my system, just with no NVIDIA of course, which is a no go for me.

      Reply
    9. Great script! Works wonderfully to get my old NVidia ION working with 5.16!!! Thank you! Excited for the 5.17 version xD.

      Do you know if it’s possible to make the 304.137 driver work on newer kernels as well (older integrated nVidia 6000 + 7000 GPUs)?

      Thanks for all that you are doing with this! A true service to the Linux community!

      Reply
      • Thank you!

        Unfortunately 304.137 won’t work with current distros, because compatibility issues are not only related to kernel. Only NVIDIA drivers kernel compatibility patching is possible.

        If you want to run 304.137 you will need some really old distro. There might be some long term support distros still.

        Reply
    10. It worked for me on my laptop running OpenSUSE Tumbleweed, GNOME 41 is running smoothly. NVIDIA GeForce 8400M GS using 340.108 driver on kernel 5.16, just doesn’t have to be Fedora, Ubuntu, Arch, I’m sure it will work on other distros running kernels 5.15/16 too

      Reply
    11. Works on Manjaro Gnome, I tried it on KDE and it is just a mess and so unstable. I actually made a bash script for myself to automate the process of getting all the files, blacklisting nouveau etc.

      Reply
      • nvidia-installer -v |grep version
        nvidia-installer: version 340.108 ([email protected])

        uname -a
        Linux rabitu-hppaviliondv6500notebookpc 5.15.21-1-MANJARO #1 SMP PREEMPT Sun Feb 6 12:21:42 UTC 2022 x86_64 GNU/Linux

        lspci |grep -E “VGA|3D”
        01:00.0 VGA compatible controller: NVIDIA Corporation G86M [GeForce 8400M GS] (rev a1)

        Reply
    12. id that works for me ??

      01:00.0 3D controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1)

      Reply
    13. Hello!
      Been using your patch for a long time.
      It has extended the life of my laptop.
      Quick question:
      Will kernel 5.17.X be supported in future?
      Thanks!

      Reply
      • Hello MENTD,

        I will check Kernel 5.17.x compatibility soon.

        Reply
        • Awesome! U rok! Thanks!!!

          Reply
          • Have u had a chance to check 5.17.x out yet?
            Is it a harder patch to do?
            I know they are doing some different things with 5.17.x right? Was curious.
            Will there be a time when they reach a kernel that simply can’t be patched?
            I hope not! 8)

            Reply
    14. Trying to correct a no wake up black screen after suspend problem on LenovoT61. Thought I would try the recommended driver Quadro NVS 140 which is NVIDIA 340.108. Cannot seem to get it to load.System crashes.Errors include:
      -ZFS modules are not loaded.Then after loading patch three messages for
      ./inttf-nvidia-patcher .sh:
      line1: –2022-04-05: command not found
      line2:syntax error near unexpected token ‘(‘
      line2:’resolving nvidia.if-not-true-then-false.com(nvidia.if-not-true-then-false.com)… 104.26.6.162, 104.26.7.162,172.67.69.90,…’
      Would appreciate any help to get this driver installed which should solve this black screen after suspend problem. Thanking you.

      Reply
      • Maybe you have some network problem. Script should work normally. You can try to re-download it.

        Reply
    15. I applied the patch to 5.13 kernel, and so far it works great.

      Why isn’t kernel 5.13 included in the list of possible versions?

      If so, why did it pick 5.17 for me when my kernel is 5.13?

      Reply
      • Hi Benjamin,

        These are incremental patches and works with earlier kernels too. Of course you can edit script and drop patches if you want to.

        Reply
1 3 4 5 6 7

Leave a Reply to JR Cancel reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close