Compile NVIDIA driver on Lenovo W520 with Debian

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 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

时间: 2024-12-22 01:35:04

Compile NVIDIA driver on Lenovo W520 with Debian的相关文章

Compile wireless driver on Lenovo W520 with Debian

First step: I have to make the wireless ethernet card start to work for my Lenovo W520 with Debian installed. Initially, I installed the package firmware-iwlwifi, which contains the firmware for Intel Wireless 1000 inside Lenovo W520. However, only w

Install Nvidia driver 367.18 or later

Install Nvidia driver 367.18 or later from ppa:graphics-drivers/ppa as follows: sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt-get update sudo apt-get install nvidia-367 sudo apt-get install mesa-common-dev sudo apt-get install freeglut3-d

Ubuntu 18.04 nvidia driver 390.48 安装 TensorFlow 1.12.0 和 PyTorch 1.0.0 详细教程

最近要在个人台式机上搭建TensorFlow和PyTorch运行环境,期间遇到了一些问题.这里就把解决的过程记录下来,同时也可以作为安装上述环境的过程记录. 如果没有遇到类似的问题,想直接从零安装上述两个包的运行环境的,请直接阅读第三部分. 一.硬件和环境配置: 1)操作系统:Ubuntu 18.04: 2)NVIDIA Driver Version :390.48:(可通过nvidia-smi命令查到) 3)GPU:GTX 1080: (可通过nvidia-smi命令查到) 4)已安装CUDA

Centos 6.5 install caffe+Nvidia driver+cuda 6.5

Centos 6.5安装caffe全纪录 前不久,在一台新机器上安装了caffe,用于深度学习.其实本人小白一个,在安装caffe的过程中走了很多弯路.在遇到问题时,还好有**google**,可以得带.哦一些解答.但是悲剧的是,有一些问题还真是搜不到答案.比如: NVCC src/caffe/layers/relu_layer.cu src/caffe/layers/prelu_layer.cu(58): error: a host function call cannot be config

centos7 intall nvidia driver

此教程是介绍于 CentOS 7 以上的 Linux 系统中安装 NVIDIA 显卡驱动和 CUDA Toolkit .此文中以 CentOS 7.4 64 bit 为例,显卡型号为 NVIDIA Tesla P4,CUDA 9.0,所有操作在终端以 root 身份运行 .1 先安装好 Linux CentOS 7.4 操作系统,建议直接 minimal installation,也就是大部分包都不安装,桌面也不需要.2 查看系统内核版本# uname -r3.10.0-693.el7.x86_

aptitude search 找不到较新版本的nvidia driver 和CUDA

`sudo dpkg -i cuda-repo-ubuntu1604_9.0.176-1_amd64.deb` `sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub` `sudo apt-get update` `sudo apt-get install cuda` 执行第2步骤之后,aptitude search

tenda u1 usb wireless device install driver for kali linux kernal Debian 4.3.3-7kali2 (2016-01-27) x86_64 GNU/Linux

因为内核比较新的关系,tenda官方网站上面提供给u1无线网卡的驱动并不能正常编译使用,编译的时候报一个类似错误 /usr/src/linux-headers-4.3.0-kali1-common/Makefile:1395: recipe for target '_module_/root/Downloads/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux' failed make[3]: *** [_module_/root/Downloads/

ubuntu Nvidia driver install

在图形界面中,有软件和更新,可以使用附加驱动来更新 最上面的驱动是最新版本,英伟达目前Linux最新的版本是375.39 后面的括号,专有意思是代表英伟达自家的驱动,不开源 选择好之后点击应用更改 关键的一点是需要进bois,设置Secure boot 为 Disable. 否则就算按照上面的选择,也无法使用 原文地址:https://www.cnblogs.com/kevinzhk/p/8450038.html

NVIDIA GeForce Driver Installation on Debian Jessie Linux 8 64bit

The easiest way to install NVIDIA GeForce Driver on Debian Linux 8 ( Jessie ) ( for Debian 9 Stretch visit: How to install the latest NVIDIA drivers on Debian 9 Stretch Linux) is to use official contrib and non-free debian repository. First, add the