Results 1 to 17 of 17

Thread: Install Nvidia 340.76 Driver in Kali Linux 2.0

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    2013-Mar
    Posts
    6

    Install Nvidia 340.76 Driver in Kali Linux 2.0

    I have an older laptop in which the usual methods of installing an Nvidia driver do not work. The last driver supporting the laptop's gpu is 340.76. In case anyone runs across this problem, I hope this will help. References are at the end.

    - Install Kali

    - Install kernel headers, and dkms
    Code:
    apt-get update
    apt-get dist-upgrade
    apt-get install -y linux-headers-$(uname -r) dkms
    - Download Nvidia driver installation, and change its permissions to executable
    Code:
    wget http://us.download.nvidia.com/XFree86/Linux-x86_64/340.76/NVIDIA-Linux-x86_64-340.76.run
    chmod +x NVIDIA-Linux-x86_64-340.76.run
    - Prevent nouveau from loading
    Code:
    sed 's/quiet/quiet nouveau.modeset=0/g' -i /etc/default/grub
    update-grub
    reboot
    - Once rebooted, switch to a virtual console (ctrl+alt+f1 for instance) and stop the gdm3 service
    Code:
    service gdm3 stop
    - Run the nvidia driver installation
    Code:
    ./NVIDIA-Linux-x86_64-340.76.run
    - During the installation, choose yes to register the kernel module with DKMS, and no to install 32-bit compatibility libraries. The installation errors out. This is fine

    - Edit /usr/src/nvidia-340.76/nv-pat.c, then use dkms to fix things up, then use nvidia-xconfig to generate an /etc/X11/xorg.conf file, then reboot
    Code:
    nano /usr/src/nvidia-340.76/nv-pat.c
    - "about 35 line change "read_cr4" to "__read_cr4" and "write_cr4" to "__write_cr4" or copy-paste:"
    Code:
    static inline void nv_disable_caches(unsigned long *cr4)
    {
        unsigned long cr0 = read_cr0();
        write_cr0(((cr0 & (0xdfffffff)) | 0x40000000));
        wbinvd();
        *cr4 = __read_cr4();
        if (*cr4 & 0x80) __write_cr4(*cr4 & ~0x80);
        __flush_tlb();
    }
    
    static inline void nv_enable_caches(unsigned long cr4)
    {
        unsigned long cr0 = read_cr0();
        wbinvd();
        __flush_tlb();
        write_cr0((cr0 & 0x9fffffff));
        if (cr4 & 0x80) __write_cr4(cr4);
    }
    Code:
    sudo dkms autoinstall -k 4.0.0-kali1-amd64 -m nvidia-340 -v 340.76
    nvidia-xconfig
    reboot
    - And, you should be ready to drive on.

    References:
    http://docs.kali.org/general-use/ins...-on-kali-linux
    https://bugs.launchpad.net/ubuntu/+s...s/+bug/1431278
    https://bugs.launchpad.net/ubuntu/+s...278/comments/6
    Last edited by ColForbin; 2015-08-14 at 15:24.
    "Whatever happened to playing a hunch, Scully? The element of surprise, random acts of unpredictability? If we fail to anticipate the unforeseen or expect the unexpected in a universe of infinite possibilities, we may find ourselves at the mercy of anyone or anything that cannot be programmed, categorized or easily referenced."

Similar Threads

  1. Kali Linux 2.0 64Bit NVIDIA Driver cant install.. (GT 750M)
    By KaliLinux0 in forum TroubleShooting Archive
    Replies: 4
    Last Post: 2015-12-23, 23:06
  2. Kali Linux 2.0 Install nvidia driver and change resolution!
    By NukeDK in forum TroubleShooting Archive
    Replies: 2
    Last Post: 2015-11-26, 14:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •