Contents
|
幾種流行的顯示卡 - 特別是 NVIDIA 的 - 在 KDE 4 出現性能問題。這些性能問題主要涉及 Plasma - KDE 4 的桌面,和 KWin - KDE 的視窗管理員。一般來說,不是因為 KDE 4 沒有被優化而是顯示卡驅動程式的問題。本頁包含可能出現的問題以及如何解決他們。
這兩大繪圖晶片製造商皆有不同的繪圖驅動程式可以使用:
通常最好更新到已有改善措施的驅動程式。 因此,第一步改善您的 KDE 4 體驗應該檢查你的當前的驅動程式如果它已經過時就需要更新他。請參考您的發行版的文件,了解如何做到。
儘管可能進一步提高性能,但我不建議安裝測試版品質的驅動程式,因為有可能影響您系統的穩定。
用nvidia-settings工具設置的參數不會永久保存,除非你用root 權限。終端下面用 root 登錄,
nvidia-settings&
不然你每次重啟 X 都得重新設置一次。可以通過添加下列字段到你的 ~/.xinitrc 來輕鬆做到。
It seems that older NVidia cards run into the problem that newly opened windows just are drawn as black windows or do not refresh properly anymore. This happens if composite is activated and openGL is used with many windows opened. Maybe the cards are running out of video memory? (The problem does occur with the compiz window manager as well.) In KDE4 you can deactivate composite/effects with Shift + Alt + F12 to continue your work with the desktop normally.
The problem is that drawing of the window decorations does become very slow if no composite is activated (tested with KDE4.3). As alternative to using openGL as composite engine it is recommended to use XRender in this case. Because moving effects become very slow with XRender you should turn animation speed to instant.
KDE4的 系統設定 提供您調整KWin設定。你可以在找到設定。根據您的顯示卡在OpenGL或XRender 運作的較好。使用 OpenGL 可能性能會比較好。請記住,下文提到一些修改可能會改變您的設定。
(Note from user): XRender mode helped A LOT on a 6800 GT (agp) with the proprietary driver, especially while looking at videos (177.80).
例如:
(note from a user)* Not selecting "Use Vsync" helped a lot in a gforce 6800 (and also on a GeForce 8400M GT).
如果由於某種原因點擊對話框的套用按鈕後你的 Xserver 掛掉,並且回覆因為無法確認您的更改,再試一次。通常它隨後會很快的再嘗試。如果沒有你仍然可以修改您的設定在 ~/.kde4/share/config/kwinrc 。
If after installing the NVIDIA's 177.80 versions beta drivers you're still experiencing bad performance (especially on 8xxx-9xxx series) you can install XGL xserver. Please refer to your distribution's documentation on how to do that.
| Note |
|---|
| XGL has *a lot* of issues regarding 3d applications, xvideo and keyboard layout but, with certain video cards, is now the unique way to enjoy KDE4 at full speed. XGL actually 'bypass' the nvidia driver using the mesa library to render the desktop. OpenGL-based desktop effects cannot be run on XGL. |
本文中提到的一些微調是針對在大多數發行版都可找到的檔案 /etc/X11/xorg.conf:
有些Fedora 10 用戶可能會發現預設的情況下這個檔案不存在(depending on their card- anyone with more details on this please feel free to elaborate),所以必須重新創建。請這樣做:
Xorg -configure用root運行'Xorg -configure',完成後會產生'xorg.conf'檔案或者用
sudo Xorg -configure :1,這樣無需切換 runlevel
本節簡要闡述了一些可能會遇到的症狀,並試圖解釋可能的原因。
$ XLIB_SKIP_ARGB_VISUALS=1 konsole在指令列並嘗試調整新開的konsole視窗大小(設定環境變數XLIB_SKIP_ARGB_VISUALS關閉ARGB visuals)。如果調整大小沒有問題,那麼這就是您遇到的問題。
| Note |
|---|
| I have found that this fixes Dolphin's preview delay too for me. Please confirm. --dpalacio 17:33, 27 July 2008 (CEST) |
If you have an older graphics card, hardware acceleration may be a struggle for it. This may be particularly obvious when watching flash videos such as Youtube videos. This may help:
在 "Device" 那部分
...
Option "BackingStore" "true"
...
EndSection "Device"這可以作用在一些(例如konsole)程式,但不幸的是並非所有的視窗有效。
$ nvidia-settings -a InitialPixmapPlacement=2這可以作用在一些 NVIDIA 顯示卡(但不幸的是不是全部)。
在 xorg.conf 的 "Device" 部分
...
Option "AccelMethod" "EXA"
# optional, may improve performance but introduce visible artifacts
# Option "MigrationHeuristic" "greedy"
...
EndSection "Device"
使用此選項的舊 X servers (<=1.4.2)性能會好些,新的 X servers (>=1.4.99.901)會有明顯改善 。
注意:如果您使用 kernel 2.6.29,啟用 UXA 擴展會有許多 bug 和隨機的 xorg 凍結。
Section "Device"
Identifier "Generic Video Card"
Driver "intel"
Option "AccelMethod" "UXA"
EndSection
有了這個設定,我的 i945G 與 PentiumD820,在Glxgears 可以跑 350-500 FPS,和完美運行所有OpenGL渲染效果。
TODO
$ nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1這可以作用在部份的NVIDIA顯示卡(但不幸的是不是全部)。據說有些顯卡使用
InitialPixmapPlacement=1(甚至
InitialPixmapPlacement=3)運作的更好。
TODO
開源 Radeon 驅動使用的是舊的 XAA 硬體加速的方法。若要解決此問題,您必須從 XAA(X Acceleration Architecture)更改 2D 加速方法,以使用較新的 EXA。由於這涉及到編輯您的 xorg.conf 檔案,記住,這樣的修改可能會損害您的系統。這一點需要您自擔風險。
To make the switch, edit your xorg.conf file. Locate the Device section for your graphics card. Before the "EndSection" line, addOption "AccelMethod" "EXA"
If there is already a line with AccelMethod, change it from XAA to EXA. Save the file and restart the X server.
Note that using EXA may result in some older applications, such as some KDE3 programs being rendered incorrectly.
When using EXA it is strongly recommended to use a recent X server, at least 1.6.x or even better the new 1.7 release -- perhaps best to wait for 1.7.1.
If you have an AGP-based card then you may also want to add the following line at the same location into the configuration file.
Option "AccelDFS" "true"
This should accelerate the driver even more, but may get you a hardlock when starting X. So be cautious with this option. See this article for more information on this topic.
The first one refers particularly to systems running KDE prior to 4.3.1 -
These hints won't turn an old graphics card into a fast one, but they will make Desktop Effects a feasibility on many older cards.
這似乎是受 Intel 和 ATi 顯示卡影響。AccelMethod 似乎是罪魁禍首。大部分驅動程式現在預設加速途徑是已經過時和緩慢的 XAA(Option "AccelMethod" "XAA")。這是不建議的作法,特別是在組成(compositing)。 不幸的是,私有的 ATI 和 Nvidia 驅動仍然只支持 XAA。
嘗試加入以下兩行啟用 EXA 加速
Section "Device" Option "UseAtomBIOS" "true" Option "AccelMethod" "EXA" # ... EndSection
這個方法可以用在兩款驅動 radeon 以及 radeonhd,但顯卡有最高只到 X1950 有效。HD2xxx 及以上尚未不支援。
AtomBIOS is automatically used by the radeon driver, so that line will need to be commented out. If you have the radeonhd driver, however, you will need it. EXA is expected to become the default in the near future, but having it specified here is unlikely to cause any problems even then. 3D and EXA support for HD2xxx and above is expected later this year (2009) as they are already in an experimental branch.
檢查 Xorg.0.log 中是否有 EXA。如果你沒有找到它(或 UXA)試著加入EXA 在 ATi section。UXA是一個實驗性的選擇,但只支援少數驅動。It's likely that the best bits will be merged into EXA soon.
Phoronix forums is a good place to read more about this.
在NVIDIA顯卡上krunner對話框可能會出現好幾個(只有最上面的可以使用)。這是由於上述建議設定InitialPixmapPlacement=1 。目前還沒有任何已知的方法來解決這個問題。
在某些時候你可能需要加入 KDE_SKIP_ARGB_VISUALS 到 ~/.bash_profile、 /etc/profile or in ~/.profile. If that rings a bell for you, hunt for it and comment it out. You may find that they magically re-appear. Otherwise, check the Qt4 libraries you are using. In my case I needed Qt 4.4.3 together with KDE 4.2.