狀況:電腦在外接samsung的LCD螢幕(Model: S24B370H)時無法啟動桌面
http://unix.stackexchange.com/questions/33825/startx-error-when-setting-up-x-server-on-archlinux
在startx出現類似下面的錯誤:
$ startx
...
Loading extension GLX
ile at "var/log/Xorg.0.log" for addigional information. (EE) Server terminated with error
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
查log:
/var/log/Xorg.0.log 或 #以root執行startx
/home/user/.local/share/xorg/Xorg.0.log #以user執行startx
依錯誤提示而異
注意:
每次執行startx後Xorg.0.log是整隻檔案重寫,所以不能像apache error log用tail -f 去看他變化,只能重新打開或:edit去看新的log寫什麼
原因:沒裝主機板上顯卡驅動和設定,無須安裝samsung LCD的驅動
查主機板顯卡:
$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)
得知主機板是intel的顯卡
安裝intel顯卡driver:
extra/libva-intel-driver 1.4.1-1 [installed]
VA-API implementation for Intel G45 and HD Graphics family
# pacman -S libva-intel-driver
安裝成功後
$ ls /usr/lib/xorg/modules/drivers
會多出 intel_drv.so*這檔案。同理,安裝nvidia driver後會這邊多出nvidia_drv.so*這檔案
啟動startx出現錯誤:
(EE) No devices detected.
Fatal server error:
no screens found
解法:
設定/etc/X11/xorg.conf
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
EndSection
為
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "AccelMethod" "uxa"
EndSection
注意:
設定在 /etc/X11/xorg.conf.d/20-intel.conf ( 這個路徑是 pacman -S xf86-video-intel 裝完後給我的提示) 上無效
最後
$ startx 即可開啟桌面
調整登錄畫面的解析度
編輯 /etc/X11/xorg.conf ,在 Section "Monitor" 裡面加入這行
Section "Monitor"
Option "PreferredMode" "1920x1080" #你要的解析度
EndSection
沒有留言:
張貼留言