Taking an active window screenshot of a web page in Chromium often causes Plasma to break in a number of ways - any hidden toolbars will become permanently visible, many windows will loose their window decoration and become unable to be moved, clicking on a different window doesn't change window focus and bring it to the forefront, various widgets stop working, etc. etc. This seems to only happen with Chromium window screenshots - I can't recreate the bug with screenshots of any other application or web browser. The link below is a video of the bug: https://youtu.be/_mrwpKCwZ2Y
From your video kwin's locked (but not dead, which is why you can't --replace it) Can you run the following: switch to a TTY (or ssh in from another computer) run "sudo gdb --pid `pidof kwin_x11`" when that loads type set logging on set pagination off bt then quit you should then find a file called gdb.txt in that directory.
Created attachment 109506 [details] gdb output
I'm unclear as to whether or not you'd like for me to run gdb on the process before or after kwin locks, so I tried both. Trying to run it after locking kwin, I get "ptrace: No such process". After searching through htop and ksysguard, it seems like the kwin_x11 process is entirely gone after screenshotting Chromium, and running "kwin_x11" from konsole actually fixes the problem. The attached file is from running gdb while kwin is still working properly (Which I'm assuming is not what you needed from me, but its there just in case).
Also, it just crossed my mind to screenshot Chromium after restarting kwin_x11 in konsole, which produces this: =============================================================================== $ kwin_x11 QXcbConnection: XCB error: 3 (BadWindow), sequence: 172, resource id: 2097158, major code: 20 (GetProperty), minor code: 0 OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: GeForce GTX 1070/PCIe/SSE2 OpenGL version string: 3.1.0 NVIDIA 387.34 OpenGL shading language version string: 1.40 NVIDIA via Cg compiler Driver: NVIDIA Driver version: 387.34 GPU class: Unknown OpenGL version: 3.1 GLSL version: 1.40 X server version: 1.19.5 Linux kernel version: 4.14.8 Requires strict binding: no GLSL shaders: yes Texture NPOT support: yes Virtual Machine: no kpluginindex: Not cached "/home/altguard/.local/share/kwin/effects" kpluginindex: Not cached "/usr/share/kwin/effects" kf5.kcoreaddons.desktopparser: Property type "Url" is not a known QVariant type. Found while parsing property definition for "X-KWin-Video-Url" in "/usr/share/kservicetypes5/kwineffect.desktop" kpluginindex: Not cached "/usr/local/share/kwin/effects" QXcbConnection: XCB error: 9 (BadDrawable), sequence: 2090, resource id: 0, major code: 14 (GetGeometry), minor code: 0 QXcbConnection: XCB error: 9 (BadDrawable), sequence: 2092, resource id: 0, major code: 14 (GetGeometry), minor code: 0 QXcbConnection: XCB error: 9 (BadDrawable), sequence: 2100, resource id: 0, major code: 14 (GetGeometry), minor code: 0 QXcbConnection: XCB error: 9 (BadDrawable), sequence: 2110, resource id: 0, major code: 14 (GetGeometry), minor code: 0 QXcbConnection: XCB error: 9 (BadDrawable), sequence: 2111, resource id: 0, major code: 14 (GetGeometry), minor code: 0 QXcbConnection: XCB error: 9 (BadDrawable), sequence: 2112, resource id: 0, major code: 14 (GetGeometry), minor code: 0 QXcbConnection: XCB error: 9 (BadDrawable), sequence: 2113, resource id: 0, major code: 14 (GetGeometry), minor code: 0 QXcbConnection: XCB error: 9 (BadDrawable), sequence: 2114, resource id: 0, major code: 14 (GetGeometry), minor code: 0 QXcbConnection: XCB error: 9 (BadDrawable), sequence: 2115, resource id: 0, major code: 14 (GetGeometry), minor code: 0 QXcbConnection: XCB error: 9 (BadDrawable), sequence: 2116, resource id: 0, major code: 14 (GetGeometry), minor code: 0 QXcbConnection: XCB error: 9 (BadDrawable), sequence: 2117, resource id: 0, major code: 14 (GetGeometry), minor code: 0 QXcbConnection: XCB error: 9 (BadDrawable), sequence: 2120, resource id: 0, major code: 14 (GetGeometry), minor code: 0 QXcbConnection: XCB error: 9 (BadDrawable), sequence: 2121, resource id: 0, major code: 14 (GetGeometry), minor code: 0 QXcbConnection: XCB error: 9 (BadDrawable), sequence: 2122, resource id: 0, major code: 14 (GetGeometry), minor code: 0 QXcbConnection: XCB error: 9 (BadDrawable), sequence: 2123, resource id: 0, major code: 14 (GetGeometry), minor code: 0 kpluginindex: Not cached "/home/altguard/.local/share/kwin/scripts/" kpluginindex: Not cached "/usr/share/kwin/scripts/" kpluginindex: Not cached "/usr/local/share/kwin/scripts/" =============================================================================== After screenshotting Chromium: =============================================================================== The X11 connection broke (error 4). Did the X11 server die? The X11 connection broke: Maximum allowed requested length exceeded (code 4) XIO: fatal IO error 2 (No such file or directory) on X server ":0" after 4871 requests (4871 known processed) with 0 events remaining. $ ===============================================================================
From the video KWin is not (!) frozen. Compositing is active (we can see that when moving the konsole window) and rendering continues when entering the "frozen" state. As rendering is done in the main thread this means that KWin is not frozen. To me it looks like something holds either a mouse, keyboard or X-Server grab. Please use xdotool key XF86LogGrabInfo to print the active grabs to /var/log/Xorg.0.log
If you can provide the information requested in comment #5, please add it.
Ah, my apologies. I forgot all about this after the holidays. I'll attach the log now.
Created attachment 109814 [details] Xorg log from | xdotool key XF86LogGrabInfo
There are no active grabs listed. Did you do this command when the problem was visible?
Ah, I didn't, sorry. However, I have now done it again while the problem was happening and there still weren't any active grabs listed (I'll attach the new log, but it's no different as far as I could see).
Created attachment 109821 [details] Xorg log from | xdotool key XF86LogGrabInfo
Could you please post the output of: qdbus org.kde.KWin /KWin supportInformation
I tried running that while the problem was active, and I got the output "Service 'org.kde.KWin' does not exist.", so the output I'm attaching was run while the problem was not active.
Created attachment 109827 [details] Output of | qdbus org.kde.KWin /KWin supportInformation
Could it be that it only breaks if you screenshot the larger screen or windows on that screen?
Interesting, apparently I can take an active window screenshot of Chromium on my smaller monitor without any problems. The issue only seems to happen on my larger main monitor, and it only happens with Chromium. Screenshots of any other application don't cause the issue, regardless of which monitor I take the screenshot on.
I don't understand what it has to do with Chromium, but in general it seems to be just too much data to transfer in one X11 set property call.
That just gave me an idea I didn't consider before - resizing the windows. As it turns out, this isn't just Chromium - after trying multiple applications at different window sizes, it looks like taking a screenshot of *any* application past a certain window size causes the crash, and shrinking the chromium window down allows me to take a screenshot without issues. I always have Chromium windows open at a larger size than everything else, so I never caught on until now. My apologies.
In addition, taking a full screen screenshot of both monitors at once does not cause any issues - only the window screenshot.
yeah, that all makes sense. Fullscreenshot is taken in a different way, thus the request problem is not hit.
*** Bug 391118 has been marked as a duplicate of this bug. ***
If anyone is interested, I have a bunch more information in Bug 391118. This bug is easily reproducible on my HiDPI laptop in X11 (but not Wayland).
*** Bug 407373 has been marked as a duplicate of this bug. ***
Git commit 67444e36592e78d46b757a6c72be1d50bdae19e6 by Vlad Zagorodniy. Committed on 27/05/2019 at 14:30. Pushed by vladz into branch 'Plasma/5.12'. [effects/screenshot] Upload data to xpixmap in chunks Summary: xcb_put_image doesn't handle big images well. Contrary to XPutImage, the caller must manually split the data in such a way that each xcb_put_image request doesn't exceed the maximum request length. Not doing so will result in libxcb shutting down the connection. Related: bug 338489 Test Plan: Take a screenshot of an active fullscreen client on a 4K monitor. Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: davidedmundson, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D21370 M +70 -10 effects/screenshot/screenshot.cpp https://commits.kde.org/kwin/67444e36592e78d46b757a6c72be1d50bdae19e6
*** This bug has been marked as a duplicate of bug 338489 ***