Bug 459253 - External screen mode is set to "clone" after every login or screen locking
Summary: External screen mode is set to "clone" after every login or screen locking
Status: RESOLVED FIXED
Alias: None
Product: KScreen
Classification: Plasma
Component: common (show other bugs)
Version: 5.25.90
Platform: Arch Linux Linux
: HI major
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords: regression
: 459431 459473 459562 459720 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-09-17 06:50 UTC by Matej Mrenica
Modified: 2023-01-23 17:24 UTC (History)
12 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matej Mrenica 2022-09-17 06:50:41 UTC
SUMMARY
I have two screens, the laptop one and an external monitor. I always use them in "external monitor only" mode. Every time I log in, only the external monitor turns on. At least that is how it worked before Plasma 5.26 Beta. Now every time I log in It  starts as "clone screens" an I have to switch it back. Secondly if I lock my screen and leave my computer for a while it also switches to "clone screens". If I unplug the cable and plug it back in it also switches to "clone screens" mode.
Comment 1 galder 2022-09-17 13:39:19 UTC
Hello,
when say "external monitor only",  are you referring to disable the laptop monitor in the kscreen menu?

I have tested  in 5.25.90 x11, it looks like a regression.. once log out and log in, the laptop screen is on again with enable option to true.

I could not test it yet in Wayland.

Regards
Comment 2 Matej Mrenica 2022-09-17 13:43:37 UTC
(In reply to galder from comment #1)
> Hello,
> when say "external monitor only",  are you referring to disable the laptop
> monitor in the kscreen menu?
> 
> I have tested  in 5.25.90 x11, it looks like a regression.. once log out and
> log in, the laptop screen is on again with enable option to true.
> 
> I could not test it yet in Wayland.
> 
> Regards

I am selecting the external monitor in the screen menu you can open with Meta+P (or fn+F9?) and choosing the first option "Switch to external screen".
Comment 3 galder 2022-09-17 14:13:57 UTC
good to know :),
I think is the same as disable the screen manually.

definitively is not keeping the settings as in 5.25.5. The screen also gets activated for me after I connect  and disconnect the external one.
Comment 4 Nate Graham 2022-09-23 02:24:10 UTC
*** Bug 459473 has been marked as a duplicate of this bug. ***
Comment 5 Nate Graham 2022-09-23 13:46:59 UTC
*** Bug 459562 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2022-09-23 21:39:11 UTC
*** Bug 459562 has been marked as a duplicate of this bug. ***
Comment 7 Bug Janitor Service 2022-09-24 22:16:01 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kscreen/-/merge_requests/139
Comment 8 Zamundaaa 2022-09-24 22:19:31 UTC
*** Bug 459431 has been marked as a duplicate of this bug. ***
Comment 9 Zamundaaa 2022-09-26 15:46:20 UTC
Git commit 8d275814c5b0054c29916ff374771edfa67217d2 by Xaver Hugl.
Committed on 26/09/2022 at 15:44.
Pushed by zamundaaa into branch 'master'.

Revert "when loading defaults don't forget to set enablement"

This reverts commit 30376403493ea32e0782cff6b7be5a5fed571f49 because it overwrites
enablement for all connected outputs

M  +0    -1    kded/output.cpp

https://invent.kde.org/plasma/kscreen/commit/8d275814c5b0054c29916ff374771edfa67217d2
Comment 10 Zamundaaa 2022-09-26 15:47:00 UTC
Git commit ed95ce556fb965f998d2d9b805c1ec68b89e16d9 by Xaver Hugl.
Committed on 26/09/2022 at 15:46.
Pushed by zamundaaa into branch 'Plasma/5.26'.

Revert "when loading defaults don't forget to set enablement"

This reverts commit 30376403493ea32e0782cff6b7be5a5fed571f49 because it overwrites
enablement for all connected outputs


(cherry picked from commit 8d275814c5b0054c29916ff374771edfa67217d2)

M  +0    -1    kded/output.cpp

https://invent.kde.org/plasma/kscreen/commit/ed95ce556fb965f998d2d9b805c1ec68b89e16d9
Comment 11 Vlad Zahorodnii 2022-09-28 08:08:19 UTC
*** Bug 459720 has been marked as a duplicate of this bug. ***
Comment 12 Iyán Méndez Veiga 2022-09-29 09:34:22 UTC
Matej Mrenica, did you try the patch? Did it solve the issue for you?
Comment 13 Matej Mrenica 2022-09-29 09:41:16 UTC
(In reply to Iyán Méndez Veiga from comment #12)
> Matej Mrenica, did you try the patch? Did it solve the issue for you?

I wanted to, but I got errors when building the source so I didn't go further.
Did you try it?
Comment 14 Iyán Méndez Veiga 2022-09-29 10:42:01 UTC
I tried the patch but I didn't have the exact same issue as you, so that's why I asked you. In my case, after applying the patch, I still observe that if my laptop is suspended and I attach it to a docking station both screens turn on and in clone mode, while with 5.25, the laptop's screen would remain off and only the external screen would turn on.
Comment 15 miranda 2022-10-01 20:36:40 UTC
Reporter of 459720 here. I installed an upstream versions of libkscreen and kscreen, which has the aforementioned merge request, and the buggy behavior I was seeing when turning on my TV is fixed! All that's left is a separate display issue when I first open a window, but I'll save that for another bug report. Thanks.
Comment 16 galder 2022-10-01 21:31:24 UTC
Hello,
I have tested latest 5.26 branch and still the disabled screen
gets reset after I restart the session.

Regards
Comment 17 Nate Graham 2022-10-03 14:11:28 UTC
Matej, since you reported the issue, it would be really great if we could get a confirmation one way or the other about this patch. I can help you build it if you're having trouble; please feel free to ping me on Matrix.
Comment 18 Matej Mrenica 2022-10-03 15:30:33 UTC
(In reply to Nate Graham from comment #17)
> Matej, since you reported the issue, it would be really great if we could
> get a confirmation one way or the other about this patch. I can help you
> build it if you're having trouble; please feel free to ping me on Matrix.

I have posted to the KDE Development room.
Comment 19 Matej Mrenica 2022-10-03 16:23:10 UTC
I was able to test the new version successfully and the issue has been fixed.
Comment 20 Matej Mrenica 2022-10-03 16:25:50 UTC
(In reply to Matej Mrenica from comment #19)
> I was able to test the new version successfully and the issue has been fixed.

That said, when I logged in into Wayland my "do not disturb" mode was on because "Screen is mirrored" even though it was not.
Comment 21 Nate Graham 2022-10-04 09:10:33 UTC
Thank you so much! But it sounds like there is a remaining issue here. Can you please file a new bug report for that? and link it here? Thanks!
Comment 22 Matej Mrenica 2022-10-04 10:50:43 UTC
(In reply to Nate Graham from comment #21)
> Thank you so much! But it sounds like there is a remaining issue here. Can
> you please file a new bug report for that? and link it here? Thanks!

I will look into it.
Comment 23 galder 2022-10-05 08:02:59 UTC
Hello,
I just want to let you know that disabling one screen is working now. At least in x11. I believe before I didn't recompile kscreen.
Unfortunately I cant test it in Wayland as there are some problems in Kubuntu 22.04 and nvidia gpus.
Tested latest 5.26 branch.
I can relogin and the screen is disabled as in 5.25.5.

Regards
Galder
Comment 24 Matej Mrenica 2022-10-11 15:26:49 UTC
(In reply to Nate Graham from comment #21)
> Thank you so much! But it sounds like there is a remaining issue here. Can
> you please file a new bug report for that? and link it here? Thanks!

Sorry for the delay but here it is: https://bugs.kde.org/show_bug.cgi?id=460247
Comment 25 Rainer Klier 2022-10-12 12:39:52 UTC
hi,
it seems, that in KDE frameworks 5.26 the setting of external screens is not remembered/(re-)stored.
today i updated my opensuse tumbleweed system (notebook with nvidia graphics running X11) to latest available KDE framework 5 packages in version 5.26, and after reboot i noticed, that my external monitor was not enabled.
i could enable it in system settings, but after reboot, it is disabled again.
i also can enable it with the "Anzeige Einrichtung" Widget in "Systemabschnitt der Kontrollleiste", but after reboot/re-login it is disabled again.
the monitor is enabled for example at the system-login because i can see the user-login screen on both monitors, but when then KDE desktop starts after login, the external monitor gets disabled.
i think, this might be the issue, you are discussing here.
Comment 26 Nate Graham 2022-10-12 16:50:08 UTC
Can you please file a new bug report about that? Thanks!
Comment 27 Rainer Klier 2022-10-12 18:05:40 UTC
(In reply to Nate Graham from comment #26)
> Can you please file a new bug report about that? Thanks!

yes, ok, of course. will do.
i was just thinking, that a new bug report will anyhow be resolved as dublicate of this bug.
Comment 28 Nate Graham 2022-10-14 17:40:49 UTC
That bug should have just been fixed today for Plasma 5.26.1
Comment 29 Matej Mrenica 2023-01-21 08:51:39 UTC
This issue reappeared yesterday after the update to Plasma 5.27 Beta, do you recommend a new report or a reopen? Also anyone else has the same issue?
Comment 30 Matej Mrenica 2023-01-22 08:31:59 UTC
(In reply to Matej Mrenica from comment #29)
> This issue reappeared yesterday after the update to Plasma 5.27 Beta, do you
> recommend a new report or a reopen? Also anyone else has the same issue?

It looks like a different but similar issue, I will make a new report when I have more information.
Comment 31 Nate Graham 2023-01-23 17:24:44 UTC
New one, since the code has changed so much between 5.26 and 5.27 that it's almost certainly caused by something different.