Graphics
Radeon HD 5770 和雙顯示器設置的圖形性能非常差
在我的舊硬體上重新安裝後,我注意到性能要差得多,儘管硬體沒有改變。整體操作看起來不錯。但是,如果我開始播放 youtube 影片並將其全屏播放,我的表現會很糟糕——甚至會凍結幾秒鐘。
此外,執行例如 wesnoth 非常慢。我曾經能夠在大顯示器上執行 wesnoth,同時在第二台顯示器上同時執行影片,完全沒有問題。
我的顯卡:
$ sudo lspci|grep VGA 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Juniper XT [Radeon HD 5770]
我的螢幕解析度:(輸出被一些較低的解析度裁剪了一下)
$ xrandr Screen 0: minimum 320 x 200, current 3200 x 1080, maximum 8192 x 8192 DFP1 disconnected (normal left inverted right x axis y axis) DFP2 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm 1920x1080 60.0*+ 50.0 59.9 60.1 50.0 60.0 1600x1200 60.0 [...] DFP3 disconnected (normal left inverted right x axis y axis) DFP4 disconnected (normal left inverted right x axis y axis) CRT1 disconnected (normal left inverted right x axis y axis) CRT2 connected 1280x1024+1920+0 (normal left inverted right x axis y axis) 338mm x 270mm 1280x1024 60.0*+ 75.0 1280x960 60.0 [...]
我的核心和 ATI 驅動程序:
sys-kernel/linux-sabayon-3.12.14 x11-drivers/ati-drivers-13.12#3.12.0-sabayon
啟用直接渲染:
$ glxinfo | grep rendering direct rendering: Yes
使用 glxgears 測量性能時:
$ glxgears 15868 frames in 5.0 seconds = 3173.469 FPS
這是我的 xorg.conf,推測是由 amdcccle 生成的(我用於配置)
Section "ServerLayout" Identifier "Main Layout" Screen 0 "amdcccle-Screen[1]-0" 0 0 EndSection Section "Module" SubSection "extmod" Option "omit xfree86-dga" EndSubSection Load "i2c" Load "ddc" Load "vbe" Load "dri" Load "glx" Load "synaptics" EndSection Section "ServerFlags" Option "AllowMouseOpenFail" "true" EndSection Section "Monitor" Identifier "Generic Monitor" HorizSync 28.0 - 80.0 VertRefresh 43.0 - 60.0 EndSection Section "Monitor" Identifier "0-DFP2" Option "VendorName" "ATI Proprietary Driver" Option "ModelName" "Generic Autodetecting Monitor" Option "DPMS" "true" Option "PreferredMode" "1920x1080" Option "TargetRefresh" "60" Option "Position" "0 0" Option "Rotate" "normal" Option "Disable" "false" EndSection Section "Monitor" Identifier "0-CRT2" Option "VendorName" "ATI Proprietary Driver" Option "ModelName" "Generic Autodetecting Monitor" Option "DPMS" "true" Option "PreferredMode" "1280x1024" Option "TargetRefresh" "60" Option "Position" "1920 0" Option "Rotate" "normal" Option "Disable" "false" EndSection Section "Device" #BusID "PCI:01:00" #Option "RenderAccel" "on" #Option "XAANoOffscreenPixmaps" #Option "BusType" "PCI" #Option "ColorTiling" "on" #Option "EnablePageFlip" "on" # UseEvents is causing segmentation faults with # NVIDIA 6xxx, 7xxx and >=275.xx.xx drivers #Option "UseEvents" "True" Identifier "SabayonVga0" Driver "fglrx" Option "LogoPath" "/usr/share/backgrounds/sabayonlinux-nvidia.png" EndSection Section "Device" Identifier "amdcccle-Device[1]-0" Driver "fglrx" Option "Monitor-DFP2" "0-DFP2" Option "Monitor-CRT2" "0-CRT2" BusID "PCI:1:0:0" EndSection Section "Screen" #Option "AddARGBGLXVisuals" "true" #Option "RegistryDwords" "EnableBrightnessControl=1" Identifier "Screen 0" Device "SabayonVga0" Monitor "Generic Monitor" DefaultDepth 24 SubSection "Display" #Modes "1024x768" "800x600" "640x480" Viewport 0 0 Depth 8 EndSubSection SubSection "Display" #Modes "1024x768" "800x600" "640x480" Viewport 0 0 Depth 16 EndSubSection SubSection "Display" #Modes "1024x768" "800x600" "640x480" Viewport 0 0 Depth 24 EndSubSection EndSection Section "Screen" Identifier "amdcccle-Screen[1]-0" Device "amdcccle-Device[1]-0" DefaultDepth 24 SubSection "Display" Viewport 0 0 Depth 24 EndSubSection EndSection Section "DRI" Mode 0666 EndSection
終於解決了!
我終於得到了不錯的性能和雙頭。簡而言之,我必須刪除 Catalyst,這是一個閉源 AMD/ATI 驅動程序,也稱為 fglrx。相反,我現在使用性能良好的開源驅動程序“readeon”。
這是我所做的:
注意:確保備份您使用這些命令覆蓋的所有文件!
用火殺死 fglrx:
$ equo remove ati-drivers amdcccle $ equo install xf86-video-ati $ equo install x11-base/xorg-drivers $ eselect opengl set xorg-x11 $ sed -i '/blacklist radeon/d' /etc/modprobe.d/blacklist.conf $ sed -i 's/\<nomodeset\>//g' /etc/default/grub
此外,我必須執行以下步驟:
# remove all instances of "nomodeset" from /etc/default/sabayon-grub $ grub2-mkconfig -o /boot/grub/grub.cfg # generates a new GRUB boot configuration file (removes the kernel parameter "nomodeset") $ rm /etc/X11/xorg.conf # removes xorg.conf: X server does not need it anymore, in most cases
啟動後,我的第二台顯示器正在鏡像第一台顯示器。我擺脫了這一點,並使用 KDE 的配置程序配置了正確的定位和解析度:
# Open KDE System Settings # Klick "Hardware > Display and Monitor" # Configure correct positioning and resolution of your Displays # Klick "Save as Default > Safe as Default"
結果:
現在,重新啟動後,我又擁有了一個執行流暢的 KDE Dual-Head!
$ glxgears 301 frames in 5.0 seconds = 60.018 FPS