Bug 323134

Summary: Kwin is not able to run on secondary graphic card on optimus laptop
Product: [Plasma] kwin Reporter: dgdanielf
Component: compositingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: kde.org, raul_kde_bugzilla
Priority: NOR    
Version: 4.10.97   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description dgdanielf 2013-08-03 12:59:58 UTC
The try to run kwin on the faster graphic cards fails in KDE 4.10.97. Everything else (Games, CUDA) works fine with the secondary card.

> DISPLAY=:0 optirun kwin --replace 
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
kwin(6419): Could not find a framebuffer configuration for depth 32. 
kwin(6419) KWin::OpenGLBackend::setFailed: Creating the OpenGL rendering failed:  "Could not initialize the drawable configs" 
QObject::connect: Cannot connect (null)::resetCompositing() to KWin::Compositor::restart()
kwin(6419): Failed to initialize compositing, compositing disabled 
kwin(6419): Consult http://techbase.kde.org/Projects/KWin/4.0-release-notes#Setting_up 

> optirun glxinfo2 | grep OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GT 640M/PCIe/SSE2
OpenGL version string: 4.3.0 NVIDIA 319.32
OpenGL shading language version string: 4.30 NVIDIA via Cg compiler
OpenGL extensions:



Reproducible: Always

Steps to Reproduce:
1. Run Kwin with Optirun
2.
3.
Comment 1 Thomas Lübking 2013-08-03 13:53:53 UTC
> kwin(6419): Could not find a framebuffer configuration for depth 32. 

Please attach the complete "optirun glxinfo/2" output.
Given the comments on DRI_PRIME it seems other things (games) actually require a compositor on the IGP to work.
Comment 2 dgdanielf 2013-08-03 16:57:46 UTC
glxinfo2 looks ok for me: http://pastie.org/8203250
Comment 3 Thomas Lübking 2013-08-03 17:14:27 UTC
Is that all?
There's no GLXFBConfigs at all in that output.

The test however fails because the only 32bit drawable
0x63 32 tc  0 32  0 r  y  .  8  8  8  0  4 24  0 16 16 16 16  0 0 None

has a zero alpha component what leads to incorrect ARGB window painting (see commit 21affaa38d61fb4bebaa4f16c1cbb83fdd353536)

If you can compile kwin, edit kwin/glxbackend.cpp ~line 328 and comment

//            if (depth == 32 && alpha_size != 8)
//                continue;

To watch for the impact - it might have different implications on optimus setups.

However i assume the init will just fail on the next test (since there're no framebuffers)
Comment 4 dgdanielf 2013-08-03 21:19:35 UTC
That's all. 
I will look at the code tomorrow and give a feedback. Is it in kde-worspaces?
Comment 5 Thomas Lübking 2013-08-03 21:25:20 UTC
(In reply to comment #4)
> Is it in kde-worspaces?

Yupp.

You should encounter visual trouble with some plasma-desktop popups, konsole or general ARGB windows provided by the style Oxygen-transparent, QtCurve or Bespin.
Comment 6 dgdanielf 2013-08-04 15:43:24 UTC
I seem to be not the only one with problems to start kwin with optirun. But I'm not sure why. 
I additionally commented out:
//     if (fbcdrawableinfo[32].fbconfig == NULL) {
//         kError(1212) << "Could not find a framebuffer configuration for depth 32.";
//         return false;
//    } 

Then: dgrat@linux-whx3:~> DISPLAY=:0 optirun kwin --replace
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
OpenGL vendor string:                   NVIDIA Corporation
OpenGL renderer string:                 GeForce GT 640M/PCIe/SSE2
OpenGL version string:                  2.1.2 NVIDIA 319.32
OpenGL shading language version string: 1.20 NVIDIA via Cg compiler
Driver:                                 NVIDIA
Driver version:                         319.32
GPU class:                              Unknown
OpenGL version:                         2.1.2
GLSL version:                           1.20
X server version:                       1.13.2
Linux kernel version:                   3.7.10
Direct rendering:                       yes
Requires strict binding:                no
GLSL shaders:                           yes
Texture NPOT support:                   yes
Virtual Machine:                        no
Application::crashHandler() called with signal 11; recent crashes: 1
KCrash: Application 'kwin' crashing...
KCrash: Attempting to start /usr/lib64/kde4/libexec/drkonqi from kdeinit
sock_file=/home/dgrat/.kde4/socket-linux-whx3.site/kdeinit4__0
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
OpenGL vendor string:                   NVIDIA Corporation
OpenGL renderer string:                 GeForce GT 640M/PCIe/SSE2
OpenGL version string:                  2.1.2 NVIDIA 319.32
OpenGL shading language version string: 1.20 NVIDIA via Cg compiler
Driver:                                 NVIDIA
Driver version:                         319.32
GPU class:                              Unknown
OpenGL version:                         2.1.2
GLSL version:                           1.20
X server version:                       1.13.2
Linux kernel version:                   3.7.10
Direct rendering:                       yes                                                                                                                         
Requires strict binding:                no                                                                                                                          
GLSL shaders:                           yes                                                                                                                         
Texture NPOT support:                   yes                                                                                                                         
Virtual Machine:                        no                                                                                                                          
Application::crashHandler() called with signal 11; recent crashes: 2                                                                                                
KCrash: Application 'kwin' crashing...                                                                                                                              
KCrash: Attempting to start /usr/lib64/kde4/libexec/drkonqi from kdeinit                                                                                            
sock_file=/home/dgrat/.kde4/socket-linux-whx3.site/kdeinit4__0                                                                                                      
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
Comment 7 Thomas Lübking 2013-08-04 15:50:00 UTC
(In reply to comment #6)
Application::crashHandler() called with signal 11; recent crashes: 2                                                                                                
KCrash: Application 'kwin' crashing...                                                                                                                              
KCrash: Attempting to start /usr/lib64/kde4/libexec/drkonqi from kdeinit                                                                                            
sock_file=/home/dgrat/.kde4/socket-linux-whx3.site/kdeinit4__0          

-> backtrace?
Comment 8 dgdanielf 2013-08-05 07:27:54 UTC
I will try to get one..
Comment 9 dgdanielf 2013-08-05 16:53:50 UTC
Hope this is useful..
Settings:
- VBLANC off
- OpenGL 20
- Native

optirun kwin --replace:

Application: KWin (kwin), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fd4c2c9e7c0 (LWP 4803))]

Thread 3 (Thread 0x7fd4a47c9700 (LWP 4830)):
#0  0x00007fd4bc76ad11 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fd4bc9fd587 in wait (time=30000, this=0xd30c70) at thread/qwaitcondition_unix.cpp:84
#2  QWaitCondition::wait (this=<optimized out>, mutex=0xd30c18, time=30000) at thread/qwaitcondition_unix.cpp:158
#3  0x00007fd4bc9f0d8f in QThreadPoolThread::run (this=0xd23200) at concurrent/qthreadpool.cpp:141
#4  0x00007fd4bc9fd0cc in QThreadPrivate::start (arg=0xd23200) at thread/qthread_unix.cpp:338
#5  0x00007fd4bc766e0f in start_thread () from /lib64/libpthread.so.0
#6  0x00007fd4ba63c7dd in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fd4a3d97700 (LWP 4833)):
#0  0x00007fd4bc76ad11 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fd4bc9fd587 in wait (time=30000, this=0xd30c70) at thread/qwaitcondition_unix.cpp:84
#2  QWaitCondition::wait (this=<optimized out>, mutex=0xd30c18, time=30000) at thread/qwaitcondition_unix.cpp:158
#3  0x00007fd4bc9f0d8f in QThreadPoolThread::run (this=0xda7750) at concurrent/qthreadpool.cpp:141
#4  0x00007fd4bc9fd0cc in QThreadPrivate::start (arg=0xda7750) at thread/qthread_unix.cpp:338
#5  0x00007fd4bc766e0f in start_thread () from /lib64/libpthread.so.0
#6  0x00007fd4ba63c7dd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fd4c2c9e7c0 (LWP 4803)):
[KCrash Handler]
#6  0x0000000000000000 in ?? ()
#7  0x00007fd4c22f46bc in KWin::GlxTexture::loadTexture (this=0x1056ce0, pix=@0x7fff5ecc9a08: 33555772, size=..., depth=24) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/glxbackend.cpp:617
#8  0x00007fd4c22e9aa0 in KWin::OpenGLWindowPixmap::bind (this=0x105ade0) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene_opengl.cpp:1846
#9  0x00007fd4c22e9daf in KWin::SceneOpenGL::Window::beginRenderWindow (this=0xf5e790, mask=9, region=..., data=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene_opengl.cpp:1066
#10 0x00007fd4c22ea865 in KWin::SceneOpenGL2Window::performPaint (this=0xbec9c0, mask=2097155, region=..., data=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene_opengl.cpp:1386
#11 0x00007fd4c22e78b4 in KWin::SceneOpenGL2::performPaintWindow (this=<optimized out>, w=<optimized out>, mask=9, region=..., data=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene_opengl.cpp:750
#12 0x00007fd4c22e7a09 in KWin::SceneOpenGL2::finalDrawWindow (this=0x1060ee0, w=0xf53c20, mask=9, region=..., data=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene_opengl.cpp:736
#13 0x00007fd4c22fce09 in KWin::EffectsHandlerImpl::drawWindow (this=0x102bb40, w=0xf53c20, mask=9, region=..., data=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/effects.cpp:454
#14 0x00007fd4c22d55de in KWin::Scene::finalPaintWindow (this=<optimized out>, w=0xf53c20, mask=9, region=..., data=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene.cpp:546
#15 0x00007fd4c22fec1a in KWin::EffectsHandlerImpl::paintWindow (this=0x102bb40, w=0xf53c20, mask=9, region=..., data=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/effects.cpp:417
#16 0x00007fd4c22d7edc in KWin::Scene::paintWindow (this=0x1060ee0, w=0xf5e790, mask=9, region=..., quads=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene.cpp:378
#17 0x00007fd4c22d986d in KWin::Scene::paintSimpleScreen (this=0x1060ee0, orig_mask=<optimized out>, region=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene.cpp:355
#18 0x00007fd4c22d68c8 in KWin::Scene::finalPaintScreen (this=0x1060ee0, mask=8, region=..., data=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene.cpp:184
#19 0x00007fd4c22fed00 in KWin::EffectsHandlerImpl::paintScreen (this=0x102bb40, mask=8, region=..., data=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/effects.cpp:374
#20 0x00007fd4c22d7bb2 in KWin::Scene::paintScreen (this=0x1060ee0, mask=0x7fff5ecca98c, region=0x7fff5eccaaa0) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene.cpp:141
#21 0x00007fd4c22eed13 in KWin::SceneOpenGL::paint (this=0x1060ee0, damage=..., toplevels=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene_opengl.cpp:360
#22 0x00007fd4c22cfd42 in KWin::Compositor::performCompositing (this=0xd78710) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/composite.cpp:617
#23 0x00007fd4c22d0ee7 in KWin::Compositor::slotCompositingOptionsInitialized (this=0xd78710) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/composite.cpp:273
#24 0x00007fd4bcb0e29f in QMetaObject::activate (sender=0xdaa2d0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3548
#25 0x00007fd4bc9edcc7 in QFutureWatcherBase::event (this=<optimized out>, event=0x7fd4940008c0) at concurrent/qfuturewatcher.cpp:344
#26 0x00007fd4bbc8586c in QApplicationPrivate::notify_helper (this=this@entry=0xbbe8f0, receiver=receiver@entry=0xdaa2d0, e=e@entry=0x7fd4940008c0) at kernel/qapplication.cpp:4562
#27 0x00007fd4bbc89ceb in QApplication::notify (this=0x7fff5eccb860, receiver=0xdaa2d0, e=0x7fd4940008c0) at kernel/qapplication.cpp:4423
#28 0x00007fd4bd7d9f76 in KApplication::notify (this=0x7fff5eccb860, receiver=0xdaa2d0, event=0x7fd4940008c0) at /usr/src/debug/kdelibs-4.10.97/kdeui/kernel/kapplication.cpp:311
#29 0x00007fd4bcaf8d8e in QCoreApplication::notifyInternal (this=0x7fff5eccb860, receiver=receiver@entry=0xdaa2d0, event=event@entry=0x7fd4940008c0) at kernel/qcoreapplication.cpp:946
#30 0x00007fd4bcafc6f1 in sendEvent (event=0x7fd4940008c0, receiver=0xdaa2d0) at kernel/qcoreapplication.h:231
#31 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0xb1a1f0) at kernel/qcoreapplication.cpp:1570
#32 0x00007fd4bbd2689c in sendPostedEvents () at ../../src/corelib/kernel/qcoreapplication.h:236
#33 QEventDispatcherX11::processEvents (this=0xbbe0e0, flags=...) at kernel/qeventdispatcher_x11.cpp:75
#34 0x00007fd4bcaf7adf in QEventLoop::processEvents (this=this@entry=0x7fff5eccb7b0, flags=...) at kernel/qeventloop.cpp:149
#35 0x00007fd4bcaf7d68 in QEventLoop::exec (this=0x7fff5eccb7b0, flags=...) at kernel/qeventloop.cpp:204
#36 0x00007fd4bcafca08 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218
#37 0x00007fd4c2280d63 in kdemain (argc=3, argv=0x7fff5eccbf68) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/main.cpp:589
#38 0x00007fd4ba575a15 in __libc_start_main () from /lib64/libc.so.6
#39 0x0000000000400959 in _start () at ../sysdeps/x86_64/start.S:123
Comment 10 Thomas Lübking 2013-08-05 18:18:26 UTC
Are you stil on 4.10.95 or did you offset glxbackend.cpp otherwise
(new line along your commenting, #ifdefs etc.) or commented other code?

line 617 is >> checkGLError("TextureLoad0"); << what's pretty weird.
Also from your glxinfo i had assumed all framebuffers were NULL, what means you actually should not end up there at all.
Comment 11 dgdanielf 2013-08-05 19:48:27 UTC
Im at 97. there was just no option in the bugtracker to select it.
Comment 12 dgdanielf 2013-08-05 19:55:51 UTC
And I just commented out this:

(In reply to comment #6)
> I seem to be not the only one with problems to start kwin with optirun. But
> I'm not sure why. 
> I additionally commented out:
> //     if (fbcdrawableinfo[32].fbconfig == NULL) {
> //         kError(1212) << "Could not find a framebuffer configuration for
> depth 32.";
> //         return false;
> //    } 
> 
> Then: dgrat@linux-whx3:~> DISPLAY=:0 optirun kwin --replace
> QCoreApplication::sendPostedEvents: Cannot send posted events for objects in
> another thread
> QCoreApplication::sendPostedEvents: Cannot send posted events for objects in
> another thread
> QCoreApplication::sendPostedEvents: Cannot send posted events for objects in
> another thread
> QCoreApplication::sendPostedEvents: Cannot send posted events for objects in
> another thread
> OpenGL vendor string:                   NVIDIA Corporation
> OpenGL renderer string:                 GeForce GT 640M/PCIe/SSE2
> OpenGL version string:                  2.1.2 NVIDIA 319.32
> OpenGL shading language version string: 1.20 NVIDIA via Cg compiler
> Driver:                                 NVIDIA
> Driver version:                         319.32
> GPU class:                              Unknown
> OpenGL version:                         2.1.2
> GLSL version:                           1.20
> X server version:                       1.13.2
> Linux kernel version:                   3.7.10
> Direct rendering:                       yes
> Requires strict binding:                no
> GLSL shaders:                           yes
> Texture NPOT support:                   yes
> Virtual Machine:                        no
> Application::crashHandler() called with signal 11; recent crashes: 1
> KCrash: Application 'kwin' crashing...
> KCrash: Attempting to start /usr/lib64/kde4/libexec/drkonqi from kdeinit
> sock_file=/home/dgrat/.kde4/socket-linux-whx3.site/kdeinit4__0
> QCoreApplication::sendPostedEvents: Cannot send posted events for objects in
> another thread
> QCoreApplication::sendPostedEvents: Cannot send posted events for objects in
> another thread
> QCoreApplication::sendPostedEvents: Cannot send posted events for objects in
> another thread
> QCoreApplication::sendPostedEvents: Cannot send posted events for objects in
> another thread
> OpenGL vendor string:                   NVIDIA Corporation
> OpenGL renderer string:                 GeForce GT 640M/PCIe/SSE2
> OpenGL version string:                  2.1.2 NVIDIA 319.32
> OpenGL shading language version string: 1.20 NVIDIA via Cg compiler
> Driver:                                 NVIDIA
> Driver version:                         319.32
> GPU class:                              Unknown
> OpenGL version:                         2.1.2
> GLSL version:                           1.20
> X server version:                       1.13.2
> Linux kernel version:                   3.7.10
> Direct rendering:                       yes                                 
> 
> Requires strict binding:                no                                  
> 
> GLSL shaders:                           yes                                 
> 
> Texture NPOT support:                   yes                                 
> 
> Virtual Machine:                        no                                  
> 
> Application::crashHandler() called with signal 11; recent crashes: 2        
> 
> KCrash: Application 'kwin' crashing...                                      
> 
> KCrash: Attempting to start /usr/lib64/kde4/libexec/drkonqi from kdeinit    
> 
> sock_file=/home/dgrat/.kde4/socket-linux-whx3.site/kdeinit4__0              
> 
> QCoreApplication::sendPostedEvents: Cannot send posted events for objects in
> another thread
> QCoreApplication::sendPostedEvents: Cannot send posted events for objects in
> another thread
> QCoreApplication::sendPostedEvents: Cannot send posted events for objects in
> another thread
> QCoreApplication::sendPostedEvents: Cannot send posted events for objects in
> another thread
Comment 13 Thomas Lübking 2013-08-05 20:25:23 UTC
Thanks, nevermind - we just need to know where it's crashing.

So it's then
glXBindTexImageEXT(display(), m_glxpixmap, GLX_FRONT_LEFT_EXT, NULL);

what implies that
m_glxpixmap = glXCreatePixmap(display(), m_backend->fbcdrawableinfo[ depth ].fbconfig, pix, attrs);

created a junk pixmap, what makes much more sense since glxinfo reported that you don't have this:
m_backend->fbcdrawableinfo[ depth ].fbconfig

- for no depth.

Google thinks GLXFBConfigs is broken due to wrong LD_LIBRARY_PATH

It's just a wild guess, but you could strace kwin and check the proper libGL is actually loaded:

       strace kwin 2>&1 | grep libGL
Comment 14 dgdanielf 2013-08-05 21:21:08 UTC
For my intel setup:
linux-whx3:/home/dgrat # strace kwin 2>&1 | grep libGL
open("/usr/lib64/mpi/gcc/openmpi/lib64/libGL.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libGL.so.1", O_RDONLY|O_CLOEXEC) = 3

With optirun:
linux-whx3:/home/dgrat # strace optirun kwin 2>&1 | grep libGL
NOTHNG
Comment 15 Thomas Lübking 2013-08-05 21:27:13 UTC
(In reply to comment #14)

> With optirun:
> linux-whx3:/home/dgrat # strace optirun kwin 2>&1 | grep libGL
> NOTHNG

"optirun strace kwin 2>&1 | grep libGL"

In doubt check that "optirun strace kwin" prints anything (strace prints alot ;-)
Comment 16 dgdanielf 2013-08-05 21:28:08 UTC
I believe that kwin is crashing before libGL is loaded. I don't think it is because of my setup. libGL is probably also loaded when I play i.e. Dota 2 or other OpenGL stuff and these examples do work atm with optirun well.
Comment 17 dgdanielf 2013-08-05 21:30:43 UTC
linux-whx3:/home/dgrat # strace optirun kwin 2>&1
execve("/usr/bin/optirun", ["optirun", "kwin"], [/* 75 vars */]) = 0
brk(0)                                  = 0x22e5000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f809c98f000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/tls/x86_64/libglib-2.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/mpi/gcc/openmpi/lib64/tls/x86_64", 0x7fff89c41b40) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/tls/libglib-2.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/mpi/gcc/openmpi/lib64/tls", 0x7fff89c41b40) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/x86_64/libglib-2.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/mpi/gcc/openmpi/lib64/x86_64", 0x7fff89c41b40) = -1 ENOENT (No such file or directory)
open("/usr/lib64/mpi/gcc/openmpi/lib64/libglib-2.0.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib64/mpi/gcc/openmpi/lib64", {st_mode=S_IFDIR|0755, st_size=1854, ...}) = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=152004, ...}) = 0
mmap(NULL, 152004, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f809c969000
close(3)                                = 0
open("/usr/lib64/libglib-2.0.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\313\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1017016, ...}) = 0
mmap(NULL, 3114176, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f809c476000
mprotect(0x7f809c56d000, 2093056, PROT_NONE) = 0
mmap(0x7f809c76c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf6000) = 0x7f809c76c000
mmap(0x7f809c76e000, 1216, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f809c76e000
close(3)                                = 0
open("/usr/lib64/mpi/gcc/openmpi/lib64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000#\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=42706, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f809c968000
mmap(NULL, 2128888, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f809c26e000
mprotect(0x7f809c275000, 2093056, PROT_NONE) = 0
mmap(0x7f809c474000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f809c474000
close(3)                                = 0
open("/usr/lib64/mpi/gcc/openmpi/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \33\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1992089, ...}) = 0
mmap(NULL, 3853472, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f809bec1000
mprotect(0x7f809c064000, 2097152, PROT_NONE) = 0
mmap(0x7f809c264000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a3000) = 0x7f809c264000
mmap(0x7f809c26a000, 15520, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f809c26a000
close(3)                                = 0
open("/usr/lib64/mpi/gcc/openmpi/lib64/libpcre.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib64/libpcre.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\30\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=379280, ...}) = 0
mmap(NULL, 2474472, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f809bc64000
mprotect(0x7f809bcbf000, 2097152, PROT_NONE) = 0
mmap(0x7f809bebf000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5b000) = 0x7f809bebf000
close(3)                                = 0
open("/usr/lib64/mpi/gcc/openmpi/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@l\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=131133, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f809c967000
mmap(NULL, 2208688, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f809ba48000
mprotect(0x7f809ba5f000, 2093056, PROT_NONE) = 0
mmap(0x7f809bc5e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16000) = 0x7f809bc5e000
mmap(0x7f809bc60000, 13232, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f809bc60000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f809ba47000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f809ba46000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f809ba45000
arch_prctl(ARCH_SET_FS, 0x7f809ba46700) = 0
mprotect(0x7f809c264000, 16384, PROT_READ) = 0
mprotect(0x7f809bc5e000, 4096, PROT_READ) = 0
mprotect(0x7f809bebf000, 4096, PROT_READ) = 0
mprotect(0x7f809c474000, 4096, PROT_READ) = 0
mprotect(0x7f809c76c000, 4096, PROT_READ) = 0
mprotect(0x608000, 4096, PROT_READ)     = 0
mprotect(0x7f809c990000, 4096, PROT_READ) = 0
munmap(0x7f809c969000, 152004)          = 0
set_tid_address(0x7f809ba469d0)         = 3204
set_robust_list(0x7f809ba469e0, 24)     = 0
rt_sigaction(SIGRTMIN, {0x7f809ba4e7a0, [], SA_RESTORER|SA_SIGINFO, 0x7f809ba571f0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7f809ba4e820, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f809ba571f0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
brk(0)                                  = 0x22e5000
brk(0x2306000)                          = 0x2306000
rt_sigaction(SIGHUP, {0x4051f0, [HUP], SA_RESTORER|SA_RESTART, 0x7f809bef6450}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {0x4051f0, [TERM], SA_RESTORER|SA_RESTART, 0x7f809bef6450}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x4051f0, [INT], SA_RESTORER|SA_RESTART, 0x7f809bef6450}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {0x4051f0, [QUIT], SA_RESTORER|SA_RESTART, 0x7f809bef6450}, {SIG_DFL, [], 0}, 8) = 0
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2444, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f809c98e000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2444
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x7f809c98e000, 4096)            = 0
open("/etc/bumblebee/bumblebee.conf", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2896, ...}) = 0
read(3, "# Configuration file for Bumbleb"..., 4096) = 2896
read(3, "", 4096)                       = 0
close(3)                                = 0
socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC, 0) = 3
connect(3, {sa_family=AF_FILE, sun_path="/var/run/bumblebee.socket"}, 110) = 0
sendto(3, "Query LibraryPath\0", 18, MSG_NOSIGNAL, NULL, 0) = 18
recvfrom(3, "Value: /usr/lib64/nvidia:/usr/li"..., 1024, 0, NULL, NULL) = 42
sendto(3, "Query VirtualDisplay\0", 21, MSG_NOSIGNAL, NULL, 0) = 21
recvfrom(3, "Value: :8\n\0", 1024, 0, NULL, NULL) = 11
access("/root/usr/lib64/nvidia/vglrun", X_OK) = -1 ENOENT (No such file or directory)
access("/usr/lib64/mpi/gcc/openmpi/bin/vglrun", X_OK) = -1 ENOENT (No such file or directory)
access("/sbin/vglrun", X_OK)            = -1 ENOENT (No such file or directory)
access("/usr/sbin/vglrun", X_OK)        = -1 ENOENT (No such file or directory)
access("/usr/local/sbin/vglrun", X_OK)  = -1 ENOENT (No such file or directory)
access("/root/bin/vglrun", X_OK)        = -1 ENOENT (No such file or directory)
access("/usr/local/bin/vglrun", X_OK)   = -1 ENOENT (No such file or directory)
access("/usr/bin/vglrun", X_OK)         = 0
access("/root/usr/lib64/nvidia/vglclient", X_OK) = -1 ENOENT (No such file or directory)
access("/usr/lib64/mpi/gcc/openmpi/bin/vglclient", X_OK) = -1 ENOENT (No such file or directory)
access("/sbin/vglclient", X_OK)         = -1 ENOENT (No such file or directory)
access("/usr/sbin/vglclient", X_OK)     = -1 ENOENT (No such file or directory)
access("/usr/local/sbin/vglclient", X_OK) = -1 ENOENT (No such file or directory)
access("/root/bin/vglclient", X_OK)     = -1 ENOENT (No such file or directory)
access("/usr/local/bin/vglclient", X_OK) = -1 ENOENT (No such file or directory)
access("/usr/bin/vglclient", X_OK)      = 0
sendto(3, "Connect \0", 9, MSG_NOSIGNAL, NULL, 0) = 9
recvfrom(3, "Yes. X is active.\n\0", 1024, 0, NULL, NULL) = 19
rt_sigaction(SIGCHLD, {0x403ae0, [], SA_RESTORER, 0x7f809bef6450}, NULL, 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f809ba469d0) = 3208
wait4(3208, X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 20 (X_GetProperty)
  Resource id:  0x260014f
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
OpenGL vendor string:                   NVIDIA Corporation
OpenGL renderer string:                 GeForce GT 640M/PCIe/SSE2
OpenGL version string:                  2.1.2 NVIDIA 319.32
OpenGL shading language version string: 1.20 NVIDIA via Cg compiler
Driver:                                 NVIDIA
Driver version:                         319.32
GPU class:                              Unknown
OpenGL version:                         2.1.2
GLSL version:                           1.20
X server version:                       1.13.2
Linux kernel version:                   3.7.10
Direct rendering:                       yes
Requires strict binding:                no
GLSL shaders:                           yes
Texture NPOT support:                   yes
Virtual Machine:                        no
Application::crashHandler() called with signal 11; recent crashes: 1
KCrash: Application 'kwin' crashing...
KCrash: Attempting to start /usr/lib64/kde4/libexec/drkonqi from kdeinit
sock_file=/root/.kde4/socket-linux-whx3.site/kdeinit4__1
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 20 (X_GetProperty)
  Resource id:  0x260014f
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
QCoreApplication::sendPostedEvents: Cannot send posted events for objects in another thread
OpenGL vendor string:                   NVIDIA Corporation
OpenGL renderer string:                 GeForce GT 640M/PCIe/SSE2
OpenGL version string:                  2.1.2 NVIDIA 319.32
OpenGL shading language version string: 1.20 NVIDIA via Cg compiler
Driver:                                 NVIDIA
Driver version:                         319.32
GPU class:                              Unknown
OpenGL version:                         2.1.2
GLSL version:                           1.20
X server version:                       1.13.2
Linux kernel version:                   3.7.10
Direct rendering:                       yes
Requires strict binding:                no
GLSL shaders:                           yes
Texture NPOT support:                   yes
Virtual Machine:                        no
0x7fff89c41ebc, 0, NULL)    = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---
wait4(3208, Application::crashHandler() called with signal 11; recent crashes: 2
[{WIFEXITED(s) && WEXITSTATUS(s) == 253}], 0, NULL) = 3208
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=3208, si_status=253, si_utime=24, si_stime=10} ---
wait4(-1, 0x7fff89c418ec, 0, NULL)      = -1 ECHILD (No child processes)
rt_sigreturn()                          = 3208
shutdown(3, SHUT_RDWR)                  = 0
close(3)                                = 0
exit_group(253)                         = ?
+++ exited with 253 +++
linux-whx3:/home/dgrat # KCrash: Application 'kwin' crashing...
KCrash: Attempting to start /usr/lib64/kde4/libexec/drkonqi from kdeinit
sock_file=/root/.kde4/socket-linux-whx3.site/kdeinit4__1
[VGL] ERROR: Could not open display :8.
^C
Comment 18 Thomas Lübking 2013-08-05 21:34:42 UTC
(In reply to comment #17)
> linux-whx3:/home/dgrat # strace optirun kwin 2>&1
> execve("/usr/bin/optirun", ["optirun", "kwin"], [/* 75 vars */]) = 0
> brk(0)                                  = 0x22e5000

You're still stracing "optirun", not kwin.
You've to "optirun" the "strace kwin" call.

If kwin "crashed" before the (linked) libGL was loaded, the linker would tell you and there was neither kwin output nor a backtrace. The process would never start.
Comment 19 dgdanielf 2013-08-06 06:37:16 UTC
linux-whx3:/home/dgrat # optirun strace kwin 2>&1 | grep libGL
open("/usr/lib64/nvidia/libGL.so.1", O_RDONLY|O_CLOEXEC) = 3

and 

Application: KWin (kwin), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fba8d6587c0 (LWP 2120))]

Thread 3 (Thread 0x7fba6f183700 (LWP 2124)):
#0  0x00007fba87124d11 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fba873b7587 in wait (time=30000, this=0xd1e770) at thread/qwaitcondition_unix.cpp:84
#2  QWaitCondition::wait (this=<optimized out>, mutex=0xd1e718, time=30000) at thread/qwaitcondition_unix.cpp:158
#3  0x00007fba873aad8f in QThreadPoolThread::run (this=0xd089e0) at concurrent/qthreadpool.cpp:141
#4  0x00007fba873b70cc in QThreadPrivate::start (arg=0xd089e0) at thread/qthread_unix.cpp:338
#5  0x00007fba87120e0f in start_thread () from /lib64/libpthread.so.0
#6  0x00007fba84ff67dd in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fba6e751700 (LWP 2150)):
#0  0x00007fba87124d11 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fba873b7587 in wait (time=30000, this=0xd1e770) at thread/qwaitcondition_unix.cpp:84
#2  QWaitCondition::wait (this=<optimized out>, mutex=0xd1e718, time=30000) at thread/qwaitcondition_unix.cpp:158
#3  0x00007fba873aad8f in QThreadPoolThread::run (this=0xd6cd00) at concurrent/qthreadpool.cpp:141
#4  0x00007fba873b70cc in QThreadPrivate::start (arg=0xd6cd00) at thread/qthread_unix.cpp:338
#5  0x00007fba87120e0f in start_thread () from /lib64/libpthread.so.0
#6  0x00007fba84ff67dd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fba8d6587c0 (LWP 2120)):
[KCrash Handler]
#6  0x0000000000000000 in ?? ()
#7  0x00007fba8ccae6bc in KWin::GlxTexture::loadTexture (this=0xe85340, pix=@0x7fff91fa6968: 23069643, size=..., depth=24) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/glxbackend.cpp:617
#8  0x00007fba8cca3aa0 in KWin::OpenGLWindowPixmap::bind (this=0xf07720) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene_opengl.cpp:1846
#9  0x00007fba8cca3daf in KWin::SceneOpenGL::Window::beginRenderWindow (this=0xd75160, mask=9, region=..., data=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene_opengl.cpp:1066
#10 0x00007fba8cca4865 in KWin::SceneOpenGL2Window::performPaint (this=0xbd40c0, mask=2097155, region=..., data=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene_opengl.cpp:1386
#11 0x00007fba8cca18b4 in KWin::SceneOpenGL2::performPaintWindow (this=<optimized out>, w=<optimized out>, mask=9, region=..., data=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene_opengl.cpp:750
#12 0x00007fba8cca1a09 in KWin::SceneOpenGL2::finalDrawWindow (this=0xea1e60, w=0xdaccb0, mask=9, region=..., data=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene_opengl.cpp:736
#13 0x00007fba8ccb6e09 in KWin::EffectsHandlerImpl::drawWindow (this=0xd82610, w=0xdaccb0, mask=9, region=..., data=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/effects.cpp:454
#14 0x00007fba8cc8f5de in KWin::Scene::finalPaintWindow (this=<optimized out>, w=0xdaccb0, mask=9, region=..., data=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene.cpp:546
#15 0x00007fba8ccb8c1a in KWin::EffectsHandlerImpl::paintWindow (this=0xd82610, w=0xdaccb0, mask=9, region=..., data=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/effects.cpp:417
#16 0x00007fba8cc91edc in KWin::Scene::paintWindow (this=0xea1e60, w=0xd75160, mask=9, region=..., quads=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene.cpp:378
#17 0x00007fba8cc9386d in KWin::Scene::paintSimpleScreen (this=0xea1e60, orig_mask=<optimized out>, region=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene.cpp:355
#18 0x00007fba8cc908c8 in KWin::Scene::finalPaintScreen (this=0xea1e60, mask=8, region=..., data=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene.cpp:184
#19 0x00007fba8ccb8d00 in KWin::EffectsHandlerImpl::paintScreen (this=0xd82610, mask=8, region=..., data=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/effects.cpp:374
#20 0x00007fba8cc91bb2 in KWin::Scene::paintScreen (this=0xea1e60, mask=0x7fff91fa78ec, region=0x7fff91fa7a00) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene.cpp:141
#21 0x00007fba8cca8d13 in KWin::SceneOpenGL::paint (this=0xea1e60, damage=..., toplevels=...) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/scene_opengl.cpp:360
#22 0x00007fba8cc89d42 in KWin::Compositor::performCompositing (this=0xd62ea0) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/composite.cpp:617
#23 0x00007fba8cc8aee7 in KWin::Compositor::slotCompositingOptionsInitialized (this=0xd62ea0) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/composite.cpp:273
#24 0x00007fba874c829f in QMetaObject::activate (sender=0xcee010, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3548
#25 0x00007fba873a7cc7 in QFutureWatcherBase::event (this=<optimized out>, event=0x7fba600008c0) at concurrent/qfuturewatcher.cpp:344
#26 0x00007fba8663f86c in QApplicationPrivate::notify_helper (this=this@entry=0xba5fe0, receiver=receiver@entry=0xcee010, e=e@entry=0x7fba600008c0) at kernel/qapplication.cpp:4562
#27 0x00007fba86643ceb in QApplication::notify (this=0x7fff91fa87c0, receiver=0xcee010, e=0x7fba600008c0) at kernel/qapplication.cpp:4423
#28 0x00007fba88193f76 in KApplication::notify (this=0x7fff91fa87c0, receiver=0xcee010, event=0x7fba600008c0) at /usr/src/debug/kdelibs-4.10.97/kdeui/kernel/kapplication.cpp:311
#29 0x00007fba874b2d8e in QCoreApplication::notifyInternal (this=0x7fff91fa87c0, receiver=receiver@entry=0xcee010, event=event@entry=0x7fba600008c0) at kernel/qcoreapplication.cpp:946
#30 0x00007fba874b66f1 in sendEvent (event=0x7fba600008c0, receiver=0xcee010) at kernel/qcoreapplication.h:231
#31 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0xb001f0) at kernel/qcoreapplication.cpp:1570
#32 0x00007fba866e089c in sendPostedEvents () at ../../src/corelib/kernel/qcoreapplication.h:236
#33 QEventDispatcherX11::processEvents (this=0xba57d0, flags=...) at kernel/qeventdispatcher_x11.cpp:75
#34 0x00007fba874b1adf in QEventLoop::processEvents (this=this@entry=0x7fff91fa8710, flags=...) at kernel/qeventloop.cpp:149
#35 0x00007fba874b1d68 in QEventLoop::exec (this=0x7fff91fa8710, flags=...) at kernel/qeventloop.cpp:204
#36 0x00007fba874b6a08 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1218
#37 0x00007fba8cc3ad63 in kdemain (argc=3, argv=0x7fff91fa8ec8) at /usr/src/packages/BUILD/kde-workspace-4.10.97/kwin/main.cpp:589
#38 0x00007fba84f2fa15 in __libc_start_main () from /lib64/libc.so.6
#39 0x0000000000400959 in _start () at ../sysdeps/x86_64/start.S:123
Comment 20 Thomas Lübking 2013-08-15 02:21:08 UTC
Can you optirun compiz or compton?
Comment 21 Raul Kde Bugzilla 2013-11-20 19:06:05 UTC
I have pretty much the same problem.

Kunbutu 13.10

Let me know if I can provide more info.

I can run pretty much anything with bumblebee, even vmware with 3d.

-rsd
Comment 22 dgdanielf 2013-11-20 19:28:31 UTC
I think basically everyone with Optimus has these problems ):
On the other hand it's probably very hard for the developers here, because it's is partly X11, partly nvidia blob and partly KWin which have to interact with each other. 
And I don't know much about OpenGl programming :(
Comment 23 Thomas Lübking 2013-11-20 20:20:51 UTC
This just popped up on forum.kde.org: apparently (and the provided glxinfo supports this) GLX_*_texture_from_pixmap is not supported by the optimus setup (check "glxinfo | grep -i texture") what means that OpenGL compositors lack their most important function :(

If there's no intention to add support for this from nvidia/bumblebee/mesa/whatever we'd have to re-introduce shm conversion =(
Comment 24 Martin Flöser 2013-11-21 08:02:39 UTC
> This just popped up on forum.kde.org: apparently (and the provided glxinfo
> supports this) GLX_*_texture_from_pixmap is not supported by the optimus
> setup (check "glxinfo | grep -i texture") what means that OpenGL
> compositors lack their most important function :(
ouch. In which direction is the problem?
a) only running on NVIDIA
b) only running on other chip (which would be mesa)
c) on both

If the problem is in case b I would suggest to give a try to the egl backend. 
It won't work in the a case as NVIDIA doesn't have a production-ready egl 
implementation.
> 
> If there's no intention to add support for this from
> nvidia/bumblebee/mesa/whatever we'd have to re-introduce shm conversion =(
I do hope we don't have to do that, but at least code exists in the eglwayland 
backend (due to the egl/wayland context not providing khronos_pixmap 
extension).

Anyway I won't accept such code for 4.11 branch. Let's see how it looks like 
in April and then decide whether we add it for 5.0.
Comment 25 Thomas Lübking 2013-11-21 11:49:42 UTC
(In reply to comment #24)

> ouch. In which direction is the problem?
> a) only running on NVIDIA
> b) only running on other chip (which would be mesa)
> c) on both

d) optimus/bumblebee
See http://forum.kde.org/viewtopic.php?f=111&t=118426
Selecting one chip is no problem, but bumblebee only announces GLX_EXT_texture_from_pixmap as server extension and "virtualgl bridge" doesn't announce it at all.

--
 
This will likely cause protest, but i consider this a rather academic problem anyway.

Point of the optimus setup is to save battery (and the environment ;-) by deactivating the nvidia chip in general but having it available when needed (CUDA/Egoshooter)

If you want to run the compositor on that chip, this means it's activated all the time and you're gonna save battery by disabling the intel chip and using the nvidia chip exclusively (or use the intel chip for a second head or whatever)

It would certainly be nice to be able to "just test how it behaves on the other GPU", but i don't see where this would be a crucial feature for regular use.
Comment 26 dgdanielf 2014-01-07 17:41:06 UTC
Well, I think bumblebee will die sooner or later anyway. Maybe the driver support of the nvidia blob for optimus laptops becomes useable in some time. But would it work then?
Comment 27 Andrew Crouthamel 2018-11-11 04:27:03 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 28 Andrew Crouthamel 2018-11-21 04:46:14 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!
Comment 29 kde.org 2021-11-07 10:29:02 UTC
This issue report is quite old. Can you please confirm, that it still persists with Plasma 5.23?
Comment 30 Bug Janitor Service 2021-11-22 04:38:41 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 31 Bug Janitor Service 2021-12-07 04:36:22 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!