Secondary desktop not refreshing after port switching in Plasma5 X11
Slackware - InstallationThis forum is for the discussion of installation issues with Slackware.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Secondary desktop not refreshing after port switching in Plasma5 X11
Code:
...but refreshes no issue when X-Server is running in full Wayland mode (and Windows).
To get the secondary monitor/desktop to refresh after switching my 4x1 HDMI KVM port switch back to the target machine (running Slackware64-current) in X11 I have to bring up the Display settings and temporarily switching Primary <--> Secondary.
X-Wayland has come a long way but it still is not quite ready for prime time and/or production. I would really like to get the secondary desktop/monitor to refresh itself in X11.
The system is an IBM ThinkPad with docking station. I believe both monitors are driven by the same GPU - i.e. the internal display graphics chip (Intel UHD Graphics 620 Mobile - Whiskey Lake GT2).
I am thinking I can at least find a script to refresh the secondary monitor in X11?
Have you thought to try simply xrandr? If that doesn't wake it, try making it more explicit: xrandr --output DP-1 --mode 1920x1080, using whatever its native mode and output name are, or an alternate mode, such as 1600x900, then switch right back to 1920x1080.
Hi mrmazda, Thank you for the suggestion of trying xrandr.
Just running xrandr in a shell without any arguments only prints the screen #'s and available resolutions.
However switching the secondary desktop to different resolutions with below commands refreshes/restores the secondary desktop. I created the below script "switch_display_modes.sh" and then call it from a desktop launcher $HOME/Desktop/Refresh2ndDisplay.desktop and that works. It's slow but less painful than calling up the "Configure Display Settings" each time. Obviously it would be highly desirable to figure out a way of doing this automagically as in Wayland.
The following behavior should be noted here. Windows on the secondary desktop are still accessible and maneuverable before refreshing. What I lose access to (before forcing refresh) is the wallpaper and the Desktop menu which you access from the mouse right-click.
I wonder if xrandr > /dev/null or xrandr --auto would also work. Placed in a start up script they have been known to have a positive effect in some flaky environments.
Thanks again for the additional suggestions mrmazda. At this point I am thinking that this a bug in KDE/Plasma5/X11. The reason for this assertion is I can run the XFce desktop (in X11) and get the desired behavior - i.e. automatically refresh the secondary desktop after switching it out and back in again. There is an Advanced Tab on the XFce Display setting menu that allows you to save a profile and I believe this facilitated the refresh-after-switch.
Also as previously noted KDE/Plasma5/Full-Wayland has the desired refresh after switching. So clearly the only thing that is "flaky" here is KDE/Plasma5/X11. The hardware is fine. I will submit a bug to bugs.kde.org
I tried the xrandr --auto option and this enables all displays which is undesired. I do not wish to enable the built-in laptop display as it stays closed on my dock. So I tried the following login script in KDE/Plasma5/X11
It should probably be noted here that the docking station has 1 HDMI port and 1 DVI port. So the primary monitor is fed by the HDMI port and the secondary monitor is fed by the DVI using a DVI-HDMI adapter since it has only HDMI inputs. It is this cable that feeds the switch/port replicator. Now admittedly I do occasionally have keyboard issues when switching the port replicator switch. Sometimes I have to re-seat the USB cable to reactivate the keyboard. So actually this hardware is a bit flaky but 99.9% sure it is unrelated to the issue KDE/X11 given the other systems are OK.
Below is an excerpt of my system with xrandr in the command line:
Quote:
Screen 0: minimum 320 x 200, current 3840 x 1080, maximum 16384 x 16384
eDP-1 connected (normal left inverted right x axis y axis)
1920x1080 60.00 + 59.97 59.96 59.93 48.00
...
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-2 disconnected (normal left inverted right x axis y axis)
DP-2-1 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 698mm x 393mm
1920x1080 60.00*+ 74.97 50.00 59.94
...
DP-2-2 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 698mm x 392mm
...
DP-2-3 disconnected (normal left inverted right x axis y axis)
All commands above were run with a powered-off (unplugged) 1920x1200 display connected via HDMI, and a pair of 1680x1050 displays connected to a single purpose Multi-Stream Transport (MST) DisplayPort splitter (the same hardware incorporated into docks that report their multiple ports as DisplayPorts). What you see above I consider Xorg lying, as without power, the HDMI-connected display is useless. It's the same in both Plasma and TDE desktops. The port names are appropriately assigned for the cable type connected to each display. This makes me wonder what other "lies" flow between components under Xorg control.
What I was hoping was to find a way to replicate your observations, but no such luck. The only way for the HDMI-connected display to be prevented from being taking into account by Xorg is by having no HDMI/DVI/VGA cable connected between display and output connector. It begs the question how your laptop display is made to be disregarded, whether it is hardware switching in the laptop, or software, or some combination of hardware and software.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.