Bug 435388 - kwin_wayland crashes on output hotplugging while session inactive
Summary: kwin_wayland crashes on output hotplugging while session inactive
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: git master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-05 16:19 UTC by Janet Blackquill
Modified: 2021-04-05 19:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.21.4


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janet Blackquill 2021-04-05 16:19:48 UTC
one way to reproduce:

switch to TTY
unplug output
replug output (for me power cycling causes kwin to think that the output was unplugged and replugged)
switch back to session
crash
Comment 1 Janet Blackquill 2021-04-05 16:24:44 UTC
i have an MR for this: https://invent.kde.org/plasma/kwin/-/merge_requests/828

though vlad says that this codepath shouldn't be triggering at all when the session is inactive
Comment 2 Janet Blackquill 2021-04-05 19:13:27 UTC
Git commit 991aa206d970112b576d3d328b541213799066b3 by Jan Blackquill.
Committed on 05/04/2021 at 19:12.
Pushed by cblack into branch 'Plasma/5.21'.

Fix crash on hotplugging displays while switched to another TTY

Currently, we inhibit renderloops when switching to another TTY, and unhibit
when switching back. When we hotplug a display while switched to another TTY,
its renderloop isn't inhibited by default, yet when we switch back, we try
to uninhibit the fresh renderloop, which triggers an assert.

Inhibiting newly created outputs while switched to another TTY fixes this crash.
FIXED-IN: 5.21

M  +4    -0    plugins/platforms/drm/drm_backend.cpp

https://invent.kde.org/plasma/kwin/commit/991aa206d970112b576d3d328b541213799066b3
Comment 3 Janet Blackquill 2021-04-05 19:13:47 UTC
Git commit 9f215a06fa9c436034b368a1be5f357e85b03cd1 by Jan Blackquill.
Committed on 05/04/2021 at 19:08.
Pushed by cblack into branch 'master'.

Fix crash on hotplugging displays while switched to another TTY

Currently, we inhibit renderloops when switching to another TTY, and unhibit
when switching back. When we hotplug a display while switched to another TTY,
its renderloop isn't inhibited by default, yet when we switch back, we try
to uninhibit the fresh renderloop, which triggers an assert.

Inhibiting newly created outputs while switched to another TTY fixes this crash.
FIXED-IN: 5.21

M  +4    -0    src/plugins/platforms/drm/drm_backend.cpp

https://invent.kde.org/plasma/kwin/commit/9f215a06fa9c436034b368a1be5f357e85b03cd1