Bug 371912

Summary: compositing disabled on nvidia drivers
Product: [Plasma] kwin Reporter: adarmalik
Component: scene-openglAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: iamgrief
Priority: NOR    
Version First Reported In: 5.8.2   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: glxinfo output
kwinrc

Description adarmalik 2016-10-31 20:34:37 UTC
Compositing stopped working lately. Not sure if it was after upgrading the nvidia proprietary drivers or kwin.
I am on openSuse leap 42.1 with the KF5 repos enabled. It seems the driver is not recognized.

qdbus org.kde.KWin /Compositor org.kde.kwin.Compositing.resume             
OpenGL vendor string:
OpenGL renderer string:
OpenGL version string:
OpenGL shading language version string: 
Driver:                                 Unknown
Driver version:                         0.0
GPU class:                              Unknown
OpenGL version:                         0.0
GLSL version:                           0.0
X server version:                       1.17.2
Linux kernel version:                   4.1.34
Requires strict binding:                yes
GLSL shaders:                           yes
Texture NPOT support:                   no
Virtual Machine:                        no
kwin_core: Failed to initialize compositing, compositing disabled


glxinfo seems to know about the driver

name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
Comment 1 Martin Flöser 2016-10-31 22:01:45 UTC
Can you please attach the full output of glxinfo
Comment 2 adarmalik 2016-11-02 06:45:27 UTC
Created attachment 101953 [details]
glxinfo output
Comment 3 Martin Flöser 2016-11-02 08:17:00 UTC
very weird. For whatever reason we fail to read things like glGetString. But the reading of the extensions seems to work. E.g. GLSL shaders is detected. Which would indicate that some gl calls work.

I think I have seen something like that before. Could it be that you try to use EGL instead of GLX? Could you please attach your ~/.config/kwinrc?
Comment 4 adarmalik 2016-11-02 19:30:23 UTC
Created attachment 101981 [details]
kwinrc
Comment 5 adarmalik 2016-11-02 19:31:20 UTC
hmm, kwinrc has the line
GLPlatformInterface=egl

that looks wrong
Comment 6 adarmalik 2016-11-02 19:38:12 UTC
I removed that line and it started working again.
Martin, you are the man! :) Thanks a LOT
Comment 7 Martin Flöser 2016-11-03 06:18:46 UTC
Great. I mark as upstream as it's a problem of NVIDIA+EGL
Comment 8 Grief 2017-05-04 16:08:59 UTC
Thanks for the solution. Can confirm that during one of the upgrades this string (GLPlatformInterface=egl) appeared in ~/.config/kwinrc for some reason. After removal of that line, openGL composing is back to work!