User:Lemma/GPU-Performance (uk): Difference between revisions

    From KDE TechBase
    No edit summary
    No edit summary
    Line 4: Line 4:
    {{warning|Деякі зміни відображені нижче є такими, що призведуть до '''підвищення температури GPU вашої відеокарти'''. У будь-якому випадку, наглядайте за вашою відеокартою щоб вберегтися від моменту, коли вона стане занадто гарячою!}}
    {{warning|Деякі зміни відображені нижче є такими, що призведуть до '''підвищення температури GPU вашої відеокарти'''. У будь-якому випадку, наглядайте за вашою відеокартою щоб вберегтися від моменту, коли вона стане занадто гарячою!}}


    = Primer =
    = Вступ =


    Several popular graphics cards out there - especiall NVIDIA ones - exhibit performance problems with KDE4. These performance hits mostly concern [[Projects/Plasma|Plasma]] - the KDE4 desktop - and [[Projects/KWin|KWin]] - the KDE window-manager. Generally speaking this isn't due to KDE4 being unoptimized but a problem with the cards' graphics drivers. This page encompasses certain problems that might arise and how to get rid of them.
    Декілька популярних графічних карт, одна з яких наприклад NVIDIA - створює проблеми швидкодії з KDE4. Ці проблеми швидкодії найбільш гостро стосуються [[Projects/Plasma|Plasma]] - стільниці KDE4 - і [[Projects/KWin|KWin]] - менеджера вікон KDE. Загалом говорячи про це не треба говорити що KDE4 не є оптимізованим а це швидше проблема драйверів графічних карт. Ця сторінка описує деякі основні проблеми, що можуть виникнути і як їх можна вирішити.


    = General hints =
    = Основні прийоми =


    == Graphics driver ==
    == Графічні драйвери ==
    For both of the ''big'' graphics chip manufacturers there's 2 seperate graphics drivers each:
    Для обох з найбільших виробників, що пишуть графічні драйвери маємо такі 2 види драйверів:


    * For NVIDIA cards there's the free '''nv''' and the proprietary '''nvidia''' driver. While KDE4 should work fine with the former, it doesn't offer 3D acceleration, so the latter may be your only choice. All NVIDIA subsections herein only refer to the proprietary driver (there's also a 3rd free driver called ''nouveau'' that's currently being written. Unfortunately I don't know how usable it is so far). Due to licensing restrictions most distributions don't install the proprietary driver by default. Please refer to your distribution for information on how to install it.
    * Для карт NVIDIA існує вільний '''nv''' і пропріорієтарний '''nvidia''' драйвер. Поки KDE4 буде працювати добре з the former, it doesn't offer 3D acceleration, so the latter may be your only choice. All NVIDIA subsections herein only refer to the proprietary driver (there's also a 3rd free driver called ''nouveau'' that's currently being written. Unfortunately I don't know how usable it is so far). Due to licensing restrictions most distributions don't install the proprietary driver by default. Please refer to your distribution for information on how to install it.


    {{note|TODO: section about radeonhd and fglrx driver - I don't own an ATI card [[User:Lemma|Lemma]]}}
    {{note|TODO: section about radeonhd and fglrx driver - I don't own an ATI card [[User:Lemma|Lemma]]}}
    Line 21: Line 21:
    While it might further increase performance, I do '''NOT''' recommend installing beta quality drivers because your system's stability will most likely suffer.
    While it might further increase performance, I do '''NOT''' recommend installing beta quality drivers because your system's stability will most likely suffer.


    == nvidia-settings ==
    == використання nvidia-settings ==
    Attributes set using the ''nvidia-settings'' utility aren't permanently saved. Thus you have to set them every time you restart your Xserver. This can be done conveniently by adding the lines to set the features to your <tt>~/.xinitrc</tt>.
    Attributes set using the ''nvidia-settings'' utility aren't permanently saved. Thus you have to set them every time you restart your Xserver. This can be done conveniently by adding the lines to set the features to your <tt>~/.xinitrc</tt>.


    == systemsettings ==
    == використання systemsettings ==
    KDE4's ''systemsettings'' allows you to tweak some kwin settings as well. You can find the settings in ''Desktop -> Desktop Effects -> Advanced Options''. Depending on your card either '''OpenGL''' or '''XRender''' might work better. For OpenGL changing the '''OpenGL mode''' might change performance as well. Please bear in mind that changing some of the tweaks mentioned below might force you to change your settings.
    KDE4's ''systemsettings'' allows you to tweak some kwin settings as well. You can find the settings in ''Desktop -> Desktop Effects -> Advanced Options''. Depending on your card either '''OpenGL''' or '''XRender''' might work better. For OpenGL changing the '''OpenGL mode''' might change performance as well. Please bear in mind that changing some of the tweaks mentioned below might force you to change your settings.


    Example:
    Наприклад:
    * Setting ''InitialPixmapPlacement'' to 2 might improve plasma's performance but might make kwin hang sometimes.
    * Setting ''InitialPixmapPlacement'' to 2 might improve plasma's performance but might make kwin hang sometimes.
    * Setting ''OpenGL mode'' to ''Shared Memory'' might make kwin more responsive again.
    * Setting ''OpenGL mode'' to ''Shared Memory'' might make kwin more responsive again.
    Line 34: Line 34:
    If for some reason your Xserver hangs after hitting the ''Apply'' button on the dialog and your settings get reverted because you can't confirm your changes in time, try again. Usually it will be faster on one of the subsequent tries. If it doesn't you can still change your settings in <tt>~/.kde4/share/config/kwinrc</tt>.
    If for some reason your Xserver hangs after hitting the ''Apply'' button on the dialog and your settings get reverted because you can't confirm your changes in time, try again. Usually it will be faster on one of the subsequent tries. If it doesn't you can still change your settings in <tt>~/.kde4/share/config/kwinrc</tt>.


    = Problems =
    = Проблеми =


    This section summarizes several symptoms you might encounter and tries to explain possible causes.
    This section summarizes several symptoms you might encounter and tries to explain possible causes.


    == Resizing certain windows is choppy ==
    == Зміна розміру деяких вікон призводить до зависання ==
    ;Explanation : This might be due to your card advertising ''ARGB Visuals'' (basically translucency) without having proper support for them. Applications/windows concerned are the plasma desktop, the krunner dialog (Alt+F2), plasma's ''Add new widget'' dialog or a konsole window.
    ;Explanation : This might be due to your card advertising ''ARGB Visuals'' (basically translucency) without having proper support for them. Applications/windows concerned are the plasma desktop, the krunner dialog (Alt+F2), plasma's ''Add new widget'' dialog or a konsole window.


    ;Test : If you want to make sure this issue is a problem for you, run <pre>$ XLIB_SKIP_ARGB_VISUALS=1 konsole</pre> on the command-line and try to resize the new konsole window (setting the environment variable <tt>XLIB_SKIP_ARGB_VISUALS</tt> turns off ''ARGB visuals''). If it resizes without problems, then this is certainly one of the problems you're facing.
    ;Test : If you want to make sure this issue is a problem for you, run <pre>$ XLIB_SKIP_ARGB_VISUALS=1 konsole</pre> on the command-line and try to resize the new konsole window (setting the environment variable <tt>XLIB_SKIP_ARGB_VISUALS</tt> turns off ''ARGB visuals''). If it resizes without problems, then this is certainly one of the problems you're facing.


    Note: I have found that this fixes Dolphin's preview delay too for me. Please confirm. --[[User:Dpalacio|dpalacio]] 17:33, 27 July 2008 (CEST)
    Примітка: I have found that this fixes Dolphin's preview delay too for me. Please confirm. --[[User:Dpalacio|dpalacio]] 17:33, 27 July 2008 (CEST)


    === General ===
    === Основне ===


    * You can set the BackingStore options in your xorg.conf:
    * You can set the BackingStore options in your xorg.conf:
    Line 65: Line 65:
    TODO
    TODO


    == Plasma performance is bad ==
    == Швидкодія Plasma є поганою ==


    ;Explanation : Unfortunately the reasons for plasma being choppy seem to be numerous so it's hard to tell where your choppiness comes from.
    ;Explanation : Unfortunately the reasons for plasma being choppy seem to be numerous so it's hard to tell where your choppiness comes from.
    Line 71: Line 71:
    ;Test : Usually plasma performance problems can be seen best on the ''Folder View'' plasmoid. Moving it or scrolling inside the folder might be pretty slow.
    ;Test : Usually plasma performance problems can be seen best on the ''Folder View'' plasmoid. Moving it or scrolling inside the folder might be pretty slow.


    === General ===
    === Основне ===


    * Please make sure this is not (only) related to the '''ARGB Visuals''' mentioned in the above section.
    * Please make sure this is not (only) related to the '''ARGB Visuals''' mentioned in the above section.
    Line 101: Line 101:
    TODO
    TODO


    == Folder View and other plasmoids look badly rendered ==
    == Перегляд у вигляді тек і інші плазмоїди виглядають погано відмальованими ==


    ;Explanation : Folder View and some other plasmoids use hardware accelerated rendering. There are two methods to do this, and Plasma requires the newer EXA method.  
    ;Explanation : Folder View and some other plasmoids use hardware accelerated rendering. There are two methods to do this, and Plasma requires the newer EXA method.  
    Line 107: Line 107:
    ;Test : This is best seen on the ''Folder View'' widget, which will appear as a distorted and seemingly random region on the screen.
    ;Test : This is best seen on the ''Folder View'' widget, which will appear as a distorted and seemingly random region on the screen.


    === Open Source radeon driver ===
    === Відкритий драйвер для Радеонів ===


    The Open Source radeon driver uses the older XAA hardware acceleration method. To work around this issue, you have to change the 2D acceleration method from XAA (X Acceleration Architecture) to the newer EXA. As this involves editing your xorg.conf file, bear in mind that such a modification may damage your system. ''Do it at your own risk''.
    The Open Source radeon driver uses the older XAA hardware acceleration method. To work around this issue, you have to change the 2D acceleration method from XAA (X Acceleration Architecture) to the newer EXA. As this involves editing your xorg.conf file, bear in mind that such a modification may damage your system. ''Do it at your own risk''.
    Line 118: Line 118:
    Notice that EXA is still marked as unstable, and that some other applications such as some KDE3 programs may render incorrectly.
    Notice that EXA is still marked as unstable, and that some other applications such as some KDE3 programs may render incorrectly.


    = Links/References =
    = Посилання/Довідники =


    [http://www.nvnews.net/vbulletin/showthread.php?t=115916] -- Thread about graphics issues on the NVIDIA forums.
    [http://www.nvnews.net/vbulletin/showthread.php?t=115916] -- Thread about graphics issues on the NVIDIA forums.

    Revision as of 10:34, 29 July 2008


    GPU-Performance

    Warning
    Перед тим як зробити будь-які зміни в Вашій системі, будь ласа перечитайте уважно і спробуйте зрозуміти, що Ви робите. Якщо Ви змінюєте будь-які файли у Вашій системі, збережіть копії немодифікованих версій цих файлів і впевніться, що зможете повернути старі версії в разі якщо Ваш Xserver не зможе стартувати.


    Warning
    Деякі зміни відображені нижче є такими, що призведуть до підвищення температури GPU вашої відеокарти. У будь-якому випадку, наглядайте за вашою відеокартою щоб вберегтися від моменту, коли вона стане занадто гарячою!


    Вступ

    Декілька популярних графічних карт, одна з яких наприклад NVIDIA - створює проблеми швидкодії з KDE4. Ці проблеми швидкодії найбільш гостро стосуються Plasma - стільниці KDE4 - і KWin - менеджера вікон KDE. Загалом говорячи про це не треба говорити що KDE4 не є оптимізованим а це швидше проблема драйверів графічних карт. Ця сторінка описує деякі основні проблеми, що можуть виникнути і як їх можна вирішити.

    Основні прийоми

    Графічні драйвери

    Для обох з найбільших виробників, що пишуть графічні драйвери маємо такі 2 види драйверів:

    • Для карт NVIDIA існує вільний nv і пропріорієтарний nvidia драйвер. Поки KDE4 буде працювати добре з the former, it doesn't offer 3D acceleration, so the latter may be your only choice. All NVIDIA subsections herein only refer to the proprietary driver (there's also a 3rd free driver called nouveau that's currently being written. Unfortunately I don't know how usable it is so far). Due to licensing restrictions most distributions don't install the proprietary driver by default. Please refer to your distribution for information on how to install it.
    Note
    TODO: section about radeonhd and fglrx driver - I don't own an ATI card Lemma


    It's usually advisable to stay up-to-date as improvements are being made in the drivers. Thus a first step in improving your KDE4 experience should be checking your current driver and updating if it's outdated. Please refer to your distribution's documentation on how to do that.

    While it might further increase performance, I do NOT recommend installing beta quality drivers because your system's stability will most likely suffer.

    використання nvidia-settings

    Attributes set using the nvidia-settings utility aren't permanently saved. Thus you have to set them every time you restart your Xserver. This can be done conveniently by adding the lines to set the features to your ~/.xinitrc.

    використання systemsettings

    KDE4's systemsettings allows you to tweak some kwin settings as well. You can find the settings in Desktop -> Desktop Effects -> Advanced Options. Depending on your card either OpenGL or XRender might work better. For OpenGL changing the OpenGL mode might change performance as well. Please bear in mind that changing some of the tweaks mentioned below might force you to change your settings.

    Наприклад:

    • Setting InitialPixmapPlacement to 2 might improve plasma's performance but might make kwin hang sometimes.
    • Setting OpenGL mode to Shared Memory might make kwin more responsive again.

    (note from a user)* Not selecting "Use Vsync" helped a lot in a gforce 6800

    If for some reason your Xserver hangs after hitting the Apply button on the dialog and your settings get reverted because you can't confirm your changes in time, try again. Usually it will be faster on one of the subsequent tries. If it doesn't you can still change your settings in ~/.kde4/share/config/kwinrc.

    Проблеми

    This section summarizes several symptoms you might encounter and tries to explain possible causes.

    Зміна розміру деяких вікон призводить до зависання

    Explanation
    This might be due to your card advertising ARGB Visuals (basically translucency) without having proper support for them. Applications/windows concerned are the plasma desktop, the krunner dialog (Alt+F2), plasma's Add new widget dialog or a konsole window.
    Test
    If you want to make sure this issue is a problem for you, run
    $ XLIB_SKIP_ARGB_VISUALS=1 konsole
    on the command-line and try to resize the new konsole window (setting the environment variable XLIB_SKIP_ARGB_VISUALS turns off ARGB visuals). If it resizes without problems, then this is certainly one of the problems you're facing.

    Примітка: I have found that this fixes Dolphin's preview delay too for me. Please confirm. --dpalacio 17:33, 27 July 2008 (CEST)

    Основне

    • You can set the BackingStore options in your xorg.conf:
    Section "Device"
        ...
        Option "BackingStore" "true"
        ...
    EndSection "Device"

    This works for some (eg. konsole) but unfortunately not all windows.


    • As a last resort you can try setting XLIB_SKIP_ARGB_VISUALS=1 in your ~/.xinitrc but this isn't pretty.

    NVIDIA

    • You can set the IntialPixmapPlacement with the nvidia-settings utility:
      $ nvidia-settings -a InitialPixmapPlacement=2
      This works for some (but unfortunately not all) NVIDIA cards.

    ATI

    TODO

    Швидкодія Plasma є поганою

    Explanation
    Unfortunately the reasons for plasma being choppy seem to be numerous so it's hard to tell where your choppiness comes from.
    Test
    Usually plasma performance problems can be seen best on the Folder View plasmoid. Moving it or scrolling inside the folder might be pretty slow.

    Основне

    • Please make sure this is not (only) related to the ARGB Visuals mentioned in the above section.

    NVIDIA

    • You can set the IntialPixmapPlacement and the GlyphCache option with the nvidia-settings utility:
      $ nvidia-settings -a InitialPixmapPlacement=2 -a GlyphCache=1
      This works for some (but unfortunately not all) NVIDIA cards. Some cards reportedly work better using InitialPixmapPlacement=1 (or maybe even 3)
    • Options that are said to work well on 8xxx cards but are untested (by me)
      • Option "RenderAccel" "True"
        • enabled by default
      • Option "TripleBuffer" "True"
        • Enables triple buffering. "Decreases the time an application stalls while waiting for vblank events, but increases latency slightly" (NVIDIA Readme)
      • Option "DamageEvents" "True"
        • Recommended by NVIDIA if running composite+glx, increases performance, enabled by default
      • Option "UseCompositeWrapper" "True"
        • Enables the X server's composite wrapper instead of the builtin one.
      • Option "AllowIndirectPixmaps" "True"
        • Could improve hardware rendering on G80+ cards with more than 256 MB of video memory.
      • Option "BackingStore" "True"
        • Cache overlayed areas in case they get redisplayed later
      • Option "PixmapCacheSize" "200000"
        • allocate said number of pixels for pixmap caches
      • Option "OnDemandVBlankInterrupts" "True"
        • only fire VBlank interrupts in modes where they are needed

    ATI

    TODO

    Перегляд у вигляді тек і інші плазмоїди виглядають погано відмальованими

    Explanation
    Folder View and some other plasmoids use hardware accelerated rendering. There are two methods to do this, and Plasma requires the newer EXA method.
    Test
    This is best seen on the Folder View widget, which will appear as a distorted and seemingly random region on the screen.

    Відкритий драйвер для Радеонів

    The Open Source radeon driver uses the older XAA hardware acceleration method. To work around this issue, you have to change the 2D acceleration method from XAA (X Acceleration Architecture) to the newer EXA. As this involves editing your xorg.conf file, bear in mind that such a modification may damage your system. Do it at your own risk.

    To make the switch, edit your xorg.conf file (make a backup just in case) and locate the Device section for your graphics card. Add the line

    Option "AccelMethod" "EXA"

    before the "EndSection" line. If there is already a line with AccelMethod, change it from XAA to EXA. Save the file and restart the X server. Notice that EXA is still marked as unstable, and that some other applications such as some KDE3 programs may render incorrectly.

    Посилання/Довідники

    [1] -- Thread about graphics issues on the NVIDIA forums.