Desktop Effects Performance/zh-cn: Difference between revisions
m (Created page with "KInfoCenter 可以查看使用的驱动信息。点击 <menuchoice>图形信息 -> OpenGL</menuchoice>,然后去找 "Driver" 字样,尤其...") |
(Updating to match new version of source page) |
||
(36 intermediate revisions by 2 users not shown) | |||
Line 14: | Line 14: | ||
{|class="vertical-centered" | {|class="vertical-centered" | ||
|[[Image:kwin_kinfocenter_opengl.png|250px|thumb|left|OpenGL | |[[Image:kwin_kinfocenter_opengl.png|250px|thumb|left|OpenGL 信息]]||Renderer 如果标识是 "Software Rasterizer"那就是没有装驱动。其他驱动的话检查下是否该项正确。<br /><br /> | ||
|} | |} | ||
Line 45: | Line 45: | ||
It is not trivial to find out whether '''KWin''' uses OpenGL 1 or 2 as this is completely determined at runtime. The best available test is to use the Invert effect which can be enabled in <menuchoice>Systemsettings -> Desktop Effects -> All Effects tab</menuchoice>. After enabling the screen should be inverted when using the shortcut <keycap>Meta + Ctrl + I</keycap>. If it inverts OpenGL 2 is used, if it does nothing OpenGL 1 is used. | It is not trivial to find out whether '''KWin''' uses OpenGL 1 or 2 as this is completely determined at runtime. The best available test is to use the Invert effect which can be enabled in <menuchoice>Systemsettings -> Desktop Effects -> All Effects tab</menuchoice>. After enabling the screen should be inverted when using the shortcut <keycap>Meta + Ctrl + I</keycap>. If it inverts OpenGL 2 is used, if it does nothing OpenGL 1 is used. | ||
可以强制 '''KWin''' 使用 OpenGL 1的,打开<menuchoice>系统设置->桌面特效 -> 高级</menuchoice>,取消掉<menuchoice>使用 OpenGL 2 阴影</menuchoice>。对于旧的电脑这样做能提高一定的性能,但如果驱动报告的 OpenGL 版本是3.x的话(当前只有 NVIDIA 驱动支持),那最好还是用 OpenGL 2 阴影,没必要去用 OpenGL 1。 | |||
{{Tip| | {{Tip/zh-cn|好点的硬件上,OpenGL 2 阴影表现要比 OpenGL 1要好,指定使用后者对于提高性能没有意义。}} | ||
=== kwin_gles === | === kwin_gles === | ||
"KWin" 4.8 开始,你可以用同时附带的 "kwin_gles" 来替代 "kwin"。"kwin_gles"跟 "kwin"是一样的效果,除了前者是用 "egl"替换"glx"来作为原生的平台接口。 | |||
{{Warning| | {{Warning/zh-cn|要是常规的 "kwin"没法在 OpenGL 2 下工作,"kwin_gles"基本也一样的……}} | ||
在 ""Konsole"" 下运行 <code>kwin_gles --replace</code> 就成。这方面还属于新特性,没完全测试,所以 bug 难免,欢迎反馈。要是能跑起来,你可以在 <code>~/.kde4/env/</code>添加个脚本去执行 <code>KDEWM=kwin_gles</code> 设定环境变量。 | |||
== | == 缩略图缩放 == | ||
混成系统支持不同的缩略图缩放模式,这些缩略图要么是任务栏预览上用的,要么是窗口展示特效上用到的。默认是尽量精确的渲染,代价是更多的资源消耗。 | |||
<menuchoice>系统设置-> 桌面特效 -> 高级 -> 缩放方法列表</menuchoice>。有三种选择: | |||
* Crisp | * Crisp | ||
* Smooth | * Smooth | ||
* Accurate | * Accurate | ||
下面的表格列出不同设置下的缩略图表现。 | |||
{|class="vertical-centered wikitable"; width="650" | {|class="vertical-centered wikitable"; width="650" | ||
! colspan="2" | | ! colspan="2" | 不同设置下的缩略图渲染表现 | ||
|- | |- | ||
! Crisp: | ! Crisp: | ||
Line 85: | Line 85: | ||
Switching from Accurate to Smooth can significantly improve the performance of effects like Present Windows. | Switching from Accurate to Smooth can significantly improve the performance of effects like Present Windows. | ||
== | == 动画效果速度== | ||
Animations take some time and the length of an animations is what makes people think that this is a snappy interface or that it lags. This is a very subjective feeling and the difference between too fast and too slow can be milliseconds. It is impossible to have a perfect value for all users. | Animations take some time and the length of an animations is what makes people think that this is a snappy interface or that it lags. This is a very subjective feeling and the difference between too fast and too slow can be milliseconds. It is impossible to have a perfect value for all users. | ||
Line 91: | Line 91: | ||
The global animation duration level can be changed through <menuchoice>Systemsettings -> Desktop Effects -> General Tab -> Animation speed selection list</menuchoice>. It varies from "Extremely slow" to "Instant" which does not render any animations. By changing from "Normal" to "Fast" many users reported having a more snappy interface. | The global animation duration level can be changed through <menuchoice>Systemsettings -> Desktop Effects -> General Tab -> Animation speed selection list</menuchoice>. It varies from "Extremely slow" to "Instant" which does not render any animations. By changing from "Normal" to "Fast" many users reported having a more snappy interface. | ||
== Qt | == Qt 图形系统 == | ||
Since 4.7 (Released July 2011) the Compositor can use the Qt graphics system ''raster'' instead of ''native'' (X11). This is only relevant for rendering the window decorations and is not related to the compositing backends (OpenGL/XRender). | Since 4.7 (Released July 2011) the Compositor can use the Qt graphics system ''raster'' instead of ''native'' (X11). This is only relevant for rendering the window decorations and is not related to the compositing backends (OpenGL/XRender). | ||
Which graphics system is used depends on the distribution defaults. For the Compositor raster is recommended especially if the NVIDIA driver is used. | Which graphics system is used depends on the distribution defaults. For the Compositor raster is recommended especially if the NVIDIA driver is used. KWin will always select the best graphics system for your chosen compositor. The following general combinations can be recommended: | ||
* OpenGL with raster | |||
* XRender with native | |||
* No Compositing: | |||
** native in case of remote connections (recommended window decoration: Laptop) | |||
** raster if using fancy window decoration (including Oxygen and Plastik in 4.10 or later) | |||
== 窗口边框装饰 == | |||
有些窗口边框装饰会在窗口活动的时候绘制动画,影响了特效的性能。选择“raster"图形系统会减少这部分的影响(参见上面)。 | |||
The default window decoration ''Oxygen'' provides an option to disable the animations: <menuchoice>Systemsettings -> Workspaces Appearance -> Window Decorations -> Configure Decoration... -> General tab</menuchoice> Checkbox '''Enable animations'''. Disabling the animations can improve the performance. | The default window decoration ''Oxygen'' provides an option to disable the animations: <menuchoice>Systemsettings -> Workspaces Appearance -> Window Decorations -> Configure Decoration... -> General tab</menuchoice> Checkbox '''Enable animations'''. Disabling the animations can improve the performance. | ||
Line 107: | Line 115: | ||
Another area of window decorations which can impact the performance are shadows. Again the default decoration Oxygen provides a setting to disable them in the same configuration dialog as described above in tab "Shadows" and the themed decorations do not provide an option to disable shadows. | Another area of window decorations which can impact the performance are shadows. Again the default decoration Oxygen provides a setting to disable them in the same configuration dialog as described above in tab "Shadows" and the themed decorations do not provide an option to disable shadows. | ||
== | == 模糊(毛玻璃)特效 == | ||
''模糊特效'' 消耗的资源非常大。默认除了 Intel 的硬件,其他硬件都是开启这个特效的。打开的半透明窗口越多造成的性能影响也就越大,尤其是半透明的控件样式(比如说 Oxygen Translucent 半透明版本主题)和半透明的窗口标题栏(比如 Aurorae 主题)。反正你可以考虑要么换主题,要么禁特效。 | |||
The performance of the Blur effect can be adjusted through <menuchoice>Systemsettings -> Desktop Effects -> All Effects tab -> Configuration dialog of Blur effect</menuchoice>. Moving the slider for strength to "Light" requires less resources while moving it towards "Strong" requires more resources. Since 4.8 (release January 2012) the intermediate rendering results can be kept (default) which improves the performance even with translucent themes. | The performance of the Blur effect can be adjusted through <menuchoice>Systemsettings -> Desktop Effects -> All Effects tab -> Configuration dialog of Blur effect</menuchoice>. Moving the slider for strength to "Light" requires less resources while moving it towards "Strong" requires more resources. Since 4.8 (release January 2012) the intermediate rendering results can be kept (default) which improves the performance even with translucent themes. | ||
== | == 高级桌面特效设置 == | ||
The Compositor provides some advanced settings under <menuchoice>Systemsettings -> Desktop Effects -> Advanced tab</menuchoice>. Some of the settings have already been explained. This section focuses on the remaining settings. Changing these settings in general do not improve the performance but make it worse. The Compositor uses the best possible settings. | The Compositor provides some advanced settings under <menuchoice>Systemsettings -> Desktop Effects -> Advanced tab</menuchoice>. Some of the settings have already been explained. This section focuses on the remaining settings. Changing these settings in general do not improve the performance but make it worse. The Compositor uses the best possible settings. | ||
=== | ===混成类型 === | ||
可以选择混成后端,XRender 或 OpenGL。默认用的 OpenGL 是用的硬件加速,要是没装驱动(比如在虚拟机里面跑系统)的话可以开 XRender,XRender 占用 CPU 资源来渲染窗口的,而且多数特效还没法开。 | |||
{{Info|1= | {{Info/zh-cn|1=没必要改这个选项,要是真没法用 OpenGL,系统也会自动回退到 XRender 渲染的。}} | ||
=== | === 保持窗口缩略图 === | ||
基本不影响性能,用来设定缩略图存放时间的,最好别动。 | |||
=== | === 窗口全屏时暂停桌面特效 === | ||
这个选项非常影响全屏窗口的性能,比如说游戏。开了这个,大大增加游戏流畅度啊。弊端是有可能引起闪烁(突然在某窗口全屏弹出另外一个窗口的时候,比如说右键菜单),还有 Flash 全屏时候刷弹幕。某些发行版+Intel 驱动还有可能关闭全屏窗口时直接崩溃。反正就是没问题就开。 | |||
快捷键也能直接禁用桌面特效的 <keycap>Alt + Shift + F12</keycap> ,打游戏、看视频的时候没特效最好了。KDE 4.7 后还可以对特定窗口设置窗口规则来自动触发禁用特效动作。 | |||
=== OpenGL | === OpenGL 模式=== | ||
{{Warning| | {{Warning/zh-cn|这个选项已经在 KDE 4.7 版本里删掉了。}} | ||
=== | === 启用直接渲染 === | ||
{{Warning| | {{Warning/zh-cn|同上,已经在 KDE 4.8 里删掉了这个选项。}} | ||
=== | === 使用 VSync === | ||
''VSync'' | ''VSync'' 与显示屏同步渲染情况。没别的原因就不用关闭这个选项,就算这个选项不开启,KWin 依然会尝试采用显示屏支持的帧率,通常是 60 Hz。 | ||
多显示器的话情况有点特殊,只能跟一个显示屏的帧率同步。如果多台显示屏的帧率不同,最好还是禁掉这个选项,手动设置帧率。 | |||
[[Category: | [[Category:系统/zh-cn]] | ||
[[Category: | [[Category:配置/zh-cn]] |
Latest revision as of 09:07, 25 February 2013
桌面特效性能
KDE Plasma 工作空间的图形特效性能是由显卡(GPU)、显卡驱动和混成特效窗口管理器(Kwin) 三者决定的。窗口管理器通过从显卡驱动那获取当前硬件说支持的特性来设定最优化的配置。有时候,细调 KWin 会有一定的性能改进。
选择合适的驱动
获取当前的驱动信息
驱动问题得解决好,不然没装驱动,或是装了错的驱动,桌面特效就会回退去用无硬件加速的后端 XRender,无论效果还是响应速度都很难受。
KInfoCenter 可以查看使用的驱动信息。点击 ,然后去找 "Driver" 字样,尤其是 "Vendor","Renderer" 和 "OpenGL/ES 版本"这些信息。
Renderer 如果标识是 "Software Rasterizer"那就是没有装驱动。其他驱动的话检查下是否该项正确。 |
可用的驱动
AMD/ATI
AMD/ATI 显卡有2种驱动能用,官方的私有驱动 fglrx 或 Catalyst,和自由开源的Mesa(又叫 radeon, r300, r600)。用 fglrx 驱动的话不是所有特性都能开启,而且用 Mesa 的话性能一般来说还要好点。推荐是用 Mesa 驱动的。如果你在 OpenGL/ES 版本信息中找到 "Mesa" 的字眼,那就不需要再折腾了。
还有,用新版本的 Mesa 驱动,在 Renderer(渲染器)字段应该有 "Gallium" 字眼。
Intel
Intel 硬件用的是自由的 Mesa 驱动,你没的选择。
NVIDIA
NVIDIA 驱动也有2种选择:官方私有驱动和自由的 Mesa 驱动(叫做 nouveau)。自由驱动还在开发中,不一定所有发行版本都有,也不一定支持所有显卡。通常来说还是推荐的官方私有驱动。如果 OpenGL/ES version 字段有 NVIDIA 文字那就是在用官方驱动了。
安装驱动
安装驱动的方法实在是多变,发行版不同,安装的命令以及包名也不一样。你还是去查看你用的系统的文档比较好。
OpenGL 版本
KWin 支持 OpenGL 1.x 和 OpenGL 2.x。默认能用的话 KWin 是使用 OpenGL 2 的特性。OpenGL 2 能够提供更多的特效,但是相应的硬件要求也要高点。了解你当前硬件具体的支持很重要,有些驱动会通过插件来模拟支持高版本的 OpenGL,可想而知效率有多低下。
KInfoCenter 的 "OpenGL/ES version" 字段有具体的 OpenGL 版本信息,像是 2.1 之类的。
It is not trivial to find out whether KWin uses OpenGL 1 or 2 as this is completely determined at runtime. The best available test is to use the Invert effect which can be enabled in Meta + Ctrl + I. If it inverts OpenGL 2 is used, if it does nothing OpenGL 1 is used.
. After enabling the screen should be inverted when using the shortcut可以强制 KWin 使用 OpenGL 1的,打开
,取消掉 。对于旧的电脑这样做能提高一定的性能,但如果驱动报告的 OpenGL 版本是3.x的话(当前只有 NVIDIA 驱动支持),那最好还是用 OpenGL 2 阴影,没必要去用 OpenGL 1。
kwin_gles
"KWin" 4.8 开始,你可以用同时附带的 "kwin_gles" 来替代 "kwin"。"kwin_gles"跟 "kwin"是一样的效果,除了前者是用 "egl"替换"glx"来作为原生的平台接口。
在 ""Konsole"" 下运行 kwin_gles --replace
就成。这方面还属于新特性,没完全测试,所以 bug 难免,欢迎反馈。要是能跑起来,你可以在 ~/.kde4/env/
添加个脚本去执行 KDEWM=kwin_gles
设定环境变量。
缩略图缩放
混成系统支持不同的缩略图缩放模式,这些缩略图要么是任务栏预览上用的,要么是窗口展示特效上用到的。默认是尽量精确的渲染,代价是更多的资源消耗。
。有三种选择:
- Crisp
- Smooth
- Accurate
下面的表格列出不同设置下的缩略图表现。
不同设置下的缩略图渲染表现 | |
---|---|
Crisp: | |
Smooth: | |
Accurate: |
By default Accurate is used. On Intel hardware Accurate is never used and cannot be enabled unless the environment variable KWIN_FORCE_LANCZOS is set to 1.
Switching from Accurate to Smooth can significantly improve the performance of effects like Present Windows.
动画效果速度
Animations take some time and the length of an animations is what makes people think that this is a snappy interface or that it lags. This is a very subjective feeling and the difference between too fast and too slow can be milliseconds. It is impossible to have a perfect value for all users.
The global animation duration level can be changed through
. It varies from "Extremely slow" to "Instant" which does not render any animations. By changing from "Normal" to "Fast" many users reported having a more snappy interface.Qt 图形系统
Since 4.7 (Released July 2011) the Compositor can use the Qt graphics system raster instead of native (X11). This is only relevant for rendering the window decorations and is not related to the compositing backends (OpenGL/XRender).
Which graphics system is used depends on the distribution defaults. For the Compositor raster is recommended especially if the NVIDIA driver is used. KWin will always select the best graphics system for your chosen compositor. The following general combinations can be recommended:
- OpenGL with raster
- XRender with native
- No Compositing:
- native in case of remote connections (recommended window decoration: Laptop)
- raster if using fancy window decoration (including Oxygen and Plastik in 4.10 or later)
窗口边框装饰
有些窗口边框装饰会在窗口活动的时候绘制动画,影响了特效的性能。选择“raster"图形系统会减少这部分的影响(参见上面)。
The default window decoration Oxygen provides an option to disable the animations:
Checkbox Enable animations. Disabling the animations can improve the performance.All window decorations which can be downloaded through the Get New Decorations... dialog use such animations, but it is not possible to disable them. If there is an performance impact due to the theme, it is recommended to use a different one. In general the themed decorations are not optimized and provided to look good and not to be fast.
Another area of window decorations which can impact the performance are shadows. Again the default decoration Oxygen provides a setting to disable them in the same configuration dialog as described above in tab "Shadows" and the themed decorations do not provide an option to disable shadows.
模糊(毛玻璃)特效
模糊特效 消耗的资源非常大。默认除了 Intel 的硬件,其他硬件都是开启这个特效的。打开的半透明窗口越多造成的性能影响也就越大,尤其是半透明的控件样式(比如说 Oxygen Translucent 半透明版本主题)和半透明的窗口标题栏(比如 Aurorae 主题)。反正你可以考虑要么换主题,要么禁特效。
The performance of the Blur effect can be adjusted through
. Moving the slider for strength to "Light" requires less resources while moving it towards "Strong" requires more resources. Since 4.8 (release January 2012) the intermediate rendering results can be kept (default) which improves the performance even with translucent themes.高级桌面特效设置
The Compositor provides some advanced settings under
. Some of the settings have already been explained. This section focuses on the remaining settings. Changing these settings in general do not improve the performance but make it worse. The Compositor uses the best possible settings.混成类型
可以选择混成后端,XRender 或 OpenGL。默认用的 OpenGL 是用的硬件加速,要是没装驱动(比如在虚拟机里面跑系统)的话可以开 XRender,XRender 占用 CPU 资源来渲染窗口的,而且多数特效还没法开。
保持窗口缩略图
基本不影响性能,用来设定缩略图存放时间的,最好别动。
窗口全屏时暂停桌面特效
这个选项非常影响全屏窗口的性能,比如说游戏。开了这个,大大增加游戏流畅度啊。弊端是有可能引起闪烁(突然在某窗口全屏弹出另外一个窗口的时候,比如说右键菜单),还有 Flash 全屏时候刷弹幕。某些发行版+Intel 驱动还有可能关闭全屏窗口时直接崩溃。反正就是没问题就开。
快捷键也能直接禁用桌面特效的 Alt + Shift + F12 ,打游戏、看视频的时候没特效最好了。KDE 4.7 后还可以对特定窗口设置窗口规则来自动触发禁用特效动作。
OpenGL 模式
启用直接渲染
使用 VSync
VSync 与显示屏同步渲染情况。没别的原因就不用关闭这个选项,就算这个选项不开启,KWin 依然会尝试采用显示屏支持的帧率,通常是 60 Hz。
多显示器的话情况有点特殊,只能跟一个显示屏的帧率同步。如果多台显示屏的帧率不同,最好还是禁掉这个选项,手动设置帧率。