This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KDE and Docking-Station: Randomly different desktops

Tags: None
(comma "," separated)
kde-kamikaze
Registered Member
Posts
5
Karma
0
Hi *,

I'm using KDE on my Lenovo Thinkpad. Everything works nice, except for the selection of Desktops per Monitor.
Usually, when I plug my Laptop into the dock, the laptops display shuts down and two seperate monitors are being used. Problem is, that my pre-configured desktops randomly change on my secondary monitor. This means, that sometimes the new monitor has a different background and my configured taskbar (plus widgets and so on) is gone. Right now there is a rotation of three (3!) different desktop-layouts that alternate on my secondary monitor, probably a race-condition.
I have to unplug my dockingstation and plug it back in. Every single time.

Is there a way to delete the 2 other desktops that sometimes get chosen for my secondary monitor?
Or can I permanently stick them to the monitor?

Edit:
I'm using KUbuntu 19.10 with plasma-desktop version 4:5.16.5-0ubuntu1 on my Lenovo L490 with Display Port Monitors on my dockingstation.

Thanks in advance!
kde-kamikaze
Registered Member
Posts
5
Karma
0
Anyone can help? Please?
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
I am a bit unsure if I understand you correctly, by "different desktops" do you mean virtual ones or do you mean activities? How did you configure those in the first place?


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
kde-kamikaze
Registered Member
Posts
5
Karma
0
@Mamarok thanks for your reply.
I'm talking about different types of Desktoptlayouts which seem to exist. From that pool, my Linux chooses one of these to fit a certain monitor.
E.g.: I can make changes on one of these Layouts, then reboot my Computer. Now, all booted up, my secondary monitor might use a different Layout out of that pool of "Desktops". I now have to unplug my Laptop from the dockingstation and plug it back in. I will have to do that until the windowmanager select the desktoplayout which I prefer for that monitor.
I have no Idea on where to edit this "pool".

Could you follow me?

Best Regards
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
There are basically two layouts possible, one is the Desktop view, the other one is the Folder view, those are edited with a right-click on the empty desktop. There is indeed an option to change desktop wallpapers automatically, but this can be edited there as well.

I have no knowledge of another possible setting, or even a pool of layouts, but of course I don't know every single tweak in Plasma.


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
kde-kamikaze
Registered Member
Posts
5
Karma
0
Hi,

thanks for replying. I think you still did not understand my problem.
Say you have 3 monitors. Each monitor has its own background and its own taskbar. Say, all three monitor layouts look completely different and easily distinctable.
But now you disconnect each monitor and plug them back into your PC. You now expect the monitor layouts to look the exact way they were before, right? But somehow, the monitor layout for your second and third monitors are switched, yet the composition of monitors stays intact (you can still navigate mouse from left to right without any jumps or "unseen areas").
So now when you see that a monitor looks like the other one and vise versa, this should mean that KDE saves the layout SOMEWHERE and then pushes it onto the preferred monitors!

What my problem is, is that I only have 2 monitors but it seems like one of the monitor's layouts varies everytime the monitor itself is reconnected.
And because the layout on the second screen varies, I have to unplug my monitors and replug them until my desired layout is present.

Could you follow me? :D
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
Right, I think I get it now. This is a setting in the System Settings -> Hardware -> Display and Monitor -> Display Configuration. Moving the post.


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
kde-kamikaze
Registered Member
Posts
5
Karma
0
Thanks for moving it.
Under "System Settings -> Hardware -> Display and Monitor" i could not find any option regarding designs and which monitor they are on.
Right now my secondary monitor is stuck with an empty template. My old template seems to be gone, as well as all of my settings I made on it. BUT: When i add a new applet onto a Taskbar it still says that it is being used 3 times already (probably on all the other designs which are not loaded onto my displays).
So, where does KDE get the information on how many applets are being used? Where is the file where i can swap those designs? There has to be at least an XML file which saves your design decisions...
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
How many virtual Desktops do you use?
Check if you do not have different activities, too


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
oscarkilgore
Registered Member
Posts
2
Karma
0
I seem to be having a similar issue
I have an HP Elitebook laptop that has an external dock. When the computer is on the dock the lid is closed, and there are two connected monitors (left is primary right is doing its thing). When I take the device off the dock, the laptop screen is obviously primary. Widgets and panel settings remain consistent from primary to primary. However, when I drop it back on the dock, the secondary display reverts to the Global Theme "default" desktop wallpaper, and the panels and widgets disappear. When I add them back in, the widget count is unchanged...the panel and widgets seem to have just disappeared. Is there any fix for that?
I've scoured this forum and Goole to no avail.
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS
oscarkilgore wrote:I seem to be having a similar issue....

Besides the fact you are replying to an over 14 months old post, what exact Plasma version and distribution do you use? You should be aware that the replies above apply probably to a very different Plasma version and Distribution than the one you are currently using, so opening a new thread is always the better solution...


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
oscarkilgore
Registered Member
Posts
2
Karma
0
I'm on KDE 5.18.5 and Ubuntu 20.04. I'm also well aware that this is an old post, just looking for solutions around the internet. I appreciate your response but nothing above is really a "solution" so I figured it worth exploring.
deesu
Registered Member
Posts
1
Karma
0
Hello,

I have exactly the same issue.

Details
Arch Linux (but I tested also kubuntu 20.04, 20.10, 21.04)
KDE Plasma Version 5.22.0
KDE Frameworks Version 5.82.0
Qt Version 5.15.2
Graphic Platform X11
HP envy x360 with ryzen 4700u + docking station via USB-C with DisplayPort1.4

What did I observe is that sometimes KDE is "losing" the correlation between virtual desktop/screen (panel, widget, wallpaper configuration) and physical monitor on which it was originally created. I am not programmer but I tried to debug this issue with Interactive KWin Console and I found out that KDE is sometimes adding new desktop to desktops() object.

I.e. when I run "print(desktops().length)" in KWin Console on fresh install with new user (fresh KDE configs) I am receiving value "4" which is correct (1 for my laptop monitor, and 3 external monitors from docking station). But after reconnecting to docking station several times this number increases and new bugged desktops starts to shuffle around, breaking my setup with widgets, panels and wallpapers.

I tried disabling KScreen and manually reconfiguring with xrandr and autorandr, but with no luck. No matter what KDE is just sometimes adding new fresh desktop to desktops() - without widgets, panels and with default wallpaper.

For now "print(desktops().length)" returns value of 12!!! in-depended desktops that are totally unusable and on which I have to perform manual reconfiguration of panels, widgets and wallpaper. Which can sometimes happen a few times per day.

I tried to use js function (by qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript) to change the background wallpapers to correct monitors via automated way. Unfortunately due to the instability of how desktops() behaves (or other KDE component that causes this issue) the ID of those virtual desktops change often. Not only when new desktop is added to the desktops(), but sometimes it's just shuffling them. Hence this approach does not makes sense as figuring out which desktop has been spawned on which monitor (and what ID does it has assigned this time) is pain in the keyboard.

From Interactive KWin Console side I am talking about below components.
desktops() - array of objects that contains all desktops
desktop()[0] - desktop object that I believe contains information about panel, wallpaper and widget assignment/configuration

The issue is that KDE sometimes adds new desktop objects to desktops(), and sometimes it's just changing their order.

I will be more than happy to provide you any debug/log data you require. Just let me know what do you want me to upload.

Kind regards,
Matty
kp
Registered Member
Posts
1
Karma
0
For a long time now, my two desktops have been switching randomly between my laptop monitor and my external monitor (connected to the VGA port). Sometimes they are drawn on the same monitor, causing the other to be black and empty. Logging out and back in normally fixes that condition. I never disconnect the external monitor, so that can't be the issue.

This seems to be a race condition, indeed. I'm not sure, though, why the backgrounds and icons would be drawn on top of each other in the first place, i.e. what would be a good reason to ever do it. The effect is visible if the monitors have different resolutions, and the smaller desktop happens to be on top of the larger one.

If I'll ever get suitably irritated, I'll dig into the code and fix this for myself, but don't hold your breath. :D

Yours,
hellblade
Registered Member
Posts
9
Karma
0
OS
The Problem

For anyone reading this and still not understanding what the issue is...

Xserver has:
  1. Monitors - the physical monitor devices
  2. Screens

KDE has:
  1. Virtual Desktops
  2. Activities
  3. Plasma Profiles - combination of wallpaper, plasmoids, panels etc., one per monitor

The expected behavior is for each Monitor to always be assigned the same Plasma Profile.

The actual behavior is that sometimes Monitors are assigned random Plasma Profiles, including new ones (using defaults).

My Experience

I've been having this problem for many years now, no matter what my setup was.

The problem exists independently of the following:
  • CPU - Intel and AMD
  • GPU - various Nvidia and AMD (and I think an Intel iGPU at some point) cards
  • Monitors - various brands, models, specs, connection types, count, int. display vs ext. monitor vs TV etc.
  • Laptop vs PC
  • Monitor Layout - position, resolution, panning, scale, fb size etc.

Things that trigger it:
  • reboot
  • resume from sleep
  • xserver restart
  • xrandr changes


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]