作者 hiweed-xorg-drives [actionscript] 2006-08-30 19:47 (点击下载)

  1. #!/bin/bash
  2. #
  3. # setup nvidia and fglrx drives
  4. #
  5. # /usr/lib/hiweed-xorg-drives/hiweed-xorg-drives.sh
  6. #
  7. # Depends:
  8. # /usr/lib/hiweed-xorg-drives/nvidia.fakeroot.tar.gz
  9. # /usr/lib/hiweed-xorg-drives/fglrx.fakeroot.tar.gz
  10.  
  11.  
  12. ## Change the resolution
  13. do_fine(){
  14. cp /etc/X11/xorg.conf /etc/X11/xorg.conf.old
  15. sed -ie 's/"1280x1024" //' /etc/X11/xorg.conf
  16. ldconfig
  17. }
  18.  
  19. ## Setup drives fuction
  20. do_nvidia(){
  21. echo Setting nvidia drives...
  22. cd /
  23. tar zxf /usr/lib/hiweed-xorg-drives/nvidia.fakeroot.tar.gz
  24. nvidia-xconfig
  25. #depmod -a ; modprobe nvidia
  26. echo Done
  27. exit 0
  28. }
  29.  
  30. do_fglrx(){
  31. echo Setting fglrx drives...
  32. cd /
  33. tar zxf /usr/lib/hiweed-xorg-drives/fglrx.fakeroot.tar.gz
  34. aticonfig --initial
  35. aticonfig --overlay-type=Xv
  36. #depmod -a ; modprobe nvidia
  37. echo Done
  38. exit 0
  39. }
  40.  
  41. ## test
  42. #do_nvidia(){
  43. # echo nvidia
  44. #}
  45. ## test
  46. #do_fglrx(){
  47. # echo ati-fglrx
  48. #}
  49.  
  50. ## check for nvidia, fglrx card
  51. depmod -a
  52. if [ -n "`lspci |grep VGA |grep -i "nvidia"`" ]
  53. then
  54. driver="nvidia"
  55. modprobe nvidia && do_nvidia
  56. elif [ -n "`lspci |grep VGA |grep -i "ati "`" ]
  57. then
  58. modprobe fglrx
  59. if [ "$?" == "0" ]
  60. then
  61. driver="fglrx"
  62. do_fglrx
  63. else
  64. driver="randeon"
  65. true
  66. fi
  67. elif [ -n "`lspci |grep VGA |grep -i "intel"`" ]
  68. then
  69. driver="i810"
  70. fi
  71.  
  72. ## no supported 3D Video Card
  73. if [ -z "$driver" ]
  74. then
  75. echo -e "It looks like you don't have a supported 3D Video Card :(\n"
  76. exit 1
  77. fi
  78.  
  79. exit 0
  80.  
  81.  

提交下面的校正或者修改. (点击这里开始一个新的帖子)
姓名: 在 cookie 中记住我的名字

屏幕抓图:(jpeg 或 png)