在我的旧硬件上进行新安装后,我注意到性能明显下降,尽管硬件没有改变。整体操作看起来还不错。但如果我启动 YouTube 视频并将其全屏显示,我会得到可怕的性能 - 甚至有几秒钟的冻结。
另外,运行例如韦诺之战相当慢。我曾经能够在大显示器上运行韦诺之战,同时在第二台显示器上运行视频,没有任何问题。
我的显卡:
$ 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
答案1
终于解决了!
我终于得到了不错的性能和双头回来。简而言之,我必须去除催化剂,闭源 AMD/ATI 驱动程序,也称为 fglrx。相反,我现在使用开源驱动程序“readon”,表现良好。
这是我所做的:
注意:请务必备份使用这些命令覆盖的所有文件!
用火杀死 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 双头!
$ glxgears
301 frames in 5.0 seconds = 60.018 FPS