https://bugs.kde.org/show_bug.cgi?id=527737

            Bug ID: 527737
           Summary: Stored lid-closed output setups can keep the internal
                    panel enabled, so windows end up on the closed laptop
                    screen
    Classification: Plasma
           Product: kwin
      Version First 6.8.1
       Reported In:
          Platform: EndeavourOS
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: multi-screen
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 197602
  --> https://bugs.kde.org/attachment.cgi?id=197602&action=edit
Original kwinoutputconfig.json before manual fix (contains 8 lid-closed setups
with eDP-1 enabled)

KWin stores a separate output setup for "lid closed" in
~/.config/kwinoutputconfig.json.
On my system, several of those lid-closed setups have the internal panel
(eDP-1) enabled,
with the external monitor shifted to the right (e.g. x=1280).

When I close the lid with such an external monitor connected, KWin applies that
stored setup:
the external monitor moves, the closed internal panel keeps part of the
desktop, and my windows
"disappear" (they are on the invisible internal screen). Opening the lid
slightly brings them back.

Lid-open setup for this pair: eDP-1 disabled, external (DP-3, LG 3440x1440) at
0,0.
Stored lid-closed setup for the same pair: eDP-1 enabled at 0,0, DP-3 at
1280,0.

I found 8 such inconsistent lid-closed setups (several monitors, HDMI and DP).
I don't know how they
were created, probably by older Plasma versions or by changing the display
configuration while the
lid was closed. Fixing them requires either applying a configuration while the
lid is closed
(e.g. with kscreen-doctor and a delay) or editing the JSON file by hand. There
is no way to clean
old setups from the GUI.

STEPS TO REPRODUCE
1. Have a stored lid-closed setup where the internal panel is enabled together
with an external
   monitor (as found in the attached kwinoutputconfig.json).
2. Connect that external monitor and disable the internal panel with the lid
open.
3. Close the lid.

OBSERVED RESULT
The stored lid-closed setup is applied: the internal panel is considered
enabled while closed,
the external monitor is moved, and windows are placed on the closed internal
panel.

EXPECTED RESULT
While the lid is closed and at least one external output is enabled, KWin
should never enable the
internal panel, whatever is stored in the lid-closed setup (or it should
sanitize such setups).

SUGGESTIONS
- Ignore/sanitize the internal panel's "enabled" state in lid-closed setups
when an external
  output is present.
- Optionally, a GUI option to forget stored setups of monitors that are no
longer used.

SOFTWARE/OS VERSIONS
Linux: Arch Linux / EndeavourOS, kernel 7.2.x, Wayland session
KDE Plasma: 6.8.1 (KWin 6.8.1)
KDE Frameworks: 6.31
Qt: 6.12

ADDITIONAL INFORMATION
Laptop: Lenovo, Intel Iris Xe (i915) + NVIDIA MX550 (nvidia-open), external
monitor on the Intel
GPU (DP-3). The original kwinoutputconfig.json (before my manual fix) is
attached.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to