Bug 421116 - Multimonitor support works randomly
Summary: Multimonitor support works randomly
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (show other bugs)
Version: 5.18.5
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-06 18:08 UTC by Piotr Mierzwinski
Modified: 2022-11-15 23:15 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
kscreen configuration for 3 displays (1.48 KB, text/plain)
2020-05-06 18:08 UTC, Piotr Mierzwinski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Mierzwinski 2020-05-06 18:08:35 UTC
Created attachment 128202 [details]
kscreen configuration for 3 displays

SUMMARY
Sorry for general subject.
The issue I experienced is related with X11 session (KDE shows: "The xcb windowing system"). I didn't test it with Wayland.

Couple words of introduction.
I have two virtual desktops. Restore session is turned on. 

Usually I have connected my PC with two displays:
- primary: EA275WMi (monitor), connected via DVI but xrandr detects is as connected by HDMI
- not primary: Optoma 1080P (projector), connected via HDMI
Second one usually is working in standby mode, but is always connected (wire plugged in), so Plasma/kwin recognized it and configured properly (by kscreen).

First thing is that sometime newly opened application's window appears on not turned on display instead of 'primary' display, so its window is not visible.
To get it back to primary display I need either turn on projector (it takes some time) or blindly catch its window on not visible screen (holding Alt key).
Unfortunately I cannot simple move window to specific display by option which could be present in icon (after clicking RMB) placed on bar, because is not available there, whereas is available only after clicking in title bar of window.

Second thing. I think worse and really annoying.
Usually I work with 2 desktops placed on primary display, where are running couple applications on each.
Yesterday I connected third display (xrandr and kscreen shows as DP1). Plasma/kwin recognized it correctly (monitor: 20WGX2) and configured in kscreen as 'not primary'. 
After I finished work I disconnected third display - VGA wire plugged off.
Today I turned on PC and got empty first desktop (yesterday here I had 3 opened applications), on second desktop was only one application from 2 yesterday opened. I supposed that they must be present on disconnected third display. I thought like this, because if I switched desktop (Ctrl+F1/F2) I saw some window(s) on split second. Therefore I connected third display again and happened magic. Windows of applications appeared on my primary display (first desktop), but only those what were not visible before connecting again third display. This one before was visible on second desktop ('primary display') appeared on third display. Anyway they reversed their visibility on screens.

Another magic happened when I disconnected third display in the middle of work. In result Plasma/kwin again switched almost all windows just moving them to disconnected display. I connected again and all windows back to primary display. Now I don't need third display, but Plasma/kwin forced me to be turned on. Maybe some work around might be disconnect it and blindly move back all windows from not visible third display. Another workaround might be manually removing configuration for third display from kscreen config file.

I wonder why Plasma/kwin/kscreen didn't remove entry related with disconnected display in its configuration if is not able to find it after start. Maybe it would be helped when user disconnect some display and just run PC without it.


BTW. I'm not sure if this does matter, but yesterday at night I also received an update for Plasma, upgrading version to 5.18.5.

Similar issue I reported here: Bug 416556 and here: Bug 420881

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT
Windows normally appearing on primary display, after connection another display appear on not primary.

EXPECTED RESULT
All windows appear on primary display should every time appear on primary display if were assigned to this display.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: YES
(available in About System)
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
Other related software:
 - Linux kernel 5.6.10-arch1-1 #1 SMP PREEMPT
 - mesa 20.0.6-2
 - xorg-server 1.20.8
 - intel-ucode 20191115-3
 - libva-intel-driver 2.4.0-1
 - xf86-video-intel 1:2.99.917+906+g846b53da-1

Hardware I use.
I have integrated Intel graphics card:
  VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)

Current (3 screens) kscreen configuration is present in attachment.
Comment 1 Piotr Mierzwinski 2020-05-06 18:26:46 UTC
I turned off PC. Disconnected third display and started PC.
This time I got different window visible on primary display in one desktop, and visible in half window in second desktop. Other applications I needed blindly moved to primary display.

I checked "System Settings -> Display Configuration" and found here only two displays: EA275WMi (monitor) and Optoma 1080P (projector), so looking correctly only windows of my application were in not visible desktops.
Current configuration in ~/.local/share/kscreen has been recreated and third 
display is missing.

I have also other Activity (virtual workspace), and here also the windows were moved similar to my default Activity.

I'm not going to connect again third display.
Comment 2 Nate Graham 2022-11-14 20:16:08 UTC
Thank you for the bug report. Unfortunately we were not able to get to it yet. Can we ask you to please check if this is still an issue with Plasma 5.25 or 5.26?

If it is, please change the status to CONFIRMED when replying. If not, or if you can't because you no longer use this setup, you can change the status to RESOLVED WORKSFORME. Thanks a lot!