Bug 475146 - System freezes after opening laptop lid
Summary: System freezes after opening laptop lid
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: master
Platform: Other Linux
: NOR grave
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6, regression
Depends on:
Blocks:
 
Reported: 2023-10-02 19:26 UTC by Nicolas Fella
Modified: 2023-11-17 23:05 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Backtrace of kwin_wayland during the freeze (98.85 KB, text/plain)
2023-10-02 19:30 UTC, Nicolas Fella
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Fella 2023-10-02 19:26:52 UTC
STEPS TO REPRODUCE
1. Plug external HDMI monitor into laptop 
2. Disable internal laptop screen in KScreen KCM
3. Close laptop lid
4. Open lid again

OBSERVED RESULT
All UI is frozen, no cursor movement etc. SSH connection works. I assume kwin_wayland is frozen

EXPECTED RESULT
Normal UI

SOFTWARE/OS VERSIONS
KDE Plasma Version: master, kwin e74baf8b6fbc9fd12825a9120e0ebc770dedde8c
KDE Frameworks Version: master
Qt Version: 6.6

ADDITIONAL INFORMATION

This does not happen on Plasma 5.27
Comment 1 Nicolas Fella 2023-10-02 19:27:40 UTC
journal output from around the time it froze:

Oct 02 21:21:44 fedora.fritz.box kded6[2267]: xsettingsd: Reloading configuration
Oct 02 21:21:44 fedora.fritz.box kded6[2267]: xsettingsd: Loaded 14 settings from /home/nico/.config/xsettingsd/xsettingsd.conf
Oct 02 21:21:44 fedora.fritz.box kded6[2197]: g_settings_set_value: key 'scaling-factor' in 'org.gnome.desktop.interface' expects type 'u', but a GVariant of type 'i' was given
Oct 02 21:21:44 fedora.fritz.box kded6[2267]: xsettingsd: Reloading configuration
Oct 02 21:21:44 fedora.fritz.box kded6[2267]: xsettingsd: Loaded 14 settings from /home/nico/.config/xsettingsd/xsettingsd.conf
Oct 02 21:21:44 fedora.fritz.box org_kde_powerdevil[2275]: screens QList(0x1f96d00)
Oct 02 21:21:44 fedora.fritz.box kcminit[4044]: Could not find "kcm_fonts"
Oct 02 21:21:44 fedora.fritz.box kcminit[4048]: Could not find "kcm_fonts"
Oct 02 21:21:44 fedora.fritz.box kcminit[4046]: Could not find "kcm_fonts"
Oct 02 21:21:44 fedora.fritz.box kcminit[4047]: Could not find "kcm_fonts"
Oct 02 21:21:44 fedora.fritz.box kcminit[4046]: Could not find "kcm_style"
Oct 02 21:21:44 fedora.fritz.box kcminit[4048]: Could not find "kcm_style"
Oct 02 21:21:44 fedora.fritz.box kcminit[4047]: Could not find "kcm_style"
Oct 02 21:21:44 fedora.fritz.box kcminit[4044]: Could not find "kcm_style"
Oct 02 21:21:44 fedora.fritz.box kcminit[4045]: Could not find "kcm_fonts"
Oct 02 21:21:44 fedora.fritz.box kcminit[4045]: Could not find "kcm_style"
Oct 02 21:21:45 fedora.fritz.box kcminit[4050]: Could not find "kcm_fonts"
Oct 02 21:21:45 fedora.fritz.box kcminit[4051]: Could not find "kcm_fonts"
Oct 02 21:21:45 fedora.fritz.box kcminit[4050]: Could not find "kcm_style"
Oct 02 21:21:45 fedora.fritz.box kcminit[4051]: Could not find "kcm_style"
Oct 02 21:21:45 fedora.fritz.box org_kde_powerdevil[2275]: screens QList(0x1f96d00)
Oct 02 21:21:45 fedora.fritz.box org_kde_powerdevil[2275]: screens QList(0x1f96d00)
Oct 02 21:21:45 fedora.fritz.box kcminit[4082]: Could not find "kcm_fonts"
Oct 02 21:21:45 fedora.fritz.box kcminit[4082]: Could not find "kcm_style"
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Reloading configuration
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Loaded 14 settings from /home/nico/.config/xsettingsd/xsettingsd.conf
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Reloading configuration
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Loaded 14 settings from /home/nico/.config/xsettingsd/xsettingsd.conf
Oct 02 21:21:45 fedora.fritz.box kcminit[4099]: Could not find "kcm_fonts"
Oct 02 21:21:45 fedora.fritz.box kcminit[4098]: Could not find "kcm_fonts"
Oct 02 21:21:45 fedora.fritz.box kcminit[4098]: Could not find "kcm_style"
Oct 02 21:21:45 fedora.fritz.box kcminit[4099]: Could not find "kcm_style"
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Reloading configuration
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Loaded 14 settings from /home/nico/.config/xsettingsd/xsettingsd.conf
Oct 02 21:21:45 fedora.fritz.box kded6[2197]: g_settings_set_value: key 'scaling-factor' in 'org.gnome.desktop.interface' expects type 'u', but a GVariant of type 'i' was given
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Reloading configuration
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Loaded 14 settings from /home/nico/.config/xsettingsd/xsettingsd.conf
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Reloading configuration
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Loaded 14 settings from /home/nico/.config/xsettingsd/xsettingsd.conf
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Reloading configuration
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Loaded 14 settings from /home/nico/.config/xsettingsd/xsettingsd.conf
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Reloading configuration
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Loaded 14 settings from /home/nico/.config/xsettingsd/xsettingsd.conf
Oct 02 21:21:45 fedora.fritz.box kded6[2197]: g_settings_set_value: key 'scaling-factor' in 'org.gnome.desktop.interface' expects type 'u', but a GVariant of type 'i' was given
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Reloading configuration
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Loaded 14 settings from /home/nico/.config/xsettingsd/xsettingsd.conf
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Reloading configuration
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Loaded 14 settings from /home/nico/.config/xsettingsd/xsettingsd.conf
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Reloading configuration
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Loaded 14 settings from /home/nico/.config/xsettingsd/xsettingsd.conf
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Reloading configuration
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Loaded 14 settings from /home/nico/.config/xsettingsd/xsettingsd.conf
Oct 02 21:21:45 fedora.fritz.box kded6[2197]: g_settings_set_value: key 'scaling-factor' in 'org.gnome.desktop.interface' expects type 'u', but a GVariant of type 'i' was given
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Reloading configuration
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Loaded 14 settings from /home/nico/.config/xsettingsd/xsettingsd.conf
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Reloading configuration
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Loaded 14 settings from /home/nico/.config/xsettingsd/xsettingsd.conf
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Reloading configuration
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Loaded 14 settings from /home/nico/.config/xsettingsd/xsettingsd.conf
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Reloading configuration
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Loaded 14 settings from /home/nico/.config/xsettingsd/xsettingsd.conf
Oct 02 21:21:45 fedora.fritz.box kded6[2197]: g_settings_set_value: key 'scaling-factor' in 'org.gnome.desktop.interface' expects type 'u', but a GVariant of type 'i' was given
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Reloading configuration
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Loaded 14 settings from /home/nico/.config/xsettingsd/xsettingsd.conf
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Reloading configuration
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Loaded 14 settings from /home/nico/.config/xsettingsd/xsettingsd.conf
Oct 02 21:21:45 fedora.fritz.box plasmashell[2230]: file:///home/nico/kde/usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/PreviewBanner.qml:13:5: QML PreviewBanner: Binding loop detected for property "width"
Oct 02 21:21:45 fedora.fritz.box plasmashell[2230]: file:///home/nico/kde/usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/PreviewBanner.qml:13:5: QML PreviewBanner: Binding loop detected for property "width"
Oct 02 21:21:45 fedora.fritz.box kwin_wayland_wrapper[2022]: amdgpu: amdgpu_cs_ctx_create2 failed. (-13)
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: OpenGL vendor string:                   AMD
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: OpenGL renderer string:                 AMD Radeon Graphics (rembrandt, LLVM 16.0.6, DRM 3.54, 6.5.5-200.fc38.x86_64)
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: OpenGL version string:                  4.6 (Core Profile) Mesa 23.1.8
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: OpenGL shading language version string: 4.60
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: Driver:                                 Unknown
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: GPU class:                              Unknown
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: OpenGL version:                         4.6
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: GLSL version:                           4.60
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: Mesa version:                           23.1.8
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: Requires strict binding:                no
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: Virtual Machine:                        no
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: Timer query support:                    yes
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Reloading configuration
Oct 02 21:21:45 fedora.fritz.box kded6[2267]: xsettingsd: Loaded 14 settings from /home/nico/.config/xsettingsd/xsettingsd.conf
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: kf.coreaddons: The plugin "/home/nico/kde/usr/plugins/kwin/effects/plugins/mobiletaskswitcher.so" explicitly states an 'Id' in the embedded metadata. This value should be removed, the resulting pluginId will not be affected by it
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: BlurConfig::instance called after the first use - ignoring
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: KscreenConfig::instance called after the first use - ignoring
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: OverviewConfig::instance called after the first use - ignoring
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: SlideConfig::instance called after the first use - ignoring
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: SlidingPopupsConfig::instance called after the first use - ignoring
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: WindowViewConfig::instance called after the first use - ignoring
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: ZoomConfig::instance called after the first use - ignoring
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: kwin_scripting: /usr/share/kwin/effects/kwin4_effect_dialogparent/contents/code/main.js:140: error: Cannot call method 'connect' of undefined
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: kwin_scripting: /usr/share/kwin/effects/kwin4_effect_frozenapp/contents/code/main.js:108: error: Cannot call method 'connect' of undefined
Oct 02 21:21:45 fedora.fritz.box kwin_wayland_wrapper[2022]: amdgpu: amdgpu_cs_ctx_create2 failed. (-13)
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: OpenGL vendor string:                   AMD
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: OpenGL renderer string:                 AMD Radeon Graphics (rembrandt, LLVM 16.0.6, DRM 3.54, 6.5.5-200.fc38.x86_64)
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: OpenGL version string:                  4.6 (Core Profile) Mesa 23.1.8
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: OpenGL shading language version string: 4.60
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: Driver:                                 Unknown
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: GPU class:                              Unknown
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: OpenGL version:                         4.6
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: GLSL version:                           4.60
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: Mesa version:                           23.1.8
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: Requires strict binding:                no
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: Virtual Machine:                        no
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: Timer query support:                    yes
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: kf.coreaddons: The plugin "/home/nico/kde/usr/plugins/kwin/effects/plugins/mobiletaskswitcher.so" explicitly states an 'Id' in the embedded metadata. This value should be removed, the resulting pluginId will not be affected by it
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: BlurConfig::instance called after the first use - ignoring
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: KscreenConfig::instance called after the first use - ignoring
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: OverviewConfig::instance called after the first use - ignoring
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: SlideConfig::instance called after the first use - ignoring
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: SlidingPopupsConfig::instance called after the first use - ignoring
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: WindowViewConfig::instance called after the first use - ignoring
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: ZoomConfig::instance called after the first use - ignoring
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: kwin_scripting: /usr/share/kwin/effects/kwin4_effect_dialogparent/contents/code/main.js:140: error: Cannot call method 'connect' of undefined
Oct 02 21:21:45 fedora.fritz.box kwin_wayland[2022]: kwin_scripting: /usr/share/kwin/effects/kwin4_effect_frozenapp/contents/code/main.js:108: error: Cannot call method 'connect' of undefined
Oct 02 21:21:46 fedora.fritz.box plasma_waitforname[2866]: org.kde.knotifications: WaitForName: Service was not registered within timeout
Oct 02 21:21:46 fedora.fritz.box systemd[1778]: dbus-:1.2-org.kde.KSplash@1.service: Main process exited, code=exited, status=1/FAILURE
Oct 02 21:21:46 fedora.fritz.box systemd[1778]: dbus-:1.2-org.kde.KSplash@1.service: Failed with result 'exit-code'.
Comment 2 Nicolas Fella 2023-10-02 19:30:33 UTC
Created attachment 162032 [details]
Backtrace of kwin_wayland during the freeze
Comment 3 Nate Graham 2023-10-07 02:36:59 UTC
Can reproduce even when no external screens are involved.
Comment 4 Nate Graham 2023-10-10 13:44:24 UTC
This is causing me to lose work; bumping to critical.
Comment 5 Nicolas Fella 2023-10-10 13:49:05 UTC
My bug does *not* happen unless there's an external screen and the internal one is disabled, so chances are you have a different root cause. Please file a separate bug
Comment 6 Zamundaaa 2023-10-27 14:03:05 UTC
Can't reproduce with current git master; closing and opening the lid causes a very small pause (one or two frames) each time, but that's all it does.

Closing and opening the lid without an external monitor connected also works correctly for me (at least as far as KWin's concerned; plasmashell reliably crashes)
Comment 7 Nate Graham 2023-10-27 14:04:30 UTC
It may be related to the plasmashell crash, and how drkonqi handles it. Kai has been investigating that and found that if he deletes the `drkonqi` binary it stops happening.
Comment 8 Zamundaaa 2023-11-09 11:42:52 UTC
Git commit c1312a555169c801b2c116a7b333443730092e07 by Xaver Hugl.
Committed on 09/11/2023 at 12:35.
Pushed by zamundaaa into branch 'master'.

backends/drm: fix pageflip events getting lost when outputs get turned off

When a display gets turned off while a pageflip event was still pending, the pending
state gets changed immediately, without waiting for the pageflip event to arrive first.
When this happens, activePending() returns false, and so the pageflip event gets discarded.
This commit changes the logic to only check for activePending() when the pageflip is for a
modeset, avoiding that issue.
Related: bug 476340, bug 476341, bug 476342, bug 437520

M  +10   -2    src/backends/drm/drm_commit.cpp
M  +2    -0    src/backends/drm/drm_commit.h
M  +5    -2    src/backends/drm/drm_pipeline.cpp
M  +2    -1    src/backends/drm/drm_pipeline.h

https://invent.kde.org/plasma/kwin/-/commit/c1312a555169c801b2c116a7b333443730092e07