This forum has been archived. All content is frozen. Please use KDE Discuss instead.

kwin and VDPAU

Tags: kwin, vdpau kwin, vdpau kwin, vdpau
(comma "," separated)
keyser7777
Registered Member
Posts
1
Karma
0
OS

kwin and VDPAU

Sun Mar 15, 2009 4:24 pm
Hi,

I have an Nvidia GPU(8600 GT) and I'm using theVDPAU feature of nvidia binary driver. This feature allows that most of video decoding is done by the GPU.

This feature works well only if I disable kwin desktop effects. This seems to be a problem only for kwin, cause it also works well with compiz.

The problem is that when playing a HD video file (1080p) using VDPAU when kwin composite is enabled, the CPU usage is extremely high for Xorg(50-70%) and mplayer(20-30%). Instead, if kwin composite is disabled, or if I'm using compiz, the usage for Xorg and Mplayer is extremely low (under 10%) because the video decoding is done by the gpu.

Someone from nvidia forum suggested that this could be caused by the fact that kwin doesn't really use Direct Rendering, even if Enabled Direct Rendering is checked on the Advanced Tab of Desktop Effects settings.

I don't know how to check this, cause if I'm running
Code: Select all
kwin --replace

there's no output.

I'm using Ubuntu 8.10 and KDE 4.2.1 from ppa.

Can someone help?

Thanks
excieve
Registered Member
Posts
2
Karma
0
OS

Re: kwin and VDPAU

Tue Dec 29, 2009 12:22 pm
Hi,

Having exactly the same issue (Nvidia GTX260, KDE 4.3.2, proprietary drivers v. 195.30).
Also, similar thing happens with OpenGL apps being run with compositing enabled. For example, running simple OpenGL app that shows a triangle makes X process use about 20% CPU and the app itself about the same. If I disable compositing - X process uses max 1% and the same usage has an app.

Tried playing with settings (both KDE effects and xorg.conf) - no luck. Does anybody know what is the cause of this? Is this a KDE problem or Nvidia driver bugs? Maybe there are some settings I don't know about?

Thanks.

UPDATE: Just tried something more serious than a triangle displaying app - a Unigine Tropics demo. Same behavior - about 30% CPU usage by X process while compositing is enabled, and 5% when disabled. Overall FPS is also higher in the latter case.
Looks like OpenGL apps (and VDPAU) don't use direct rendering with KDE's compositing. However the compositing itself runs smoothly.
User avatar
Ahmad Samir
Registered Member
Posts
127
Karma
0
OS

Re: kwin and VDPAU

Tue Dec 29, 2009 1:13 pm
It seems to work OK here, Nvidia 8500GT, with "Enabling direct rendering" enabled, although I don't use desktop effects that much.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: kwin and VDPAU

Tue Dec 29, 2009 10:26 pm
This is due to a limitation in the Linux DRI infrastructure, which is not designed for multiple applications performing direct rendering at once. DRI2, its successor is designed for this, but it will take time for drivers and applications to migrate to it ( assuming that X ships with it )

Thus, applications cannot use the GPU when KWin is doing desktop effects.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
excieve
Registered Member
Posts
2
Karma
0
OS

Re: kwin and VDPAU

Wed Dec 30, 2009 12:00 am
Thanks for your answer, bcooksley. Makes sense, but does this apply to VDPAU as well? I'm not sure how it relates to DRI. Topic starter noted that it works fine with Compiz, but not KWin. Can't confirm it, but if VDPAU does work with Compiz, it means that either it doesn't use DRI or Compiz somehow lets it use direct rendering instead of itself, right? Which one is more likely? Either way (assuming that it's fine with Compiz), it looks possible to have both effects enabled and good performance with VDPAU.

Just tried disabling direct rendering in KDE's effects settings - X process still has high CPU usage with both VDPAU and OpenGL apps. Or is this setting not related?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: kwin and VDPAU

Wed Dec 30, 2009 10:38 pm
Disabling direct rendering will likely not have an effect, except to decrease the performance of KWin's effects.

I do not have any ideas on why Compiz does not affect this, but it is probable they implemented a workaround of some description, or use VDPAU natively if it is available.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Google [Bot], Sogou [Bot]