歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux下顯卡配置錯誤 無法進入X Windows的解決

Linux下顯卡配置錯誤 無法進入X Windows的解決

日期:2017/2/28 17:00:20   编辑:Linux教程

黑呵曰:你不得不感歎Linux的強大。如果windows因為顯卡驅動開不了機你會怎麼辦?重裝。。。。Linux提供了一個強大的命令行(windows的那個簡直稱不上命令行)讓你直接修改設置,修改完成不用重啟,就能運行。Linux的確比windows好。

進入命令行用vi命令修改以下文件

/etc/X11/Xorg.conf或者可能是/etc/X11/XF86config.conf

修改Xorg.conf是件簡單的事,配置文件結構簡單,也沒有復雜的語法,但是一但配置失敗,後果是比較嚴重的,,所以強烈建議每次修改之前做好備份工作。
Xorg.conf一般位於/etc/X11/xorg.conf
包含了你的顯卡信息和顯示器信息。
===============sample as my config======================
# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg


裝as4.0for 64bit可能出現顯示器花屏現象,可以通過:system-config-display --reconfig修改/etc/X11/Xorg.conf/etc/X11/XF86config.conf還可以通過vncvncserver客戶端vncviwer修改Xorg.conf是件簡單的事,配置文件結構簡單,也沒有復雜的語法,但是一但配置失敗,後果是比較嚴重的,,所以強烈建議每次修改之前做好備份工作。
Xorg.conf一般位於/etc/X11/xorg.conf
包含了你的顯卡信息和顯示器信息。
===============sample as my config======================
# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg
[1;31m帶#的是注釋掉的行,不用管。[m
Section "Files"
FontPath "/usr/share/X11/fonts/misc"
FontPath "/usr/share/X11/fonts/cyrillic"
FontPath "/usr/share/X11/fonts/100dpi/:unscaled"
FontPath "/usr/share/X11/fonts/75dpi/:unscaled"
FontPath "/usr/share/X11/fonts/Type1"
FontPath "/usr/share/X11/fonts/CID"
FontPath "/usr/share/X11/fonts/100dpi"
FontPath "/usr/share/X11/fonts/75dpi"
# paths to defoma fonts
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"
EndSection
[1;31m一段一段的用Section & EndSection隔開,上面是定義一些文件的路徑[m
Section "Module"
# Load "GLcore"//這行
Load "i2c"
Load "bitmap"
Load "ddc"
# Load "dri" //還有這行,是我裝顯卡驅動時注釋掉的
Load "extmod"
Load "freetype"
Load "glx" //這行是加上的,有些記不清了,不過裝好了以後就可以打quake了
Load "int10"
Load "type1"
Load "vbe"
EndSection
[1;31mModule,顧名思意,模塊,加載很多種模塊,當你為你的顯卡裝驅動的時候,你會修改這些東西的,修改完畢且正確,那麼你就可以享受同windows系統下一樣的顯卡速度了。[m
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc104"
Option "XkbLayout" "us"
EndSection
[1;31m鍵盤,顯然,你不用修改這裡,never,除非你的舊鍵盤壞了,而且你想換一塊與眾不同的新鍵盤。[m
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "Emulate3Buttons" "true"
Option "ZAxisMapping" "4 5"
EndSection
[1;31m鼠標,同上,不過,羅技的鼠標在這裡也發揮不了用武之地,因為這裡沒有cs。[m
Section "Device"
Identifier "NVIDIA Corporation NVCrush11 [GeForce2 MX Integrated Graphics]"
Driver "nvidia"
BusID "PCI:2:0:0"
EndSection
[1;31m顯卡,這個是非常重要的一部分,雖然只有三行,但是顯示的性能基本都在這裡體現,只修改這裡是沒有用的,你必須做相應的修改,針對你的顯卡和系統,搜一下網上的文章,你會搞定他的。[m
Section "Monitor"
Identifier "Philips 105S"//只是一個名字,但是改了看起來更好一些
Option "DPMS" //讓能源之星見鬼去吧,注釋掉,如果你願意
HorizSync 30-63 //這兩行改之前請查閱你顯示器的型號,根據
VertRefresh 50-120 //參數做出相應修改,[1;32m不要寫反![m
EndSection
[1;31m顯示器,困擾了我許久的問題,因為xorg對我早年的傷害,我一直不敢輕易嘗試修改這個文件,到最後我下定決心改這個時,很輕松就搞定了。而且付出了很小的代價(兩次死機,恩,很小的代價。)[m
Section "Screen"
Identifier "Default Screen"//[1;31m這行[m
Device "NVIDIA Corporation NVCrush11 [GeForce2 MX Integrated Graphics]"
Monitor "Philips 105S" //[1;31m到這行[m往上面找,找到相關的,注意大小寫
DefaultDepth 16 //一般這裡是24,我的比較老。。。
SubSection "Display"
Depth 1
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 4
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 8
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 15
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubSection
EndSection
[1;31m剩下的就不要改了!自動檢測的會很好的。如果改,請確認你知道你在做什麼。[m
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
EndSection

Section "DRI"
Mode 0666
EndSection

Copyright © Linux教程網 All Rights Reserved