Bug 466556 - Opening lid of laptop with external screen connected inappropriately disables laptop screen
Summary: Opening lid of laptop with external screen connected inappropriately disables...
Status: REPORTED
Alias: None
Product: KScreen
Classification: Plasma
Component: common (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-27 19:51 UTC by Nate Graham
Modified: 2024-02-16 16:29 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
What the KCM shows (312.44 KB, image/png)
2023-02-28 19:25 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2023-02-27 19:51:07 UTC
Current git master from today. 100% reproducible for me.


STEPS TO REPRODUCE
1. Plug in external HDMI screen to laptop, either director or through Thunderbolt dock (makes no difference)
2. Position external screen above laptop screen, offset to the left about 50%
3. Close laptop lid such that screen locks and computer goes to sleep
4. wait 5 seconds
5. Open laptop lid to wake laptop and show the lock screen


OBSERVED RESULT
Only external screen is enabled. Laptop screen has become disabled.

Sometimes I see the dreaded "the screen locker is broken" screen instead of the expected normal lock screen, but this part isn't 100% reproducible.


EXPECTED RESULT
Laptop screen remains enabled.


ADDITIONAL INFORMATION:
word-by-word diff of the `kscreen-o` output:
$ git diff --word-diff before\ closing\ lid.txt after\ opening\ lid.txt diff --git before closing lid.txt after opening lid.txt
index 8f4a15c..2deac80 100644
--- before closing lid.txt      
+++ after opening lid.txt       
@@ -1,5 +1,5 @@
Output: 1 eDP-1 [-enabled-]{+disabled+} connected priority [-1-]{+0+} Panel Modes: 0:3840x2160@60*! 1:1600x1200@60 2:1280x1024@60 3:1024x768@60 4:2560x1600@60 5:1920x1200@60 6:1280x800@60 7:3840x2160@60 8:3200x1800@60 9:2880x1620@60 10:2560x1440@60 11:1920x1080@60 12:1600x900@60 13:1368x768@60 14:1280x720@60 Geometry: 1163,1080 1920x1080 Scale: 2 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: Automatic
Output: 2 DP-1 enabled connected priority [-2-]{+1+} DisplayPort Modes: 0:1920x1080@60*! 1:1920x1080@60 2:1920x1080@60 3:1920x1080@50 4:1920x1080@50 5:1680x1050@60 6:1600x900@60 7:1280x1024@60 8:1440x900@60 9:1280x800@60 10:1280x720@60 11:1280x720@60 12:1280x720@60 13:1280x720@50 14:1280x720@50 15:1024x768@60 16:800x600@60 17:720x576@50 18:720x576@50 19:720x480@60 20:720x480@60 21:720x480@60 22:720x480@60 23:720x480@60 24:640x480@60 25:640x480@60 26:640x480@60 27:720x400@70 28:1280x1024@60 29:1024x768@60 30:1280x800@60 31:1920x1080@60 32:1600x900@60 33:1368x768@60 34:1280x720@60 Geometry: 0,0 1920x1080 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: Automatic
Comment 1 Marco Martin 2023-02-28 09:25:25 UTC
what does the kscreen kcm says (can you post a screenshot)? if the screen is enabled from there does it start to behave correctly afterwards?

maybe the first time you connected that external screen you inadvertitely chosen from the OSD to use only the external screen?
Comment 2 Nate Graham 2023-02-28 19:25:37 UTC
Created attachment 156836 [details]
What the KCM shows

Attaching a screenshot of the KCM. The KCM agrees with `kscreen-doctor -o` and also matches reality.

When I reproduce this bug, if I enable the laptop screen from the KCM, it becomes enabled as expected. But the old layout from before is not remembered; I need to manually mark the laptop screen as primary and move the external screen to its proper position.

> maybe the first time you connected that external screen you inadvertitely chosen from the OSD to use only the external screen?
Don't think so. The external screen is my only one and it's the one I regularly use to test multimonitor issues and patches.
Comment 3 Zamundaaa 2023-10-05 19:42:07 UTC
Git commit ae84480fbfdc684b8ee4b0207d3ce679f6fb4cd7 by Xaver Hugl.
Committed on 05/10/2023 at 20:29.
Pushed by zamundaaa into branch 'master'.

outputconfigurationstore: add new config system

Instead of an external service (like KScreen) storing and restoring output configurations,
with this commit KWin takes over that responsibility. This allows it to, among other things,
generate appropriate configs for new sets of outputs immediately, and take KWin-internal information
about outputs into account when generating them.
Related: bug 466208, bug 455082, bug 457430, bug 474021, bug 469653, bug 466342, bug 470863

M  +1    -0    CMakeLists.txt
M  +1    -0    autotests/integration/kwin_wayland_test.cpp
M  +1    -0    src/CMakeLists.txt
M  +5    -0    src/backends/drm/drm_output.cpp
M  +9    -0    src/core/output.cpp
M  +11   -0    src/core/output.h
M  +1    -0    src/core/outputconfiguration.h
M  +7    -0    src/main.cpp
M  +1    -0    src/main.h
M  +0    -4    src/main_wayland.cpp
M  +709  -20   src/outputconfigurationstore.cpp
M  +68   -4    src/outputconfigurationstore.h
M  +1    -0    src/utils/CMakeLists.txt
M  +8    -0    src/utils/edid.cpp
M  +8    -0    src/utils/edid.h
A  +54   -0    src/utils/orientationsensor.cpp     [License: GPL(v2.0+)]
A  +38   -0    src/utils/orientationsensor.h     [License: GPL(v2.0+)]
M  +34   -1    src/wayland/outputdevice_v2.cpp
M  +1    -0    src/wayland/outputdevice_v2.h
M  +12   -1    src/wayland/outputmanagement_v2.cpp
M  +49   -6    src/workspace.cpp
M  +2    -0    src/workspace.h

https://invent.kde.org/plasma/kwin/-/commit/ae84480fbfdc684b8ee4b0207d3ce679f6fb4cd7
Comment 4 marcin.marcin.m 2024-02-16 16:28:39 UTC
I'm affected by the same issue. This also happens when the laptop stays idle for a very long time.
Comment 5 marcin.marcin.m 2024-02-16 16:29:31 UTC
(I'm on kwin 5.27.10, for reference)