Bug 450337 - Multiple issues when primary screen is turned on & off in a multi-screen setup
Summary: Multiple issues when primary screen is turned on & off in a multi-screen setup
Status: RESOLVED DUPLICATE of bug 448064
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (show other bugs)
Version: 5.24.3
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-15 19:54 UTC by Dick Tracey
Modified: 2023-10-26 21:16 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
journalctl log (69.45 KB, text/plain)
2022-02-18 06:52 UTC, Krzysztof Kundzicz
Details
New crash information added by DrKonqi (2.85 KB, text/plain)
2022-02-20 01:41 UTC, Ilya Bizyaev
Details
New crash information added by DrKonqi (3.51 KB, text/plain)
2022-04-12 07:34 UTC, Bruno Friedmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dick Tracey 2022-02-15 19:54:10 UTC
SUMMARY

I have two monitors connected to an NVidia card, and I have Screen Energy Saving enabled (system hibernate/sleep isn't enabled, it's a desktop computer). The monitors are of different brands, and when waking up from screen energy saving, my primary screen wakes up 3-4 seconds later than the secondary one. When screens wake up, I have multiple issues.

Situation #1

If I move the mouse to wake the screens, the following happens

(1) All windows in the primary are moved to the secondary
(2) Secondary becomes the primary (the taskbar gets moved to the secondary)
(3) The background for the primary becomes plain black.
(4) KWin (X11) crashes with the following:

Application: KWin (kwin_x11), signal: Segmentation fault

[KCrash Handler]
#4  0x00007feda65a7530 in KWin::Toplevel::isOnOutput(KWin::AbstractOutput*) const () at /usr/lib/libkwin.so.5
#5  0x00007feda65e245e in KWin::Workspace::activeOutput() const () at /usr/lib/libkwin.so.5
#6  0x00007feda65efe10 in KWin::X11Client::manage(unsigned int, bool) () at /usr/lib/libkwin.so.5
#7  0x00007feda65d53f6 in KWin::Workspace::createClient(unsigned int, bool) () at /usr/lib/libkwin.so.5
#8  0x00007feda650944e in KWin::Workspace::workspaceEvent(xcb_generic_event_t*) () at /usr/lib/libkwin.so.5
#9  0x00007feda4befad7 in QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) () at /usr/lib/libQt5Core.so.5
#10 0x00007fed9ead2ad9 in QXcbConnection::handleXcbEvent(xcb_generic_event_t*) () at /usr/lib/libQt5XcbQpa.so.5
#11 0x00007fed9ead6cac in QXcbConnection::processXcbEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5XcbQpa.so.5
#12 0x00007fed9eaf9db2 in  () at /usr/lib/libQt5XcbQpa.so.5
#13 0x00007feda4bf144b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#14 0x00007feda4bfcb97 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#15 0x000055c89445be8c in  ()
#16 0x00007feda3b19310 in __libc_start_call_main () at /usr/lib/libc.so.6
#17 0x00007feda3b193c1 in __libc_start_main_impl () at /usr/lib/libc.so.6
#18 0x000055c89445d225 in  ()
[Inferior 1 (process 113133) detached]

After restarting plasmashell, (2) and (3) get fixed, but not (1). I need to move all open windows manually back to the primary.




If I plug off the secondary monitor before waking up using its power off button, the let the screens wake up by moving the mouse, wait until the primary wakes up, and the press the power on button on secondary screen, (2), (3), (4) don't happen but (1) still happens, which is still annoying.




If I swap the roles for the primary and secondary monitors (such that the slow-to-wake-up monitor becomes secondary), the following happens:

(1) All windows in the secondary are moved to the primary
(2) The background for the secondary becomes plain black.
(3) KWin crashes again

STEPS TO REPRODUCE
1. Connect two monitors
2. Enable Screen Energy Saving
3. Let screens sleep, wait an additional 1 minute for the screens to scan their alternative inputs & turn off
4. Move the mouse to wake up the monitors

The "problematic", slow-to-wake-up monitor is MSI Optix G242.


OBSERVED RESULT

Issues & segfaults detailed in SUMMARY, depending on the configuration.


EXPECTED RESULT

Finding the desktop, screen and windows configuration in the exact same state before monitors go to sleep. Also no crashes :)


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Arch Linux (linux-lts 5.15.23)
(available in About System)
KDE Plasma Version:  5.24.1
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

NVidia drivers 510.54
Comment 1 Dick Tracey 2022-02-15 20:36:22 UTC
Alternative way to reproduce (1)-(4):

Turn off the primary (slow) screen: windows & panel automatically get moved to the secondary. The turn on the slow screen again, (1)-(4) happens.
Comment 2 Nate Graham 2022-02-16 01:16:29 UTC
Are one or both DisplayPort monitors? Could be related to Bug 450068.
Comment 3 Dick Tracey 2022-02-16 01:36:17 UTC
Yes, indeed! Apologies for forgetting to mention in the first place. The primary/slow MSI monitor is connected through DisplayPort whereas the other one is HDMI.
Comment 4 Dick Tracey 2022-02-16 01:48:02 UTC
It doesn't appear this is related to 450068, I get the same output

$ ls /sys/class/drm
card0  card0-HDMI-A-1  card0-HDMI-A-2  card0-VGA-1  renderD128  version

before & after. I discovered something weird though. In my original setup, the primary screen is located on the right, and secondary on the left. 

But when I swap their roles in the Display Configuration, the problems (2) (3) (4) in the original list go away! I can't seem to be able to trigger (2) (3) (4) when I set the primary as the left monitor. (1) still happens though.
Comment 5 Krzysztof Kundzicz 2022-02-18 06:52:42 UTC
Created attachment 146901 [details]
journalctl log

/me too, but without segfault.

Also attached journal log after turning the monitor off and back on.

New plasma treats turning an additional display off and on as it being disconnected and reconnected, which is different from previous version and just plain wrong.

THE video, how it all looks: https://streamable.com/mbw1oa

As you can see in the linked video, after turning the monitor off (with a power button), and **then** it on, plasma behaves as if the display was reconnected. With this windows are moved on the secondary display and desktop icons locations are all messed up.

Same happens if the display powers down due to energy saving settings.

drm names do not change like in other, referenced here bug.

Samsung 4K monitor as primary display connected via HDMI to nvidia card in a laptop. 
Laptop's display panel internally connected via DisplayPort.

nvidia-510.54.

```
Screen 0: minimum 8 x 8, current 5760 x 2160, maximum 32767 x 32767
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 697mm x 392mm
   3840x2160     60.00*+  59.94    50.00    30.00    29.97    25.00    23.98  
DP-2 connected 1920x1080+3840+1080 (normal left inverted right x axis y axis) 344mm x 193mm
   1920x1080    120.21*+
```
Comment 6 Dick Tracey 2022-02-19 18:13:01 UTC
Thanks! Can you try setting the primary monitor that is being turned on/off to be on the right in Display Configuration, and doing the experiment again? I only get the crash if that monitor is located at (1920,0) and not (0,0).
Comment 7 Ilya Bizyaev 2022-02-20 01:41:59 UTC
Created attachment 146958 [details]
New crash information added by DrKonqi

kwin_x11 (5.24.1) using Qt 5.15.2

- What I was doing when the application crashed:
My laptop was connected to an external screen, and I closed the lid

-- Backtrace (Reduced):
#5  0x00007fcffd6a4702 in KWin::Toplevel::isOnOutput(KWin::AbstractOutput*) const (this=0x55b3b3fa2b10, output=<optimized out>) at /usr/src/debug/kwin5-5.24.1-lp153.439.1.x86_64/src/toplevel.cpp:423
#6  0x00007fcffd6d0d99 in KWin::Workspace::activeOutput() const (this=0x55b3abeda9c0) at /usr/src/debug/kwin5-5.24.1-lp153.439.1.x86_64/src/workspace.cpp:2419
#7  0x00007fcffd74c283 in KWin::TabBox::SwitcherItem::screenGeometry() const (this=<optimized out>) at /usr/src/debug/kwin5-5.24.1-lp153.439.1.x86_64/src/tabbox/switcheritem.cpp:74
#8  0x00007fcffd5644f5 in KWin::TabBox::SwitcherItem::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=_o@entry=0x55b3b17399e0, _c=_c@entry=QMetaObject::ReadProperty, _id=_id@entry=1, _a=_a@entry=0x7ffe7cfff130) at /usr/src/debug/kwin5-5.24.1-lp153.439.1.x86_64/build/src/kwin_autogen/WF44ZIICEP/moc_switcheritem.cpp:210
#9  0x00007fcffd57c57b in KWin::TabBox::SwitcherItem::qt_metacall(QMetaObject::Call, int, void**) (this=0x55b3b17399e0, _c=QMetaObject::ReadProperty, _id=1, _a=0x7ffe7cfff130) at /usr/src/debug/kwin5-5.24.1-lp153.439.1.x86_64/build/src/kwin_autogen/WF44ZIICEP/moc_switcheritem.cpp:273
Comment 8 Krzysztof Kundzicz 2022-02-21 07:05:59 UTC
(In reply to Dick Tracey from comment #6)
> Thanks! Can you try setting the primary monitor that is being turned on/off
> to be on the right in Display Configuration, and doing the experiment again?
> I only get the crash if that monitor is located at (1920,0) and not (0,0).

Yeah, it doesn't matter if I put the external display on the left or right in the kscreen, nor if I make my laptop's display primary — it still messes the displays up.


I've found the culprit of the 'disconnection' behavior: it's the nvidia 510 drivers. 
Xrandr output every 0.2s in loop, while turning the display off and the back on:

HDMI-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 697mm x 392mm
HDMI-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 697mm x 392mm
HDMI-0 disconnected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
HDMI-0 disconnected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
HDMI-0 connected (normal left inverted right x axis y axis)
HDMI-0 connected (normal left inverted right x axis y axis)
HDMI-0 connected (normal left inverted right x axis y axis)
HDMI-0 connected (normal left inverted right x axis y axis)
HDMI-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 697mm x 392mm
HDMI-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 697mm x 392mm
HDMI-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 697mm x 392mm
HDMI-0 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 697mm x 392mm

It seems that disconnection is being reported while turning the display back **ON**.

I've downgraded the nvidia drivers back to 495.46 and no disconnection is reported and plasma behaves as expected.
Comment 9 Dick Tracey 2022-02-22 02:41:08 UTC
I originally experienced the problems in my original report with 495 drivers, and upgrading to 510 didn't fix, so that appears to be a different bug.
Comment 10 Dick Tracey 2022-03-09 23:12:11 UTC
In 5.24.3, I can no longer reproduce the issues (2), (3), (4).

Issue (1) remains though: after a monitor sleep & wake, all windows in the primary still get stuck to the secondary.

To reproduce:

1. Turn off (using power button) secondary monitor, then primary monitor
2. Turn on secondary monitor: all windows & panels are now moved to secondary monitor
3. Turn on the primary monitor (this emulates the actual behavior when they're waking up, my monitors are different brands/models, and the primary takes a few seconds longer to wake up): panel goes back to the primary monitor, but open windows that were originally in the primary and now stuck in the secondary.

Given that the title of the issue has been changed to that of issue (4), should I create a new issue for (1)?
Comment 11 Dick Tracey 2022-03-10 00:11:17 UTC
Addition to my previous post: (3) also does happen sometimes: the primary desktop just became black, although no crashes.
Comment 12 Dick Tracey 2022-03-11 15:35:02 UTC
The crash is back too, albeit a different one. After waking the monitors, I got the following crash:




Application: KWin (kwin_x11 (deleted)), signal: Segmentation fault

[New LWP 1756116]
[New LWP 1756136]
[New LWP 1775726]
[New LWP 1838285]
[New LWP 1838286]
[New LWP 1839914]
[New LWP 1858159]
[New LWP 1858160]
[New LWP 1858161]
[New LWP 1858162]
0x00007f572ced02af in ?? ()
__preamble__
[Current thread is 1 (LWP 1756096)]

Thread 11 (LWP 1858162 "Thread (pooled)"):
#0  0x00007f572ce5415a in ?? ()
#1  0x0000000000000000 in ?? ()

Thread 10 (LWP 1858161 "Thread (pooled)"):
#1  0x0000000000000000 in ?? ()

Thread 9 (LWP 1858160 "Thread (pooled)"):
#1  0x0000000000000000 in ?? ()

Thread 8 (LWP 1858159 "Thread (pooled)"):
#1  0x0000000000000000 in ?? ()

Thread 7 (LWP 1839914 "QSGRenderThread"):
#1  0x00007f56d4047310 in ?? ()
#2  0x00007f5700000189 in ?? ()
#3  0x000056451a98e0e4 in ?? ()
#4  0x0000000000000000 in ?? ()

Thread 6 (LWP 1838286 "vsync event mon"):
#1  0x0000000000000000 in ?? ()

Thread 5 (LWP 1838285 "FreezeDetector"):
#1  0x0000000000000000 in ?? ()

Thread 4 (LWP 1775726 "QSGRenderThread"):
#1  0x00007f5700057150 in ?? ()
#2  0x00007f5700000189 in ?? ()
#3  0x000056451b343970 in ?? ()
#4  0x0000000000000000 in ?? ()

Thread 3 (LWP 1756136 "QQmlThread"):
#1  0x0000000000000000 in ?? ()

Thread 2 (LWP 1756116 "QDBusConnection"):
#1  0x0000000000000000 in ?? ()

Thread 1 (LWP 1756096 "kwin_x11"):
#1  0x0000000000000000 in ?? ()
[Inferior 1 (process 1756096) detached]
Comment 13 Dick Tracey 2022-03-11 23:33:44 UTC
I tried starting plasmashell through bash. After wake up & the primary desktop becomes black, I see the following in the CLI:

qt.qpa.xcb: QXcbConnection: XCB error: 4 (BadPixmap), sequence: 39145, resource id: 14680216, major code: 54 (FreePixmap), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 13 (BadGC), sequence: 39146, resource id: 14680217, major code: 60 (FreeGC), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 4 (BadPixmap), sequence: 39147, resource id: 14680218, major code: 54 (FreePixmap), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 13 (BadGC), sequence: 39148, resource id: 14680219, major code: 60 (FreeGC), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 4 (BadPixmap), sequence: 39149, resource id: 14680220, major code: 54 (FreePixmap), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 13 (BadGC), sequence: 39150, resource id: 14680221, major code: 60 (FreeGC), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 4 (BadPixmap), sequence: 39151, resource id: 14680222, major code: 54 (FreePixmap), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 13 (BadGC), sequence: 39152, resource id: 14680223, major code: 60 (FreeGC), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 4 (BadPixmap), sequence: 39153, resource id: 14680224, major code: 54 (FreePixmap), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 13 (BadGC), sequence: 39154, resource id: 14680225, major code: 60 (FreeGC), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 4 (BadPixmap), sequence: 39155, resource id: 14680226, major code: 54 (FreePixmap), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 13 (BadGC), sequence: 39156, resource id: 14680227, major code: 60 (FreeGC), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 4 (BadPixmap), sequence: 39157, resource id: 14680212, major code: 54 (FreePixmap), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 13 (BadGC), sequence: 39158, resource id: 14680213, major code: 60 (FreeGC), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 4 (BadPixmap), sequence: 39159, resource id: 14680214, major code: 54 (FreePixmap), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 13 (BadGC), sequence: 39160, resource id: 14680215, major code: 60 (FreeGC), minor code: 0
qt.svg: <input>:303:258: Could not add child element to parent element because the types are incorrect.
qt.svg: <input>:303:463: Could not add child element to parent element because the types are incorrect.
qt.svg: <input>:303:659: Could not add child element to parent element because the types are incorrect.
qt.svg: <input>:303:913: Could not add child element to parent element because the types are incorrect.
qt.svg: <input>:303:1049: Could not add child element to parent element because the types are incorrect.
qt.svg: <input>:303:1251: Could not add child element to parent element because the types are incorrect.
qt.svg: <input>:303:1453: Could not add child element to parent element because the types are incorrect.
qt.svg: <input>:303:1631: Could not add child element to parent element because the types are incorrect.
qt.svg: <input>:303:1739: Could not add child element to parent element because the types are incorrect.
qt.svg: <input>:303:1980: Could not add child element to parent element because the types are incorrect.
qt.svg: <input>:303:2223: Could not add child element to parent element because the types are incorrect.
Comment 14 Dick Tracey 2022-03-12 15:19:31 UTC
More kwin crashes trigger by monitor wake up, from CLI:


Unable to start Dr. Konqi
Re-raising signal for core dump handling.
Application::crashHandler() called with signal 11; recent crashes: 1
22 -- exe=/usr/bin/kwin_x11
13 -- platform=xcb
11 -- display=:0
17 -- appname=kwin_x11
17 -- apppath=/usr/bin
10 -- signal=11
12 -- pid=1885828
18 -- appversion=5.24.3
17 -- programname=KWin
31 -- bugaddress=submit@bugs.kde.org
12 -- startupid=0
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = kwin_x11 path = /usr/bin pid = 1885828
KCrash: Arguments: /usr/bin/kwin_x11 --crashes 1 
KCrash: Attempting to start /usr/lib/drkonqi
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 180, resource id: 75497485, major code: 20 (GetProperty), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 181, resource id: 75497485, major code: 20 (GetProperty), minor code: 0
Warning: Setting a new default format with a different version or profile after the global shared context is created may cause issues with context sharing.
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 180, resource id: 75497485, major code: 20 (GetProperty), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 181, resource id: 75497485, major code: 20 (GetProperty), minor code: 0
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5089:46: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5091:48: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5093:48: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5097:47: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5099:46: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5107:48: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5111:46: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5113:46: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5117:45: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: /usr/share/X11/locale/en_US.UTF-8/Compose:5120:46: this compose sequence is a duplicate of another; skipping line
kwin_xkbcommon: XKB: inet:334:58: unrecognized keysym "XF86EmojiPicker"
OpenGL vendor string:                   NVIDIA Corporation
OpenGL renderer string:                 NVIDIA GeForce GTX 1650 SUPER/PCIe/SSE2
OpenGL version string:                  3.1.0 NVIDIA 510.54
OpenGL shading language version string: 1.40 NVIDIA via Cg compiler
Driver:                                 NVIDIA
Driver version:                         510.54
GPU class:                              Unknown
OpenGL version:                         3.1
GLSL version:                           1.40
X server version:                       1.21.1
Linux kernel version:                   5.15.23
Requires strict binding:                no
GLSL shaders:                           yes
Texture NPOT support:                   yes
Virtual Machine:                        no
kwin_core: XCB error: 10 (BadAccess), sequence: 5455, resource id: 483, major code: 142 (Composite), minor code: 2 (RedirectSubwindows)
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6232, resource id: 14680279, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6531, resource id: 14680279, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6532, resource id: 14680281, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6533, resource id: 14680283, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6534, resource id: 14680285, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6535, resource id: 14680287, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6536, resource id: 14680289, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6537, resource id: 14680275, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6538, resource id: 14680277, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6540, resource id: 14680279, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6541, resource id: 14680281, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6542, resource id: 14680283, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6543, resource id: 14680285, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6544, resource id: 14680287, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6545, resource id: 14680289, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6546, resource id: 14680275, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6547, resource id: 14680277, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6568, resource id: 14680279, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6569, resource id: 14680281, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6570, resource id: 14680283, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6571, resource id: 14680285, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6572, resource id: 14680287, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6573, resource id: 14680289, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6574, resource id: 14680275, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6575, resource id: 14680277, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6577, resource id: 14680279, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6578, resource id: 14680281, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6579, resource id: 14680283, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6593, resource id: 14680279, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6594, resource id: 14680281, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6595, resource id: 14680283, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6596, resource id: 14680285, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6597, resource id: 14680287, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6598, resource id: 14680289, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6599, resource id: 14680275, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6602, resource id: 14680279, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6603, resource id: 14680281, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6604, resource id: 14680283, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6605, resource id: 14680285, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6606, resource id: 14680287, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6607, resource id: 14680289, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6608, resource id: 14680275, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6609, resource id: 14680277, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6630, resource id: 14680279, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6631, resource id: 14680281, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6632, resource id: 14680283, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6633, resource id: 14680285, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6634, resource id: 14680287, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6635, resource id: 14680289, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6636, resource id: 14680275, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6637, resource id: 14680277, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6639, resource id: 14680279, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6640, resource id: 14680281, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6641, resource id: 14680283, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6642, resource id: 14680285, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6643, resource id: 14680287, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6644, resource id: 14680289, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6645, resource id: 14680275, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6646, resource id: 14680277, major code: 14 (GetGeometry), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 6767, resource id: 71303376, major code: 18 (ChangeProperty), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 6771, resource id: 71303380, major code: 18 (ChangeProperty), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 10807, resource id: 14680291, major code: 20 (GetProperty), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 10814, resource id: 14680291, major code: 15 (QueryTree), minor code: 0
kwin_core: XCB error: 152 (BadDamage), sequence: 11006, resource id: 75497587, major code: 143 (DAMAGE), minor code: 3 (Subtract)










And from KDE Crash Handler:


Application: KWin (kwin_x11), signal: Segmentation fault

[KCrash Handler]
#4  0x00007f1625a5a9a0 in KWin::Toplevel::isOnOutput(KWin::AbstractOutput*) const () at /usr/lib/libkwin.so.5
#5  0x00007f1625a957fe in KWin::Workspace::activeOutput() const () at /usr/lib/libkwin.so.5
#6  0x00007f1625aa31b0 in KWin::X11Client::manage(unsigned int, bool) () at /usr/lib/libkwin.so.5
#7  0x00007f1625a88826 in KWin::Workspace::createClient(unsigned int, bool) () at /usr/lib/libkwin.so.5
#8  0x00007f16259bc3ae in KWin::Workspace::workspaceEvent(xcb_generic_event_t*) () at /usr/lib/libkwin.so.5
#9  0x00007f162409aa07 in QAbstractEventDispatcher::filterNativeEvent(QByteArray const&, void*, long*) () at /usr/lib/libQt5Core.so.5
#10 0x00007f161df6bb89 in QXcbConnection::handleXcbEvent(xcb_generic_event_t*) () at /usr/lib/libQt5XcbQpa.so.5
#11 0x00007f161df6fd5c in QXcbConnection::processXcbEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5XcbQpa.so.5
#12 0x00007f161df92f92 in  () at /usr/lib/libQt5XcbQpa.so.5
#13 0x00007f162409c39b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#14 0x00007f16240a7ad7 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#15 0x000055ef9d050e8c in  ()
#16 0x00007f1622fc2310 in __libc_start_call_main () at /usr/lib/libc.so.6
#17 0x00007f1622fc23c1 in __libc_start_main_impl () at /usr/lib/libc.so.6
#18 0x000055ef9d052225 in  ()
[Inferior 1 (process 1885828) detached]
Comment 15 Bruno Friedmann 2022-04-12 07:34:07 UTC
Created attachment 148115 [details]
New crash information added by DrKonqi

kwin_x11 (5.24.4) using Qt 5.15.2

- What I was doing when the application crashed:
With a setup of two screen attached and linked by dp port, if you poweroff poweron too quickly one or both monitor you get a crash.
Happen 75% of the time. If you do the power on/off slowly (2-4 seconds) kwin doesn't crash.

-- Backtrace (Reduced):
#6  0x00007f577d29c5bc in KWin::Toplevel::isOnOutput(KWin::AbstractOutput*) const (this=0x56137d1c4990, output=0x56137c2c9890) at /usr/src/debug/kwin5-5.24.4-1.1.x86_64/src/toplevel.cpp:423
#7  0x00007f577d2d4b49 in KWin::Workspace::activeOutput() const (this=0x56137c07c6c0) at /usr/src/debug/kwin5-5.24.4-1.1.x86_64/src/workspace.cpp:2419
#8  0x00007f577d2e1c7f in KWin::X11Client::manage(unsigned int, bool) (this=0x56137c50d6c0, w=<optimized out>, isMapped=<optimized out>) at /usr/src/debug/kwin5-5.24.4-1.1.x86_64/src/workspace.h:811
#9  0x00007f577d2c7863 in KWin::Workspace::createClient(unsigned int, bool) (this=0x56137c07c6c0, w=37749316, is_mapped=<optimized out>) at /usr/src/debug/kwin5-5.24.4-1.1.x86_64/src/workspace.cpp:654
#10 0x00007f577d1ffb4d in KWin::Workspace::workspaceEvent(xcb_generic_event_t*) (this=0x56137c07c6c0, e=0x7f5770008fd0) at /usr/src/debug/kwin5-5.24.4-1.1.x86_64/src/events.cpp:223
Comment 16 Nate Graham 2022-04-12 15:55:49 UTC
This crash is the same as the one in Bug 448064, so let's track it there.

*** This bug has been marked as a duplicate of bug 448064 ***
Comment 17 Dick Tracey 2023-10-25 17:14:03 UTC
I haven't been able to reproduce this bug on Wayland.

(Unfortunately, Wayland isn't a viable workaround at the moment, because kwin_wayland+nvidia has its own set of more serious problems: on wake up, the screen glitches+flickers, kwin_wayland --replace fixes it but all apps are closed & all unsaved data is lost...)
Comment 18 Dick Tracey 2023-10-25 17:16:49 UTC
Can we open this bug? This is still happening on kwin-5.27.9 with qt5-base-5.15.11+kde+r138
Comment 19 Nate Graham 2023-10-26 21:16:12 UTC
This is a fairly old bug report and the code has changed a lot since you reported it. There's a very good chance the issue you're now experiencing is caused by something else, even if the outward symptoms look and feel the same as the original issue. Can you please submit a new bug report? Thank you!
Comment 20 Nate Graham 2023-10-26 21:16:38 UTC
Also, remember to submit one bug report per issue, rather than lumping everything into a single bug report. Thanks again!