Bug 466020 - With multimonitor set-up (hidpi laptop + 2 displays with different sizes and resolutions via usb-c dock) one screen always has an invisible containment with a black background
Summary: With multimonitor set-up (hidpi laptop + 2 displays with different sizes and ...
Status: RESOLVED WORKSFORME
Alias: None
Product: plasmashell
Classification: Plasma
Component: Desktop Containment (show other bugs)
Version: 5.27.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: multiscreen
Depends on:
Blocks:
 
Reported: 2023-02-18 18:04 UTC by Jan
Modified: 2023-06-14 03:45 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
output ksreen-doctor -o + ksreen-console + cat ~/.config/plasma-org.kde.plasma.desktop-appletsrc (19.66 KB, text/plain)
2023-02-18 18:04 UTC, Jan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan 2023-02-18 18:04:37 UTC
Created attachment 156453 [details]
output ksreen-doctor -o + ksreen-console + cat ~/.config/plasma-org.kde.plasma.desktop-appletsrc

SUMMARY
***
I have 2 external monitors connected to my hdpi laptop via a usb-c docking station. If I am under wayland and I connect to the monitors one screen always stays black, but I can move my mouse and windows in it.

Interestingly the screen gets reactivated, when I lower the resolution of the dark monitor.

If I disconnect both monitors and replug them one at a time (in the usb-c dock) the first monitor to get plugged in works. The second stays dark.

In X11 it works.
***


STEPS TO REPRODUCE
1. Log into the wayland shell.
2. Connect the usb-c dock with the 2 monitors attached.


OBSERVED RESULT
One screen stays black.
If I lower the resolution it works.

EXPECTED RESULT
All screens should work with their native resolution.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 6.1.12-arch1-1 (64-bit)
(available in About System)
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
usb-c dock:
https://www.cablematters.com/pc-1295-126-usb-c-multiport-adapter-with-triple-displayport-pd.aspx
Comment 1 Nate Graham 2023-02-23 00:18:45 UTC
If you right-click on the black screen, what happens?
Comment 2 Jan 2023-02-23 11:11:07 UTC
(In reply to Nate Graham from comment #1)
> If you right-click on the black screen, what happens?

Nothing.

But during switching back and forth between wayland and x11 I noticed, that if I switch back from wayland to x11 I have to replug my docking station to get both monitors working.
Just in case this helps you. :)

When I switched to wayland and then replug my docking station nothing changes.
Comment 3 Nate Graham 2023-02-23 14:05:36 UTC
Ok, sounds like it has no desktop on it somehow. We had another report of this in Bug 466228, but the reporter says it's fixed in Plasma 5.27.1. Is that the case for you as well?

If not, can you find the missing desktop in the "Manage Desktops and Panels" window that's accessed from the global edit mode toolbar that drops down from the top of the screen when you enter edit mode?
Comment 4 Jan 2023-02-23 16:51:52 UTC
(In reply to Nate Graham from comment #3)
> Ok, sounds like it has no desktop on it somehow. We had another report of
> this in Bug 466228, but the reporter says it's fixed in Plasma 5.27.1. Is
> that the case for you as well?
> 
> If not, can you find the missing desktop in the "Manage Desktops and Panels"
> window that's accessed from the global edit mode toolbar that drops down
> from the top of the screen when you enter edit mode?

No, sadly the update to Plasma 5.27.1 didn't fix it for me.

Yes, I can find the missing desktop in the "Manage Desktops and Panels" window.

I also played a bit more with the black screen. 
I can put windows on it and (if I find them) I can drag them off it.
Also I did play arround with the right klick menu. If I right klick into the black screen and manage to navigate the context menu blindly, I can open the settings window for the backgrounds. 
I can change the background of the black screen in it and navigate the desktop to a working screen, I can observe the change.
Comment 5 Marco Martin 2023-02-27 10:10:24 UTC
So from the last comment it seems that since a menu is there (invisible?) a containment is correctly there, but nothing gets rendered
Comment 6 Marco Martin 2023-03-09 11:00:50 UTC
Another explanation is everything being "correct" and the desktop window being there, but it has been failed to be moved with the plasma protocol?
Comment 7 Marco Martin 2023-03-09 11:01:46 UTC
if you add a panel in the screen that usually stays darl, then restarting is the panel visible even if not the desktop?
Comment 8 Marco Martin 2023-03-09 11:06:08 UTC
looking at he output you pasted, the 3 monitors are:
the 3rd one DP-9 at 0,0
the 2nd one DP-8 at the right
the 1st eDP-2 at the bottom of DP-9

screen priorities are eDP-2,DP-9,DP-8

What of the 3 screens gets black? or is it random?
Comment 9 Jan 2023-03-09 19:59:46 UTC
(In reply to Marco Martin from comment #7)
> if you add a panel in the screen that usually stays darl, then restarting is
> the panel visible even if not the desktop?

Do you mean I should drag a browser or something like on the dark screen and the do a reboot?
Comment 10 Jan 2023-03-09 20:07:11 UTC
(In reply to Marco Martin from comment #8)
> looking at he output you pasted, the 3 monitors are:
> the 3rd one DP-9 at 0,0
> the 2nd one DP-8 at the right
> the 1st eDP-2 at the bottom of DP-9
> 
> screen priorities are eDP-2,DP-9,DP-8
> 
> What of the 3 screens gets black? or is it random?

Its always DP-8, that stays black. The only exceptions from this rule are:
 I lower the screen resolution on DP-8
 or
I unplug both screens and plug in just DP-8. If I plug DP-9 back in, DP-8 goes black again.

Interestingly I switched my docking station to the HP USB-C G5 Essential Dock (Got it from my company to work from home) and the Problem persists.
Can I maybe try to reset something? Maybe there is a bad setting lingering in the background....
Comment 11 Nate Graham 2023-03-10 16:04:19 UTC
Yes, for complex arrangements, we've seen a few reports that sometimes panels or desktops are swapped or missing, as a result of the old settings being in an inconsistent state at the moment of migration. We do have a UI to recover them in the form of the "Manage Desktops and Panels" window, which should let people manually restore their old setup.

Can you see if that works?
Comment 12 Bug Janitor Service 2023-03-10 22:14:40 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2735
Comment 13 David Edmundson 2023-03-13 16:57:24 UTC
Git commit 253034f3da5b89d70b5946665c5f8f5011013896 by David Edmundson.
Committed on 13/03/2023 at 16:57.
Pushed by davidedmundson into branch 'master'.

Screenpool: avoid uniqueConnection with lambda

Handling QScreen geometryChanged was connected to a lambda with a unique
connection. Qt cannot determine this and doesn't connect.

The unique connection was used as handleScreenAdded is also called when
the output order changed to handle things being async.
(I don't think that's actually needed, but that's a refactor for another thread)

This patch shuffles the code so we only connect once which is cleaner
anyway.
Related: bug 466312

M  +21   -11   shell/screenpool.cpp
M  +1    -0    shell/screenpool.h

https://invent.kde.org/plasma/plasma-workspace/commit/253034f3da5b89d70b5946665c5f8f5011013896
Comment 14 Bug Janitor Service 2023-03-13 17:03:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2739
Comment 15 David Edmundson 2023-03-13 17:39:20 UTC
Git commit 3164e1367122245dda4a3a4d95cbcb623e8168a2 by David Edmundson.
Committed on 13/03/2023 at 17:03.
Pushed by davidedmundson into branch 'Plasma/5.27'.

Screenpool: avoid uniqueConnection with lambda

Handling QScreen geometryChanged was connected to a lambda with a unique
connection. Qt cannot determine this and doesn't connect.

The unique connection was used as handleScreenAdded is also called when
the output order changed to handle things being async.
(I don't think that's actually needed, but that's a refactor for another thread)

This patch shuffles the code so we only connect once which is cleaner
anyway.
Related: bug 466312


(cherry picked from commit 253034f3da5b89d70b5946665c5f8f5011013896)

M  +21   -11   shell/screenpool.cpp
M  +1    -0    shell/screenpool.h

https://invent.kde.org/plasma/plasma-workspace/commit/3164e1367122245dda4a3a4d95cbcb623e8168a2
Comment 16 Nate Graham 2023-03-15 17:26:31 UTC
We think the above changes may have fixed the issue for 5.27.3. Can you please upgrade to that version and verify? Thanks a lot!
Comment 17 Jan 2023-03-26 12:34:21 UTC
(In reply to Nate Graham from comment #16)
> We think the above changes may have fixed the issue for 5.27.3. Can you
> please upgrade to that version and verify? Thanks a lot!

Hi, sorry for my late reply.
Sadly it did not work for me. Strangely my pc became very unresponsive after switching to wayland.
I even had to roll back via timeshift (I used the option in sddm to start with wayland, in the hope that a "fresh" start would help and could not reverse that afterwards).

Using the GUI "Manage Desktops and Panels" I could not solve my issue as well.

Can I somehow delete my current monitor arrangements?
I am currently thinking about doing a fresh install of endeavoros with kde plasma on my second hard drive and see if that fixes things, but I would appreciate if there would be an easier way. :P
Comment 18 Jan 2023-03-28 10:14:56 UTC
(In reply to Nate Graham from comment #16)
> We think the above changes may have fixed the issue for 5.27.3. Can you
> please upgrade to that version and verify? Thanks a lot!

I had a free timeslot yesterday and tried a fresh install of EndeavorOs with kde plasma on my second harddrive.
I had the same issue. 

Can you recommend me another Distro which I could try? Maybe it´s Distro specific.

If you want, I can run some tests on the fresh install as well.
Comment 19 Nate Graham 2023-03-28 16:58:26 UTC
Does it have Plasma 5.27.3?

Testing with a clean user account would be very helpful, yeah. Oftentimes old configs cause problems after a major refactor like the one that happened in 5.27.
Comment 20 Jan 2023-03-31 06:49:15 UTC
(In reply to Nate Graham from comment #19)
> Does it have Plasma 5.27.3?
> 
> Testing with a clean user account would be very helpful, yeah. Oftentimes
> old configs cause problems after a major refactor like the one that happened
> in 5.27.

Ok. 
Now I tried a fresh install of EOS and Garuda and updated everything but did not add additionally software apart from the wayland-session package. I had the same issue. 
My bigger monitor didn´t show anything in the wayland session, but in the x11 session it does.
When I am in the wayland-session and reduce the screenresolution of the bigger monitor to the next lower setting it shows the desktop, if I then raise it again to the max resolution the desktop disappears again.

I also tried kubuntu. There everything works, but I noticed that it had only the version 5.25, so can not say anything about 5.27.
Comment 21 Nate Graham 2023-03-31 14:18:00 UTC
Ok, thanks for following up.
Comment 22 David Edmundson 2023-03-31 15:20:09 UTC
>My bigger monitor didn´t show anything in the wayland session

Can you move windows onto that monitor?
Comment 23 Jan 2023-04-06 07:29:17 UTC
(In reply to David Edmundson from comment #22)
> >My bigger monitor didn´t show anything in the wayland session
> 
> Can you move windows onto that monitor?

Yes, I can. And if I am lucky and hit the right spot I can get drag them back out again.
Comment 24 Nate Graham 2023-04-27 16:34:36 UTC
Kubuntu 23.04 now includes Plasma 5.27.4. Can you try again with that version or later? Thanks!
Comment 25 Bug Janitor Service 2023-05-12 03:46:08 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 26 Jan 2023-05-15 04:57:16 UTC
(In reply to Nate Graham from comment #24)
> Kubuntu 23.04 now includes Plasma 5.27.4. Can you try again with that
> version or later? Thanks!
Sorry for my late reply.

Under Kubuntu it works. Under Fedora it does not.
Comment 27 Nate Graham 2023-05-15 16:26:54 UTC
What Plasma version is each one providing?
Comment 28 Bug Janitor Service 2023-05-30 03:45:17 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 29 Bug Janitor Service 2023-06-14 03:45:18 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!