2009年2月12日 星期四

ATI fglrx Driver

為了讓NB和外接螢幕有不同的解析度,搞了兩天

1.安裝原廠的 fglrx driver, 為了避免和 apt 混淆, 不要把 ati 的 driver 轉成 deb (雖然可以在 aptitute 裡設成hold, 但不知為什麼, apt 還是會誤判有可以升級的package, 要是不小心就會升回原來的 driver)

2.修改 xor.conf, 可以用 aticonfig 來改, 比較省事, 範例:

Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "aticonfig-Screen[0]-0" 0 0
Screen "aticonfig-Screen[0]-1" 1024 0
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "Synaptics Touchpad"
EndSection

Section "Monitor"
Identifier "aticonfig-Monitor[0]-0"
Option "VendorName" "ATI Proprietary Driver"
Option "ModelName" "Generic Autodetecting Monitor"
Option "DPMS" "true"
EndSection

Section "Monitor"
Identifier "aticonfig-Monitor[0]-1"
Option "VendorName" "ATI Proprietary Driver"
Option "ModelName" "Generic Autodetecting Monitor"
Option "DPMS" "true"
EndSection

Section "Device"
Identifier "aticonfig-Device[0]-0"
Driver "fglrx"
BusID "PCI:1:5:0"
EndSection

Section "Device"
Identifier "aticonfig-Device[0]-1"
Driver "fglrx"
BusID "PCI:1:5:0"
Screen 1
EndSection

Section "Screen"
Identifier "aticonfig-Screen[0]-0"
Device "aticonfig-Device[0]-0"
Monitor "aticonfig-Monitor[0]-0"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1024x768"
EndSubSection
EndSection

Section "Screen"
Identifier "aticonfig-Screen[0]-1"
Device "aticonfig-Device[0]-1"
Monitor "aticonfig-Monitor[0]-1"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection

Section "ServerFlags"
Option "Xinerama" "on"
EndSection

3. 把/usr/lib/xorg/modules/amdxmm.so 改名或刪掉, 不然 X window 在啟動時會 crash, 查網路上的討論如果不 load amdxmm.so 會不能用 XV, 應該還好

4. 重開 X window 就大功告成啦

AMD 原廠的 amdccle (ATI Catalyst Control Center) 除了 clone 和 big screen 外還有 Single 可以選, 選 Single 就可以兩個螢幕設定不同的解析度, 再 enable Xinerama 就和 big screen 一樣讓程式可以從一個螢幕拖到另一個螢幕, 不過這樣一來 xrandr 就不能用了, 要換解析度的話, 都要重新啟動 X Window。