Compile NVIDIA driver on Lenovo w520 with Debian

Source: Internet
Author: User
Tags wubi

Originally, I installed an Ubuntu using wubi on my company's laptop (Lenovo w520 ). one purpose is for fun, the other is to use some instant messengers, which are blocked by default on our windows system. now, having come to Switzerland, Skype is no doubt the best tool for international communication, which can only be installed on Linux system however.

In order to have better system performance, I decided to change wubi to Debian. actually speaking, Debian has much worse user experience than ubuntu. for example, it does not support NVIDIA graphic display by default. therefore, I had to download the NVIDIA driver and compiled it into the Linux kernel. the following things must be prepared beforehand:

  1. Check Linux kernel version and the GCC version which compiled this kernel

    CAT/proc/version

    Linux version 2.6.32-5-amd64 (Debian 2.6.32-46) ([email protected]) (GCC version 4.3.5 (Debian 4.3.5-4) #1 SMP sun Sep 23 10:07:46 UTC 2012

    My Linux kernel version is: 2.6.32-5-amd64 (Debian 2.6.32-46) (The corresponding package isLinux-image-2.6.32-5-amd64With a detailed version number2.6.32-46). The version of GCC compiling this kernel is: 4.3.5 (Debian 4.3.5-4)

  2. Install the GCC compiler with the above version 4.3.5 (Debian 4.3.5-4)

    Usually, there may be a GCC compiler with a higher version than the one that compiled the kernel. for example, on my system, the default GCC version is 4.4.5 (Debian 4.4.5-8), which is higher than the kernel compiler 4.3.5 (Debian 4.3.5-4 ). then, we shoshould create a symbolic linkGccIn/Usr/binTo the compiler we want:

    Ln-SF/usr/bin/gcc-4.3/usr/bin/GCC

  3. Install correspondingLinux-SourcePackage

    For me, it isLinux-source-2.6.32With a detailed version number2.6.32-46. The NVIDIA driver will be compiled through a kernel interface, which is special layer between the Linux kernel and the NVIDIA driver. This compilation requires this Linux-source package installed.

  4. NVIDIA kernel module

    I 've also installed the packageNvidia-kernel-195.36.31, Which provides the non-free NVIDIA kernel module. with this installed, the video display is still not correct. therefore, I'm not sure what is its actual function. but for safety, just keep this package.

  5. Download NVIDIA driver from its official website. The file for me isNVIDIA-Linux-x86_64-304.64.run.

With everything at hand, just runNVIDIA-Linux-x86_64-304.64.runTo compile and install the NVIDIA kernel module. After that, runNVIDIA-xconfigTo generateXorg. confFile.

One more thing to be paid attention to is the BIOS option for graphics card. Instead of using OS Detection for NVIDIA Optimus, We shocould useDiscrete graphics.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.