Bug 269594 - [feature-request] Please make KWin 3D desktop effects work on VirtualBox
Summary: [feature-request] Please make KWin 3D desktop effects work on VirtualBox
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL: https://git.reviewboard.kde.org/r/106...
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-28 09:17 UTC by Technologov
Modified: 2012-10-22 18:06 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:
mgraesslin: ReviewRequest+


Attachments
Output of "kwin --replace" command, from openSUSE 11.4 guest. (1.25 KB, text/x-log)
2011-03-28 13:41 UTC, Technologov
Details
Output of "glxinfo" command, from openSUSE 11.4 guest. (7.45 KB, text/x-log)
2011-03-28 13:41 UTC, Technologov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Technologov 2011-03-28 09:17:42 UTC
Version:           unspecified (using KDE 4.6.0) 
OS:                Linux

VirtualBox, a popular Open-Source virtualizers provides basic 3D Acceleration, but not DRI, so KWin effects fails to use it's 3D acceleration.

They said, that writing Linux DRI drivers for them is a lot of work for them.

So I would like to ask you, if possible to port Kwin desktop composition effects to more basic OpenGL, such as one that is provided by VirtualBox.

A side question: are those effects supposed to work on other UNIX platforms ? (Solaris/FreeBSD) 
I ask, because I am not sure if they provide DRI either.

NOTE: Compiz works fine on VirtualBox.

-Technologov, 28.3.2011.

Reproducible: Always

Steps to Reproduce:
1. Try to enable 3D effects on VirtualBox (I tried openSUSE 11.4 on VirtualBox 4.0)
Comment 1 Thomas Lübking 2011-03-28 13:28:40 UTC
KWin does not "require" neither direct rendering in general nor the DRI extension (which is staill rather a matter of X11 than linux) in particular at all - it's just a good idea because it's (usually) faster (if it works... *sigh*)

I don't know about the limitations of VB, but the software renderer (alongside the fallback texture generation?) used to work fine?

+ If VB doesn't provide accelerated GL, you could just as well use the XRender backend...
+ On top of that, upcoming  KWin 4.7 has support for the ES profile and (imho) it would be a /very/ good idea of the VB team to support at least that.

Please run kwin from konsole as "kwin --replace&" and check/post the output to see why compositing support is denied or attach a crashtrace.

-Thomas, same day :-P
Comment 2 Technologov 2011-03-28 13:41:02 UTC
Created attachment 58393 [details]
Output of "kwin --replace" command, from openSUSE 11.4 guest.
Comment 3 Technologov 2011-03-28 13:41:39 UTC
Created attachment 58394 [details]
Output of "glxinfo" command, from openSUSE 11.4 guest.
Comment 4 Technologov 2011-03-28 13:47:36 UTC
Kwin says it renders to "Mesa Software Rasterizer", but glxinfo claims "OpenGL 2.1 Chromium 1.9"... go figure...

Chromium is the OpenGL layer of VirtualBox.

----

I know that 3D acceleration is enabled now, because Euphoria 3D screensaver renders quickly now. If I disable 3D acceleration in VirtualBox, it renders slowly.

-Technologov
Comment 5 Martin Flöser 2011-03-28 16:33:39 UTC
Last time I tried KWin in VirtualBox it reported software rasterizer in indirect rendering and chromium in direct rendering. As KWin defaults to indirect rendering for unknown drivers the difference in log output is to be expected and correct.

When enforcing direct rendering the screen becomes black - texture from pixmap is clearly failing. Why it works in Compiz: no idea. I assume that they implemented just enough in their driver so that Compiz works.

In Virtualbox KWin automatically falls back to XRender and given that this has to be fixed by Oracle and the advantage of having Opengl compositing in virtualbox, I don't think we should do anything about it.
Comment 6 Technologov 2011-03-28 16:48:26 UTC
Is it possible to use "Chromium" in indirect rendering ? Or inderect always means Software Rasterizer ?
Comment 7 Martin Flöser 2011-03-28 17:25:38 UTC
> Is it possible to use "Chromium" in indirect rendering ? Or inderect always
> means Software Rasterizer ?
Indirect means for Chromium Software Rasterizer which makes it useless
Comment 8 Martin Flöser 2012-03-13 21:53:30 UTC
Let's hope that Oracle adds it. We cannot add the missing pieces to the drivers.
Comment 9 Martin Flöser 2012-10-22 18:06:23 UTC
It seems to work nowadays, see: https://git.reviewboard.kde.org/r/106821/