Bug 488111 - "Unifying output" with an external screen may lead to internal screen not working at all.
Summary: "Unifying output" with an external screen may lead to internal screen not wor...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 6.0.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen
Depends on:
Blocks:
 
Reported: 2024-06-06 13:50 UTC by Tobiáš Potoček
Modified: 2024-06-15 04:44 UTC (History)
2 users (show)

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


Attachments
Broken kwinoutputconfig.json (2.76 KB, application/json)
2024-06-06 13:50 UTC, Tobiáš Potoček
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobiáš Potoček 2024-06-06 13:50:59 UTC
Created attachment 170204 [details]
Broken kwinoutputconfig.json

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
Selecting "unify outputs" when connecting an external screen to my laptop permanently disables the laptop screen, pretty much bricking the system.

STEPS TO REPRODUCE
1. Connect an external screen to a laptop
2. Select "unify outputs"

OBSERVED RESULT
1. The internal laptop screen goes black.
2. After disconnecting the screen, the screen stays black.
3. After hard-reset, the login screen shows up, but after sign in, it goes black again.
4. Under a different user, the screen works normally.

EXPECTED RESULT
"Unify output" actually unifies output. Both screens work, and after disconnection the internal laptop screen keeps working as usual.

HOW TO RECOVER
1. Find an external screen that works.
2. Create another user.
3. Sign into that user (the internal screen should work normally).
4. Remove .config/kwinoutputconfig.json from your main user home directory.

Note that it is necessary to go through that another user because if you delete the file directly, KDE will simply recreate it with the same content.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 40
KDE Plasma Version:  6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1

Using Wayland on Lenovo Thinkpad T14s with AMD Ryzen 7 PRO 7840U.

ADDITIONAL INFORMATION

This is very annoying problem because it pretty much bricks the system.

Not sure how I reproducible this is but in my current setup (the aforementioned laptop + a ThinkVision external screen connected via USB-C) I managed to reproduce it immediately on a new account.

I'm attaching kwinoutputconfig.json causing the issue.
Comment 1 Zamundaaa 2024-06-06 14:44:41 UTC

*** This bug has been marked as a duplicate of bug 481222 ***
Comment 2 Zamundaaa 2024-06-12 11:59:19 UTC
Git commit 35a7e30952c764a943a84a032715be8baee9d9ca by Xaver Hugl.
Committed on 12/06/2024 at 11:50.
Pushed by zamundaaa into branch 'master'.

backends/drm: set scaling mode to full aspect with generated modes on internal displays

While the scaling mode has caused some issues with external displays, we've had several
reports that using "unify outputs" has caused the internal display to no longer show
anything, as it changes to an unsupported mode. This sets the scaling mode so that the
driver handles the scaling internally, instead of leaving it up to the panel, and it only
does so on internal displays with generated modes, to minimize the risk of further breakage.

M  +6    -2    src/backends/drm/drm_pipeline.cpp

https://invent.kde.org/plasma/kwin/-/commit/35a7e30952c764a943a84a032715be8baee9d9ca
Comment 3 Zamundaaa 2024-06-12 12:30:12 UTC
Git commit daf4d58276575e139a5a2841c004f66cd308e727 by Xaver Hugl.
Committed on 12/06/2024 at 12:12.
Pushed by zamundaaa into branch 'Plasma/6.1'.

backends/drm: set scaling mode to full aspect with generated modes on internal displays

While the scaling mode has caused some issues with external displays, we've had several
reports that using "unify outputs" has caused the internal display to no longer show
anything, as it changes to an unsupported mode. This sets the scaling mode so that the
driver handles the scaling internally, instead of leaving it up to the panel, and it only
does so on internal displays with generated modes, to minimize the risk of further breakage.


(cherry picked from commit 35a7e30952c764a943a84a032715be8baee9d9ca)

Co-authored-by: Xaver Hugl <xaver.hugl@gmail.com>

M  +6    -2    src/backends/drm/drm_pipeline.cpp

https://invent.kde.org/plasma/kwin/-/commit/daf4d58276575e139a5a2841c004f66cd308e727
Comment 4 Tobiáš Potoček 2024-06-12 12:43:58 UTC
Thanks a lot for the quick response ❤️