Sony S38GP Debian 系统安装NVIDIA Go 6200驱动
Sony VGN-S38GP 是2004年Sony 公司发布的vaio系列笔记本电脑,预装windows xp系统,采用迅驰 Pentium M 740 处理器和NVIDIA Gefore GO 6200显卡。通过光盘安装Debian 9.9 救活了十四年前的机器,让人郁闷的是Debian自动默认的显卡驱动是 nouveau ,使用起来各种不爽,感觉偏慢。于是决定安装NVIDIA的专用驱动。

识别Nvidia显卡型号
在Debian中,我们通常可以使用 lspci 命令来识别NVIDIA(GPU)的显卡芯片系列。例如:
$ lspci -nn | egrep -i “3d|display|vga”
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation NV44M [GeForce Go 6200] [10de:0167] (rev a1)
这样就可以确定显卡的具体型号了,下面的命令就比较关键了,nvidia-detect 用于检测显卡适合的驱动程序包。
nvidia-detect 检测适合的驱动
它是nvidia的检测脚本(nvidia-detect程序属于non-free),用来识别GPU和所需的驱动程序:,使用命令前,需要取得root权限,并使用apt install nvidia-detect 来进行安装它,如果显示没找到软件包,需要添加non-free源。
$ nvidia-detect
Detected NVIDIA GPUS:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation NV44M [GeForce Go 6200] [10de:0167] (rev a1)
Your card is only supported up to the 304 legacy drivers series.
It is recommended to install the
nvidia-legacy-304xx-driver
package.
驱动程序安装
我安装系统的是 Debian 9 “Stretch” ,其它如:”Jessie”、”Wheezy”等不一定适用。
一、为 sources.list 添加 “contrib” and “non-free” 源。地址在 /etc/apt/sources.list。
# Debian 9 "Stretch" deb http://httpredir.debian.org/debian/ stretch main contrib non-free
二、更新列表,安装适当的linux头文件和内核模块包:
# apt update
# apt install linux-headers-$(uname -r|sed 's/[^-]*-[^-]*-//') nvidia-legacy-304xx-driver
这就会安装 nvidia-legacy-304xx 驱动程序包。同时 DKMS 将通过nvidia-legacy-304xx-kernel- DKMS 包为系统构建nvidia模块。
三、创建一个 Xorg server configuration 文件
# mkdir /etc/X11/xorg.conf.d
# echo -e 'Section "Device"\n\tIdentifier "My GPU"\n\tDriver "nvidia"\nEndSection' > /etc/X11/xorg.conf.d/20-nvidia.conf
四、 重新启动系统,自动将 nouveau 纳入新黑名单。
五、安装成功!