Bug 147177 - kde4 kwin composite feature does work with Xgl on ATI proprietary driver
Summary: kde4 kwin composite feature does work with Xgl on ATI proprietary driver
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-24 22:13 UTC by anton
Modified: 2008-03-12 12:00 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Picture of icon problem in panel (47.15 KB, image/png)
2008-03-12 00:07 UTC, Adam Jimerson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description anton 2007-06-24 22:13:13 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux) default gcc on openSuSe 10.2
OS:                Linux

Hello,

I have ATI card x1900xt with proprietary ATI driver running on opensuse 10.2.

I have kde4 recent svn version (the lats one was dated June 22) compiled and running. I'm trying to run kwin with composite opengl extensions enabled above Xgl xserver. Compiz is running just fine with my configuration.

If I add UseTransluency=true option to kwinrc file, kwin crashes during startup = with this option =false works fine but without compositing.

I have navigated in source files, inserted some debug flag messages with "cout" and found the problem place. It is in scene_opengl.cpp file in the constructor:

SceneOpenGL::SceneOpenGL( Workspace* ws )
    : Scene( ws )
    , init_ok( false )
    {
.....
if( !initRenderingContext()) {
        return; // error
}
...
}

here initRenderingContext() method returns false and the constructor does go further.

Inside the initRenderingContext() method the problem is here:
bool SceneOpenGL::initRenderingContext() {
...

if( ctxbuffer == NULL || !glXMakeContextCurrent( display(), glxbuffer, glxbuffer, ctxbuffer )
        || errs.error( true ))
        {
...

}

the glXMakeContextCurrent(..) returns false here; all parameters - display(), glxbuffer and ctxbuffer - are not nulls here. Since this moment I can't analyze things anymore as it goes to the area of drivers and some inner opengl stuff I'm not rather familiar with.

The other important note here is that with the kde4 svn version about 2 month old I could run compositing effects with kwin on the same configuration with the same videocard driver. For that I just had to comment out one "assert false" row and the other row above with the "if' statement in the scene_opengl.cpp in the constructor which prevented it to run further. With this modified sources compiled I could see some effects in action. The current sources do not contain this rows.

I would be glad if kwin composite extensions could work with Xgl with proprietary ATI drivers, I can provide additional debug info, can apply patches and recompile the sources and test the things out - all that can be helpful to make it work.
Comment 1 Lubos Lunak 2007-06-25 15:01:19 UTC
Please join the kwin mailing list (https://mail.kde.org/mailman/listinfo/kwin) if you're interested in working on this. Providing your kwin debug output, glxinfo output and the changes you made in the 2-month-old version could help.
Comment 2 Lubos Lunak 2007-11-12 16:47:05 UTC
This should work.
Comment 3 Adam Jimerson 2008-03-12 00:02:59 UTC
I am having a related problem, I have a ATI Radeon xpress x1100 with the 8.45.x proprietary driver.  I have KDE 4.0.2 installed and when I enabled xgl KDE 4 became unstable and would crash the x server, when it happened I would be pushed back to tty1 and x11 would not be running.  It seemed to happen randomly, some times when I was using an effect, once opening kmenu, and once while trying to put together this message.  I did not get any kind of warning of the crash, and no backtrace, I'll be using my desktop then next thing I know I am looking at a text login.  I have also noticed that with composite enabled the icons in the panel menu looks weird, I managed to take and save a picture of this just before x crashed and I am attaching it.
Comment 4 Adam Jimerson 2008-03-12 00:07:19 UTC
Created attachment 23869 [details]
Picture of icon problem in panel

Almost forgot I am running openSUSE 10.3 kernel version 2.6.22.17-0.1-default
Comment 5 Lubos Lunak 2008-03-12 12:00:33 UTC
No, you don't have a related problem, just because it's about KWin and ATI in both cases. But you don't need to report a separate bugreport for this - if XGL crashes, it's a bug in XGL.