Plasma 5.27.10 Graphical Glitches at Login

I am running Mageia 9 and Plasma 5.27.10 using the on-board Intel graphics on my computer. I have two monitors connected to the graphics. When I set up Plasma to start with an empty session, and start my desired applications in Autostart, Plasma starts the applications and then moves all of them to the center of the left screen when I log in.

Inxi information

System:
  Host: linux6core Kernel: 6.6.18-desktop-1.mga9 arch: x86_64 bits: 64
    Desktop: KDE Plasma v: 5.27.10 Distro: Mageia 9
Machine:
  Type: Desktop Mobo: Micro-Star model: MPG Z490 GAMING EDGE WIFI (MS-7C79)
    v: 1.0 serial: <superuser required> UEFI: American Megatrends v: 1.C0
    date: 06/10/2022
CPU:
  Info: 6-core 11th Gen Intel Core i5-11400 [MT MCP] speed (MHz): avg: 800
    min/max: 800/4400
Graphics:
  Device-1: Intel RocketLake-S GT1 [UHD Graphics 730] driver: i915 v: kernel
  Display: x11 server: X.org v: 1.21.1.8 with: Xwayland v: 22.1.9 driver: X:
    loaded: modesetting,v4l dri: iris gpu: i915 resolution: 1: 1920x1080~60Hz
    2: 1920x1080~60Hz
  API: OpenGL v: 4.6 Mesa 23.3.5 renderer: Mesa Intel Graphics (RKL GT1)
Network:
  Device-1: Intel Comet Lake PCH CNVi WiFi driver: iwlwifi
  Device-2: Realtek RTL8125 2.5GbE driver: r8169
Drives:
  Local Storage: total: 954.81 GiB used: 50.6 GiB (5.3%)
Info:
  Processes: 316 Uptime: 54m Memory: 31.2 GiB used: 2.59 GiB (8.3%)
  Shell: Bash inxi: 3.3.26

Most of the applications that I am running are standalone applications that I wrote myself. They are simply executable files, and are not installed via rpm. However, one of the applications is gkrellm, which is officially installed from the repositories.

I tell Plasma to open an empty session. Then, I run the apps myself using the Startup and Shutdowhn => Autostart system. This is working fine on my Mageia 8 system, which is using KDE Plasma 5.20.4 .

My applications work by saving their geometry in their own configuration file when they close, and then they read that information back in at startup and restore their size and position with calls to QT. All of my apps use QT for their graphics. If I run the applications manually, this system works fine.

So I set up my desktop with my applications on the far right of the two screens.

I log out and then log back in, and the desktop starts up with all the apps centered on the left hand screen.

If I move the applications back to where I want them to be, then log out and back in, Plasma centers them all on the left screen again.

I would be suspicious of a bug in the positioning of my own applications on the screen except that gkrellm suffers from the same problem.

I have tried some different things to get around the problem, for example, I set up the system to save my session at logout and restore it. When I did that, and logged out, nothing of my session was saved to .config/ksmserverrc. When I logged back in, it restored an old old session with a different program in it, and none of the ones I was running when I logged out.

Then, I set it up to restore a manually saved session, configured the desktop, and saved the session. When I log back in, it usually restores the session properly, although occasionally some of my applications end up on the left screen anyway. However, my applications do not restore their position where I left them. They are positioned where they were when I saved the session manually. For example, during a session I move one of my applications. I log out without saving the session, and when I log back in the latest move is ignored.

I designed my applications to provide a feature where I can move and/or resize the applications and they will automatically restore themselves the next time they run. I would like to retain that feature if at all possible.

Any help I can get working around this problem would be much appreciated.

Thanks,
Banjo
(_)=='=~

I have created a workaround that fixes this problem.

I created a bash script called RunApps.sh. It sleeps for a few seconds and then launches all of my desktop apps. Here is the entire script.

#! /bin/bash
#
# This script delays the running of my applications for
# a few seconds to allow Plasma to settle down to avoid a Plasma
# problem that messes up the locations of the windows when logging in.
#
# Sleep for a few seconds to let Plasma settle down
sleep 5s
# Run all of my desktop apps
/home/brian/bin/dgeyes &
/home/brian/bin/mac &
/home/brian/bin/mobo &
/home/brian/bin/Wx &
/home/brian/bin/NixieClock3 &
gkrellm &

Then, I set up the Autostart feature to run my script.

When I log in, Plasma sets up the desktop, and then after a few seconds my apps run normally, just like they used to.

Launching my apps this way looks the most normal to me, the only difference being a small delay before my apps start up. I can live with that.

I am guessing that the problem is a sequencing problem wherein Plasma runs the apps before the desktop is ready to accept the move commands. But that is just a guess.

Let me know… is this a Plasma bug… or user error?

Thanks,
Banjo