Bug 372145

Summary: Graphics reset during effect loading can result in endless loop
Product: [Plasma] kwin Reporter: kde
Component: scene-openglAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: kde
Priority: NOR Flags: mgraesslin: ReviewRequest+
Version First Reported In: 5.8.2   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
URL: https://phabricator.kde.org/D3288
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description kde 2016-11-06 16:04:29 UTC
Hi,

Since early days of plasma5 I am facing an issue with openGL compositor. Everything runs fine with Xrender, but as soon as I try to enable Opengl 2.0 compositor, the system becomes unresponsive. Here is the output of QT_LOGGING_RULES="*.debug=true" kwin_x11 --replace

kwin_core: Initializing OpenGL compositing
kwin_platform_x11_standalone: Choosing GLXFBConfig 0xf9 X visual 0x2f depth 24 RGBA 8:8:8:0 ZS 0:0
OpenGL vendor string:                   NVIDIA Corporation
OpenGL renderer string:                 GeForce 6500/PCIe/SSE2
OpenGL version string:                  2.1.2 NVIDIA 304.131
OpenGL shading language version string: 1.20 NVIDIA via Cg compiler
Driver:                                 NVIDIA
Driver version:                         304.131
GPU class:                              NV40/G70
OpenGL version:                         2.1.2
GLSL version:                           1.20
X server version:                       1.18.4
Linux kernel version:                   4.7
Requires strict binding:                no
GLSL shaders:                           limited
Texture NPOT support:                   yes
Virtual Machine:                        no
kwin_platform_x11_standalone: Direct rendering: true
kwin_core: Initializing fences for synchronization with the X command stream
kwin_core: Color correction: false
kwin_core: OpenGL 2 compositing successfully initialized
kwin_core: Vertical Refresh rate  60 Hz ( "primary screen" )
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-ParentApp" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-RemoteLocation" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KWin-Video-Url" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-PluginKeyword" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-ParentComponents" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KWin-Config-TranslationDomain" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-PluginKeyword" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-ParentComponents" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KWin-Config-TranslationDomain" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KWin-Video-Url" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KWin-Exclusive-Category" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-ParentApp" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-DefaultSize" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-RemoteLocation" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KWin-Video-Url" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kwin_platform_x11_standalone: Using FBConfig 0x170 for visual 0xb0
kwin_platform_x11_standalone: Using FBConfig 0xfd for visual 0x31
kwin_platform_x11_standalone: Using FBConfig 0xfd for visual 0x31
QXcbConnection: XCB error: 9 (BadDrawable), sequence: 2510, resource id: 0, major code: 14 (GetGeometry), minor code: 0
QXcbConnection: XCB error: 9 (BadDrawable), sequence: 2520, resource id: 0, major code: 14 (GetGeometry), minor code: 0
kwin_core: Successfully loaded built-in effect:  "blur"
kwin_core: A graphics reset attributable to the current GL context occurred.
kwin_core: Attempting to reset compositing.
kwin_core: Successfully loaded built-in effect:  "contrast"
org.kde.knotifications: Calling notify on "Popup"
kwin_core: Initializing OpenGL compositing
kwin_platform_x11_standalone: Choosing GLXFBConfig 0xf9 X visual 0x2f depth 24 RGBA 8:8:8:0 ZS 0:0
OpenGL vendor string:                   NVIDIA Corporation
OpenGL renderer string:                 GeForce 6500/PCIe/SSE2
OpenGL version string:                  2.1.2 NVIDIA 304.131
OpenGL shading language version string: 1.20 NVIDIA via Cg compiler
Driver:                                 NVIDIA
Driver version:                         304.131
GPU class:                              NV40/G70
OpenGL version:                         2.1.2
GLSL version:                           1.20
X server version:                       1.18.4
Linux kernel version:                   4.7
Requires strict binding:                no
GLSL shaders:                           limited
Texture NPOT support:                   yes
Virtual Machine:                        no
kwin_platform_x11_standalone: Direct rendering: true
kwin_core: Initializing fences for synchronization with the X command stream
kwin_core: Color correction: false
kwin_core: OpenGL 2 compositing successfully initialized
kwin_core: Vertical Refresh rate  60 Hz ( "primary screen" )
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-ParentApp" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-RemoteLocation" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KWin-Video-Url" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-PluginKeyword" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-ParentComponents" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KWin-Config-TranslationDomain" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-PluginKeyword" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-ParentComponents" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KWin-Config-TranslationDomain" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KWin-Video-Url" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KWin-Exclusive-Category" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-ParentApp" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-DefaultSize" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-RemoteLocation" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KWin-Video-Url" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kwin_platform_x11_standalone: Using FBConfig 0x170 for visual 0xb0
kwin_platform_x11_standalone: Using FBConfig 0xfd for visual 0x31
kwin_platform_x11_standalone: Using FBConfig 0xfd for visual 0x31
libkwinglutils: Invalid framebuffer status:  "GL_FRAMEBUFFER_UNSUPPORTED"
kwin_core: Successfully loaded built-in effect:  "blur"
kwin_core: User timestamp, ASN: 580934
kwin_core: User timestamp, final: 'ID: 35651625 ;WMCLASS: "plasmashell" : "plasmashell" ;Caption: "Plasma" ' : 580934
kwin_core: Activation, compared: 'ID: 35651625 ;WMCLASS: "plasmashell" : "plasmashell" ;Caption: "Plasma" ' : 580934 : 522044 : true
QXcbConnection: XCB error: 5 (BadAtom), sequence: 3095, resource id: 0, major code: 20 (GetProperty), minor code: 0
QXcbConnection: XCB error: 5 (BadAtom), sequence: 3096, resource id: 0, major code: 20 (GetProperty), minor code: 0
QXcbConnection: XCB error: 5 (BadAtom), sequence: 3097, resource id: 0, major code: 20 (GetProperty), minor code: 0
QXcbConnection: XCB error: 5 (BadAtom), sequence: 3098, resource id: 0, major code: 20 (GetProperty), minor code: 0
QXcbConnection: XCB error: 5 (BadAtom), sequence: 3099, resource id: 0, major code: 20 (GetProperty), minor code: 0
QXcbConnection: XCB error: 5 (BadAtom), sequence: 3100, resource id: 0, major code: 20 (GetProperty), minor code: 0
QXcbConnection: XCB error: 5 (BadAtom), sequence: 3101, resource id: 0, major code: 20 (GetProperty), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 3352, resource id: 127926399, major code: 18 (ChangeProperty), minor code: 0
kwin_core: A graphics reset attributable to the current GL context occurred.
kwin_core: Attempting to reset compositing.
kwin_core: Successfully loaded built-in effect:  "contrast"
org.kde.knotifications: Calling notify on "Popup"
kwin_core: Initializing OpenGL compositing ....

The above sequence from "kwin_core: Initializing OpenGL compositing" up to "kwin_core: Attempting to reset compositing." is looping for ever.

Regards
Cedric
Comment 1 Martin Flöser 2016-11-06 16:28:26 UTC
Can you try to disable the blur and/or background contrast effect. From the log one of those two might trigger the problem.

In general the behavior is "correct". A driver issue is reported and compositing is restarted. Normally that works quite fine, but in your case the restart triggers it again. That is something we have not thought of and also not encountered so far. We have breakage detection and should be able to also cover this case.
Comment 2 Martin Flöser 2016-11-07 08:00:02 UTC
https://phabricator.kde.org/D3288 has a change to try to detect the graphics reset during startup. If you could test the change that would be appreciated.
Comment 3 kde 2016-11-07 23:04:25 UTC
Hello Martin,
Thanks a lot to look at this bug report.
I tried to disable the blur effect and the background contrast effect, and I ended up by disabling all the effects. It did not help.

The fastest way for me to try the patch https://phabricator.kde.org/D3288 was to recompile kwin from the debian source package. As the latest debian source package version available is a 5.8.2, I applied https://phabricator.kde.org/D3288 on top of https://phabricator.kde.org/rKWIN19147f5f85bd87a1fedb460939dfdcef76ed7242

In order to be sure that the patch was triggered, I added a the following line qCDebug(KWIN_CORE) << "Graphic reset during Startup detected";

            if (m_scene && !m_scene->initFailed()) {
                connect(static_cast<SceneOpenGL*>(m_scene), &SceneOpenGL::resetCompositing, this,
                    [this] {
                        // detect graphics reset during startup
                        if (m_framesToTestForSafety > 0) {
                            // with a graphics reset at startup we don't try to activate again
                            // chances are we end in a restart loop
                            // see BUG: 372145
                            qCDebug(KWIN_CORE) << "Graphic reset during Startup detected";
                            finish();
                            // TODO: show notification
                        } else {
                            restart();
                        }
                    }
                );
                break; // -->
            }


QT_LOGGING_RULES="*.debug=true" ./kwin_x11 --replace

qt.qpa.screen: Output VGA-0 is not connected
qt.qpa.screen: Output DVI-I-0 is not connected
qt.qpa.screen: Output TV-0 is not connected
qt.qpa.screen: adding QXcbScreen(0x55b8b1a658e0, name="DVI-I-1", geometry=1280x1024+0+0, availableGeometry=1280x997+0+0, devicePixelRatio=1.0, logicalDpi=QPair(85.1,86.1), physicalSize=376.0x301.0mm, screenNumber=0, virtualSize=1280x1024 (1280.0x1024.0mm), orientation=Qt::ScreenOrientation(LandscapeOrientation), depth=24, refreshRate=60.0, root=252, windowManagerName="KWin") (Primary: true )
qt.qpa.screen: primary output is "DVI-I-1"
qt.qpa.input.devices: XInput version 2.2 is available and Qt supports 2.2 or greater
qt.qpa.input.devices: input device  Virtual core XTEST pointer ID 4
qt.qpa.input.devices:    has 10 buttons
qt.qpa.input.devices:    has valuator "Rel X" recognized? true
qt.qpa.input.devices:    has valuator "Rel Y" recognized? true
qt.qpa.input.devices:    it's a scrolling device
qt.qpa.input.devices: input device  USB Optical Mouse ID 10
qt.qpa.input.devices:    has 7 buttons
qt.qpa.input.devices:    has valuator "Rel X" recognized? true
qt.qpa.input.devices:    has valuator "Rel Y" recognized? true
qt.qpa.input.devices:    has valuator "Rel Horiz Scroll" recognized? true
qt.qpa.input.devices:    has valuator "Rel Vert Scroll" recognized? true
qt.qpa.input.devices:    it's a scrolling device
qt.xcb.glintegration: Choosing xcb gl-integration based on following priority
 ("xcb_glx", "xcb_egl")
qt.xcb.glintegration: Xcb GLX gl-integration created
qt.xcb.glintegration: Xcb GLX gl-integration successfully initialized
kwin_platform_x11_standalone: Has XInput support 2 . 2
kwin_xkbcommon: XKB: created compose table from locale fr_FR.UTF-8 with path /usr/share/X11/locale/en_US.UTF-8/Compose

kwin_xkbcommon: XKB: Compiling from RMLVO: rules 'evdev', model 'pc104', layout 'us', variant '(null)', options ''

kwin_xkbcommon: XKB: Compiling from KcCGST: keycodes 'evdev+aliases(qwerty)', types 'complete', compat 'complete', symbols 'pc+us+inet(evdev)'

kwin_xkbcommon: XKB: Compiling xkb_keycodes "(unnamed)"

kwin_xkbcommon: XKB: Compiling xkb_types "(unnamed)"

kwin_xkbcommon: XKB: Compiling xkb_compatibility "(unnamed)"

kwin_xkbcommon: XKB: The "group" statement in compat is unsupported; Ignored

kwin_xkbcommon: XKB: The "group" statement in compat is unsupported; Ignored                                                                                         
                                                                                                                                                                     
kwin_xkbcommon: XKB: The "group" statement in compat is unsupported; Ignored                                                                                         
                                                                                                                                                                     
kwin_xkbcommon: XKB: The "allowExplicit" field in indicator statements is unsupported; Ignored                                                                       
                                                                                                                                                                     
kwin_xkbcommon: XKB: The "allowExplicit" field in indicator statements is unsupported; Ignored                                                                       
                                                                                                                                                                     
kwin_xkbcommon: XKB: The "allowExplicit" field in indicator statements is unsupported; Ignored                                                                       
                                                                                                                                                                     
kwin_xkbcommon: XKB: The "allowExplicit" field in indicator statements is unsupported; Ignored                                                                       
                                                                                                                                                                     
kwin_xkbcommon: XKB: The "indicatorDrivesKeyboard" field in indicator statements is unsupported; Ignored                                                             
                                                                                                                                                                     
kwin_xkbcommon: XKB: The "allowExplicit" field in indicator statements is unsupported; Ignored

kwin_xkbcommon: XKB: Indicator name "Shift Lock" was not declared in the keycodes section; Adding new indicator

kwin_xkbcommon: XKB: Indicator name "Group 2" was not declared in the keycodes section; Adding new indicator

kwin_xkbcommon: XKB: Indicator name "Mouse Keys" was not declared in the keycodes section; Adding new indicator

kwin_xkbcommon: XKB: Compiling xkb_symbols "(unnamed)"

kwin_core: Extensions: shape: 0x "11"  composite: 0x "4"  render: 0x "b"  fixes: 0x "50"  randr: 0x "14"  sync: 0x "31"  damage: 0x  "11"
kwin_decorations: Trying to load decoration plugin:  "/usr/lib/x86_64-linux-gnu/qt5/plugins/org.kde.kdecoration2/breezedecoration.so"
org.kde.kwindowsystem: Loaded plugin "/usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/org.kde.kwindowsystem.platforms/KF5WindowSystemX11Plugin.so" for platform "xcb"
kwin_core: User timestamp, ASN: 186034
kwin_core: User timestamp, final: 'ID: 35651593 ;WMCLASS: "plasmashell" : "plasmashell" ;Caption: "Bureau — Plasma" ' : 186034
kwin_core: User timestamp, ASN: 4294967295
kwin_core: User timestamp, final: 'ID: 50331652 ;WMCLASS: "kate" : "kate" ;Caption: "dist_upgrade_status_16_10_2016.txt'  — Kate" ' : 4294967295
kwin_core: User timestamp, ASN: 4294967295
kwin_core: User timestamp, final: 'ID: 46137450 ;WMCLASS: "firefox" : "navigator" ;Caption: "Restauration de session - Mozilla Firefox" ' : 4294967295
kwin_core: User timestamp, ASN: 138452
kwin_core: User timestamp, final: 'ID: 60817440 ;WMCLASS: "qtcreator" : "qtcreator" ;Caption: "Qt Creator" ' : 138452
kwin_core: User timestamp, ASN: 208635
kwin_core: User timestamp, final: 'ID: 58720260 ;WMCLASS: "systemsettings" : "systemsettings5" ;Caption: "Compositeur  — Configuration du système" ' : 208635
kwin_core: User timestamp, ASN: 223831
kwin_core: User timestamp, final: 'ID: 37748741 ;WMCLASS: "konsole" : "konsole" ;Caption: "obj-x86_64-linux-gnu : kwin_x11 — Konsole" ' : 223831
kwin_core: User timestamp, ASN: 177938
kwin_core: User timestamp, final: 'ID: 35651601 ;WMCLASS: "plasmashell" : "plasmashell" ;Caption: "Plasma" ' : 177938
kwin_core: Initializing OpenGL compositing
kwin_platform_x11_standalone: Choosing GLXFBConfig 0xf9 X visual 0x2f depth 24 RGBA 8:8:8:0 ZS 0:0
OpenGL vendor string:                   NVIDIA Corporation
OpenGL renderer string:                 GeForce 6500/PCIe/SSE2
OpenGL version string:                  2.1.2 NVIDIA 304.131
OpenGL shading language version string: 1.20 NVIDIA via Cg compiler
Driver:                                 NVIDIA
Driver version:                         304.131
GPU class:                              NV40/G70
OpenGL version:                         2.1.2
GLSL version:                           1.20
X server version:                       1.18.4
Linux kernel version:                   4.7
Requires strict binding:                no
GLSL shaders:                           limited
Texture NPOT support:                   yes
Virtual Machine:                        no
kwin_platform_x11_standalone: Direct rendering: true
kwin_core: Initializing fences for synchronization with the X command stream
kwin_core: Color correction: false
kwin_core: OpenGL 2 compositing successfully initialized
kwin_core: Vertical Refresh rate  60 Hz ( "primary screen" )
kwin_platform_x11_standalone: Using FBConfig 0x170 for visual 0xb0
kwin_platform_x11_standalone: Using FBConfig 0xfd for visual 0x31
kwin_platform_x11_standalone: Using FBConfig 0xfd for visual 0x31
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
QXcbConnection: XCB error: 9 (BadDrawable), sequence: 1825, resource id: 0, major code: 14 (GetGeometry), minor code: 0
QXcbConnection: XCB error: 9 (BadDrawable), sequence: 1835, resource id: 0, major code: 14 (GetGeometry), minor code: 0
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-ParentApp" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-RemoteLocation" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KWin-Video-Url" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KWin-Exclude-Listing" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-PluginKeyword" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-ParentComponents" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-PluginKeyword" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-ParentComponents" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KWin-Config-TranslationDomain" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-PluginKeyword" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-PluginKeyword" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-ParentComponents" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KWin-Config-TranslationDomain" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KWin-Video-Url" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KWin-Exclusive-Category" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-ParentApp" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-DefaultSize" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-RemoteLocation" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KWin-Video-Url" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-API" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-Plasma-MainScript" -> falling back to string
kf5.kcoreaddons.desktopparser: Unknown property type for key "X-KDE-Ordering" -> falling back to string
Freeze in OpenGL initialization detected
Application::crashHandler() called with signal 6; recent crashes: 1
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = kwin_x11 path = /home/cedric/project/plasma5Debug/debianpkg_5.8.2/kwin-5.8.2/obj-x86_64-linux-gnu pid = 1725
KCrash: Arguments: /home/cedric/project/plasma5Debug/debianpkg_5.8.2/kwin-5.8.2/obj-x86_64-linux-gnu/kwin_x11 --replace 
KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi from kdeinit
sock_file=/run/user/1028/kdeinit5__0
qt.qpa.screen: Output VGA-0 is not connected
qt.qpa.screen: Output DVI-I-0 is not connected
qt.qpa.screen: Output TV-0 is not connected
qt.qpa.screen: adding QXcbScreen(0x55ee862ad4f0, name="DVI-I-1", geometry=1280x1024+0+0, availableGeometry=1280x997+0+0, devicePixelRatio=1.0, logicalDpi=QPair(85.1,86.1), physicalSize=376.0x301.0mm, screenNumber=0, virtualSize=1280x1024 (1280.0x1024.0mm), orientation=Qt::ScreenOrientation(LandscapeOrientation), depth=24, refreshRate=60.0, root=252, windowManagerName="KWin") (Primary: true )
qt.qpa.screen: primary output is "DVI-I-1"
qt.qpa.input.devices: XInput version 2.2 is available and Qt supports 2.2 or greater
qt.qpa.input.devices: input device  Virtual core XTEST pointer ID 4
qt.qpa.input.devices:    has 10 buttons
qt.qpa.input.devices:    has valuator "Rel X" recognized? true
qt.qpa.input.devices:    has valuator "Rel Y" recognized? true
qt.qpa.input.devices:    it's a scrolling device
qt.qpa.input.devices: input device  USB Optical Mouse ID 10
qt.qpa.input.devices:    has 7 buttons
qt.qpa.input.devices:    has valuator "Rel X" recognized? true
qt.qpa.input.devices:    has valuator "Rel Y" recognized? true
qt.qpa.input.devices:    has valuator "Rel Horiz Scroll" recognized? true
qt.qpa.input.devices:    has valuator "Rel Vert Scroll" recognized? true
qt.qpa.input.devices:    it's a scrolling device
qt.xcb.glintegration: Choosing xcb gl-integration based on following priority
 ("xcb_glx", "xcb_egl")
qt.xcb.glintegration: Xcb GLX gl-integration created
qt.xcb.glintegration: Xcb GLX gl-integration successfully initialized
kwin_platform_x11_standalone: Has XInput support 2 . 2
kwin_xkbcommon: XKB: created compose table from locale fr_FR.UTF-8 with path /usr/share/X11/locale/en_US.UTF-8/Compose

kwin_xkbcommon: XKB: Compiling from RMLVO: rules 'evdev', model 'pc104', layout 'us', variant '(null)', options ''

kwin_xkbcommon: XKB: Compiling from KcCGST: keycodes 'evdev+aliases(qwerty)', types 'complete', compat 'complete', symbols 'pc+us+inet(evdev)'

kwin_xkbcommon: XKB: Compiling xkb_keycodes "(unnamed)"

kwin_xkbcommon: XKB: Compiling xkb_types "(unnamed)"

kwin_xkbcommon: XKB: Compiling xkb_compatibility "(unnamed)"

kwin_xkbcommon: XKB: The "group" statement in compat is unsupported; Ignored

kwin_xkbcommon: XKB: The "group" statement in compat is unsupported; Ignored

kwin_xkbcommon: XKB: The "group" statement in compat is unsupported; Ignored

kwin_xkbcommon: XKB: The "allowExplicit" field in indicator statements is unsupported; Ignored

kwin_xkbcommon: XKB: The "allowExplicit" field in indicator statements is unsupported; Ignored

kwin_xkbcommon: XKB: The "allowExplicit" field in indicator statements is unsupported; Ignored

kwin_xkbcommon: XKB: The "allowExplicit" field in indicator statements is unsupported; Ignored

kwin_xkbcommon: XKB: The "indicatorDrivesKeyboard" field in indicator statements is unsupported; Ignored

kwin_xkbcommon: XKB: The "allowExplicit" field in indicator statements is unsupported; Ignored

kwin_xkbcommon: XKB: Indicator name "Shift Lock" was not declared in the keycodes section; Adding new indicator

kwin_xkbcommon: XKB: Indicator name "Group 2" was not declared in the keycodes section; Adding new indicator

kwin_xkbcommon: XKB: Indicator name "Mouse Keys" was not declared in the keycodes section; Adding new indicator

kwin_xkbcommon: XKB: Compiling xkb_symbols "(unnamed)"

kwin_core: Extensions: shape: 0x "11"  composite: 0x "4"  render: 0x "b"  fixes: 0x "50"  randr: 0x "14"  sync: 0x "31"  damage: 0x  "11"
kwin_decorations: Trying to load decoration plugin:  "/usr/lib/x86_64-linux-gnu/qt5/plugins/org.kde.kdecoration2/breezedecoration.so"
org.kde.kwindowsystem: Loaded plugin "/usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/org.kde.kwindowsystem.platforms/KF5WindowSystemX11Plugin.so" for platform "xcb"
kwin_core: User timestamp, ASN: 186034
kwin_core: User timestamp, final: 'ID: 35651593 ;WMCLASS: "plasmashell" : "plasmashell" ;Caption: "Bureau — Plasma" ' : 186034
kwin_core: User timestamp, ASN: 4294967295
kwin_core: User timestamp, final: 'ID: 50331652 ;WMCLASS: "kate" : "kate" ;Caption: "dist_upgrade_status_16_10_2016.txt'  — Kate" ' : 4294967295
kwin_core: User timestamp, ASN: 4294967295


It seems that the first patch "protection against OpenGL Freeze" detect the misbehavior and the call 
qFatal("Freeze in OpenGL initialization detected"); prevents the latest patch to be triggered.

Kwin is not looping anymore, but obviously, the openGl compositor is still in a bad shape.

Hope it helps
Regards
Cedric
Comment 4 Martin Flöser 2016-11-08 06:18:24 UTC
Ok, thanks for the testing. That's already good to know that the freeze detection can detect the graphics reset. It also shows us that the detection time might be too short.

In your specific case I think it's the only option we have to disable compositing. The reset is sent by the GPU, so we cannot do anything about it. We don't know what triggers it and cannot prevent it. Any OpenGL call could be the bad one. So all we can do is detect that it's broken and not try again. Given that 5.8.3 does that properly I'm setting to fixed and won't push the suggested change.