装完nvidia驱动后进不了x(已解决)

声卡/显卡/打印机/USB设备等硬件问题(网卡问题请发上面的网卡板块)
回复
kolin
帖子: 7
注册时间: 2006-04-28 9:12
送出感谢: 0
接收感谢: 0

装完nvidia驱动后进不了x(已解决)

#1

帖子 kolin » 2006-04-30 22:19

我装完nividia最新的8756驱动后,进不了x.
看错误提示是nvidia的模块是7126(大概是这个数,没记住),但x的模块是8756。找不到nvidia的模块。
我该怎么办???
上次由 kolin 在 2006-05-02 12:40,总共编辑 1 次。
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙
送出感谢: 4 次
接收感谢: 256 次

#2

帖子 eexpress » 2006-04-30 22:52

xorg.conf里面恢复驱动nvidia为nv。或者看同目录有没有xorg.conf~这样的备份文件。恢复先。
● 鸣学
kolin
帖子: 7
注册时间: 2006-04-28 9:12
送出感谢: 0
接收感谢: 0

#3

帖子 kolin » 2006-05-01 6:56

恢复成 nv不就是用ubuntu默认nvidia驱动了吗??
x的错误提示原文如下 :
API mismatch the nvidia kernel module has the version 1.0-7174 but this x module has the version 1.0
1.0-8756.Please make sure that the kernel module and all nvidia driver components have the same version.
kolin
帖子: 7
注册时间: 2006-04-28 9:12
送出感谢: 0
接收感谢: 0

#4

帖子 kolin » 2006-05-01 7:05

还有个奇怪的问题就是 ,我安装nvidia的驱动 用的是一个外国人写 的脚本,每次执行完这个脚本后我就可以进入x,不知道这是为什么??
脚本如下:
#!/bin/bash
# Licence GPL
# Written by Tseliot
# Alpha release
# Version 0.02a
# For 64 bit ONLY!!!

function installer {
echo -n "Do you want to install or uninstall the Nvidia driver 8756? (Type "i" to install or "u" to uninstall) (or press CTRL+C to exit)"
read inst
if [ "$inst" = "i" ]
then wget ftp://download.nvidia.com/XFree86/Linux ... 6-pkg2.run;

sudo sudo apt-get --assume-yes --force-yes --purge remove linux-restricted-modules-`uname -r` linux-restricted-modules-common nvidia-glx nvidia-settings nvidia-kernel-common;
sudo rm /etc/init.d/nvidia-*;

sudo apt-get --assume-yes install linux-headers-`uname -r` build-essential gcc;

sh NVIDIA-Linux-x86_64-1.0-8756-pkg2.run --extract-only;
cd NVIDIA-Linux-x86_64-1.0-8756-pkg2;

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup_`date +%Y%m%d%H%M`;

if [ -f /usr/lib/xorg/modules/extensions/libglx.so ]
then sudo cp /usr/lib/xorg/modules/extensions/libglx.so /usr/lib/xorg/modules/extensions/libglx.so.backup
fi;

sudo ./nvidia-installer -n -s --x-prefix=/usr/lib/xorg/ --kernel-source-path=/usr/src/linux-headers-`uname -r`;

sudo cp -P /usr/lib/xorg/lib/libX* /usr/lib/xorg/modules/;
sudo cp /usr/lib/xorg/lib/modules/drivers/* /usr/lib/xorg/modules/drivers/;
sudo cp -P /usr/lib/xorg/lib/modules/extensions/* /usr/lib/xorg/modules/extensions/;

choice="nada";
while [ "$choice" = "nada" ]; do
echo -n "Do you want your xorg.conf to be automatically configured? (y/n) \ "Yes" is the default answer";
read choice;
if [ "$choice" = "y" ]
then sudo /usr/bin/nvidia-xconfig
elif [ "$choice" = "" ]
then sudo /usr/bin/nvidia-xconfig
elif [ "$choice" = "n" ]
then echo "Remember to set the Driver to nvidia in your xorg.conf"
elif [ "$choice" = "no" ]
then echo "Remember to set the Driver to nvidia in your xorg.conf"
else choice="nada"
fi;
done;

sudo modprobe nvidia;

echo -n "Do you want to Start the Xserver now? (y/n) \ "Yes" is the default answer";
read server;
if [ "$server" = "y" ]
then sudo /etc/init.d/gdm start & sudo /etc/init.d/kdm start
elif [ "$server" = "" ]
then sudo /etc/init.d/gdm start & sudo /etc/init.d/kdm start
elif [ "$server" = "n" ]
then echo "Remember to start the xserver manually"
elif [ "$server" = "no" ]
then echo "Remember to start the xserver manually"
fi;

elif [ "$inst" = "u" ]
then sudo apt-get --assume-yes --force-yes --purge remove linux-restricted-modules-`uname -r` linux-restricted-modules-common nvidia-glx nvidia-settings nvidia-kernel-common;

cd NVIDIA-Linux-x86_64-1.0-8756-pkg2;
sudo ./nvidia-installer --uninstall;

sudo rm /etc/init.d/nvidia-*;
sudo rm /usr/lib/xorg/lib/libX*;
sudo rm /usr/lib/xorg/modules/libX*;

sudo rm /usr/lib/xorg/lib/modules/drivers/nvidia_drv.*;
sudo rm /usr/lib/xorg/modules/drivers/nvidia_drv.*;

sudo rm /usr/lib/xorg/lib/modules/extensions/libglx.so*;
sudo rm /usr/lib/xorg/modules/extensions/libglx.so;
sudo rm /usr/lib/xorg/modules/extensions/libglx.so.1.0.*;
if [ -f /usr/lib/xorg/modules/extensions/libglx.so.backup ]
then sudo cp /usr/lib/xorg/modules/extensions/libglx.so.backup /usr/lib/xorg/modules/extensions/libglx.so;
fi
else echo 'You should type either "i" or "u" ! (or press CTRL+C to exit)'; installer
fi
}

#set -x
#set -v
sudo /etc/init.d/gdm stop
sudo /etc/init.d/kdm stop
installer
小弟太菜 ,看不懂 ,请 高人指点
godot
帖子: 1
注册时间: 2006-05-11 9:48
送出感谢: 0
接收感谢: 0

#5

帖子 godot » 2006-05-11 10:03

上面的代码就是安装了nvidia的驱动.好东西啊.
gspeed
帖子: 35
注册时间: 2006-03-31 13:56
送出感谢: 0
接收感谢: 0
联系:

#6

帖子 gspeed » 2006-06-04 8:30

这些代码怎么使用啊?谢谢
头像
oneleaf
论坛管理员
帖子: 10230
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04
送出感谢: 7 次
接收感谢: 103 次

#7

帖子 oneleaf » 2006-06-04 10:45

注意这个脚本中有写: # For 64 bit ONLY!!!
回复

回到 “常用硬件支持”