码迷,mamicode.com
首页 > 其他好文 > 详细

Compile NVIDIA driver on Lenovo W520 with Debian

时间:2014-06-30 12:26:40      阅读:326      评论:0      收藏:0      [点我收藏+]

标签:des   style   strong   os   cti   linux   

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) (dannf@debian.org) (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 is linux-image-2.6.32-5-amd64 with a detailed version number 2.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 should create a symbolic link gcc in /usr/bin to the compiler we want:

    ln -sf /usr/bin/gcc-4.3 /usr/bin/gcc

  3. Install corresponding linux-source package

    For me, it is linux-source-2.6.32 with a detailed version number 2.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 package nvidia-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 is NVIDIA-Linux-x86_64-304.64.run.

With everything at hand, just run NVIDIA-Linux-x86_64-304.64.run to compile and install the NVIDIA kernel module. After that, run nvidia-xconfig to generate a xorg.conf file.

One more thing to be paid attention to is the BIOS option for graphics card. Instead of using OS detection for NVIDIA Optimus, we should use Discrete Graphics.

Compile NVIDIA driver on Lenovo W520 with Debian,布布扣,bubuko.com

Compile NVIDIA driver on Lenovo W520 with Debian

标签:des   style   strong   os   cti   linux   

原文地址:http://www.cnblogs.com/quantumman/p/3813858.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!