Bug 1943522

Summary: kwin_wayland crashes when no monitors are connected
Product: [Fedora] Fedora Reporter: Piotr Piotrowski <ppp5>
Component: kwinAssignee: Daniel Vrátil <me>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 34CC: amessina, extras-qa, jgrulich, kde-sig, me, rdieter, than, trekrek
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: 1705121 Environment:
Last Closed: 2022-06-07 23:53:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Piotr Piotrowski 2021-03-26 10:40:11 UTC
Since Fedora 34 is making Wayland for KDE sessions default, this bugs started to affect Fedora 34 KDE spin.

Steps to reproduce:
1. Boot a desktop machine from the Fedora 34 beta KDE spin USB stick.
2. Wait for 10 minutes for the attached monitor to enter power save mode.
3. kwin_wayland will crash.

I have been waiting long for KDE to use Wayland on Fedora by default, but this is a stopper for me.

+++ This bug was initially created as a clone of Bug #1705121 +++

Description of problem:
Whenever the system has no connected monitor kwin_wayland segfaults. For example it is triggered when:
- all the monitors are plugged off
- the existing monitors are put into sleep mode by plasma
- the monitors are turned off (this is not reproducible with all my monitors just with one)

If you have two or more monitors applying the previous steps to all but one monitor does not lead to the crash.

Version-Release number of selected component (if applicable): 5.15.4


How reproducible: always


Steps to Reproduce:
1. Start a wayland plasma session
2. Unplug all the monitors
3. Plug back at least one monitor

Actual results: kwin segfaults and you are greeted with a black screen. The system is also not in a recoverable state (can't access any tty to restart plasma or take any action) the only option is to forcefully reboot it.


Expected results: kwin should not segfault


Additional info: 
Mesa 19.0.3-1
Plasma 5.15.4
KF5 5.57.0-2 (but reproducible also with 5.55 which is the current stable)
kernel 5.0.9-301
wayland 1.17.0-1

Graphic card: AMD Radeon RX 580

The attached systemd logs were reproduced with a single monitor which has then been unplugged leading to the segfault (note the part that says "requesting unexisting screen -1"):

May 01 16:14:27 localhost.localdomain kernel: Code: 00 00 d0 ef 05 4e 7f 7f 00 00 80 eb 05 4e 7f 7f 00 00 40 eb 05 4e 7f 7f 00 00 00 00 00 00 00 00 00 00 51 00 00 00 00 00 00 00 <c0> 6b f1 90 58 55 00 00 00 00 00 00 00 00 00 00 00 12 4c 91 58 55
May 01 16:14:27 localhost.localdomain kernel: kwin_wayland[1884]: segfault at 555891595120 ip 0000555891595120 sp 00007ffc72288f98 error 15
May 01 16:14:27 localhost.localdomain audit[1884]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=1 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 pid=1884 comm="kwin_wayland" exe="/usr/bin/kwin_wayland" sig=11 res=1
May 01 16:14:27 localhost.localdomain plasmashell[2063]: requesting unexisting screen -1
May 01 16:14:27 localhost.localdomain plasmashell[2063]: file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Desktop.qml:146:19: QML Loader: Binding loop detected for property "height"
May 01 16:14:27 localhost.localdomain plasmashell[2063]: file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Desktop.qml:146:19: QML Loader: Binding loop detected for property "height"
May 01 16:14:27 localhost.localdomain plasmashell[2063]: trying to show an empty dialog
May 01 16:14:27 localhost.localdomain plasmashell[2063]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()

Let me know if you need anything else.
Thanks

--- Additional comment from Ben Cotton on 2020-04-30 22:10:36 UTC ---

This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

--- Additional comment from Ben Cotton on 2020-05-26 14:56:12 UTC ---

Fedora 30 changed to end-of-life (EOL) status on 2020-05-26. Fedora 30 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 1 Ben Cotton 2022-05-12 16:11:48 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '34'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 2 Ben Cotton 2022-06-07 23:53:55 UTC
Fedora Linux 34 entered end-of-life (EOL) status on 2022-06-07.

Fedora Linux 34 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release.

Thank you for reporting this bug and we are sorry it could not be fixed.