KDE apps not remembering size/position with secondary display

Hello,
I have an annoying issue with kde plasma apps (specifically terminal, kate editor, dolphin, settings manager etc) not remembering their size and position when I close them with my secondary monitor attached.
They reopen in really small windows and their positions can be random including off screen (I have to right click the app icon on taskbar > more actions > move in order to drag then back on screen).
Everytime I reopen them I always have to move and resize them, it does not matter if I force the window size/position in Configure Special Application settings.

They only remember their size and position when only one monitor is connected.

Other apps such as web browsers, code editors, game launchers etc all open fine and remember their size and position when last closed. Its only the kde apps that freak out when I attach my secondary monitor.

Monitors
Dell S2716DG (Primary - Displayport - 2560x1440@144Hz)
Dell ST2410 (Secondary - HDMI - 1920x1080@60Hz)

  Kernel: 5.10.18-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.1 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.10-x86_64 
  root=UUID=8e860395-4677-472a-8100-e1c17eee9db6 rw quiet 
  resume=UUID=1c114593-7577-4f39-bd7e-19de5c3b78b8 udev.log_priority=3 
  Desktop: KDE Plasma 5.21.1 tk: Qt 5.15.2 wm: kwin_x11 dm: SDDM 
  Distro: Manjaro Linux 
Machine:
  Type: Desktop Mobo: ASUSTeK model: ROG STRIX X470-F GAMING v: Rev X.0x 
  serial: <filter> UEFI: American Megatrends v: 5406 date: 11/13/2019 
Memory:
  RAM: total: 31.34 GiB used: 3.51 GiB (11.2%) 
  RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:
  Info: 8-Core model: AMD Ryzen 7 3700X bits: 64 type: MT MCP arch: Zen 2 
  family: 17 (23) model-id: 71 (113) stepping: N/A microcode: 8701013 
  L2 cache: 4 MiB bogomips: 134474 
  Speed: 4200 MHz min/max: 2200/5627 MHz boost: enabled Core speeds (MHz): 
  1: 4200 2: 4198 3: 4192 4: 4199 5: 4187 6: 4188 7: 4200 8: 4185 9: 4200 
  10: 4199 11: 4199 12: 4200 13: 4200 14: 4185 15: 4199 16: 4200 
  Flags: 3dnowprefetch abm adx aes aperfmperf apic arat avic avx avx2 bmi1 
  bmi2 bpext cat_l3 cdp_l3 clflush clflushopt clwb clzero cmov cmp_legacy 
  constant_tsc cpb cpuid cqm cqm_llc cqm_mbm_local cqm_mbm_total cqm_occup_llc 
  cr8_legacy cx16 cx8 de decodeassists extapic extd_apicid f16c flushbyasid 
  fma fpu fsgsbase fxsr fxsr_opt ht hw_pstate ibpb ibs irperf lahf_lm lbrv lm 
  mba mca mce misalignsse mmx mmxext monitor movbe msr mtrr mwaitx nonstop_tsc 
  nopl npt nrip_save nx osvw overflow_recov pae pat pausefilter pclmulqdq 
  pdpe1gb perfctr_core perfctr_llc perfctr_nb pfthreshold pge pni popcnt pse 
  pse36 rdpid rdpru rdrand rdseed rdt_a rdtscp rep_good sep sev sev_es sha_ni 
  skinit smap smca sme smep ssbd sse sse2 sse4_1 sse4_2 sse4a ssse3 stibp 
  succor svm svm_lock syscall tce topoext tsc tsc_scale umip v_vmsave_vmload 
  vgif vmcb_clean vme vmmcall wbnoinvd wdt xgetbv1 xsave xsavec xsaveerptr 
  xsaveopt xsaves 
  Vulnerabilities: Type: itlb_multihit status: Not affected 
  Type: l1tf status: Not affected 
  Type: mds status: Not affected 
  Type: meltdown status: Not affected 
  Type: spec_store_bypass 
  mitigation: Speculative Store Bypass disabled via prctl and seccomp 
  Type: spectre_v1 
  mitigation: usercopy/swapgs barriers and __user pointer sanitization 
  Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, STIBP: 
  conditional, RSB filling 
  Type: srbds status: Not affected 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: NVIDIA GA104 [GeForce RTX 3070] vendor: Micro-Star MSI 
  driver: nvidia v: 460.39 alternate: nouveau,nvidia_drm bus ID: 09:00.0 
  chip ID: 10de:2484 class ID: 0300 
  Device-2: Tobii AB EyeChip type: USB driver: uvcvideo bus ID: 3-1.2:3 
  chip ID: 2104:0127 class ID: 0e02 serial: <filter> 
  Display: x11 server: X.Org 1.20.10 compositor: kwin_x11 driver: 
  loaded: nvidia display ID: :0 screens: 1 
  Screen-1: 0 s-res: 4480x1440 s-dpi: 108 s-size: 1054x342mm (41.5x13.5") 
  s-diag: 1108mm (43.6") 
  Monitor-1: HDMI-0 res: 1920x1080 hz: 60 dpi: 92 size: 531x299mm (20.9x11.8") 
  diag: 609mm (24") 
  Monitor-2: DP-0 res: 2560x1440 dpi: 109 size: 598x336mm (23.5x13.2") 
  diag: 686mm (27") 
  OpenGL: renderer: GeForce RTX 3070/PCIe/SSE2 v: 4.6.0 NVIDIA 460.39 
  direct render: Yes 
Audio:
  Device-1: NVIDIA vendor: Micro-Star MSI driver: snd_hda_intel v: kernel 
  bus ID: 09:00.1 chip ID: 10de:228b class ID: 0403 
  Device-2: AMD Starship/Matisse HD Audio vendor: ASUSTeK 
  driver: snd_hda_intel v: kernel bus ID: 0b:00.4 chip ID: 1022:1487 
  class ID: 0403 
  Sound Server: ALSA v: k5.10.18-1-MANJARO 
Network:
  Device-1: Intel I211 Gigabit Network vendor: ASUSTeK driver: igb v: kernel 
  port: e000 bus ID: 07:00.0 chip ID: 8086:1539 class ID: 0200 
  IF: enp7s0 state: up speed: 100 Mbps duplex: full mac: <filter> 
  IP v4: <filter> type: dynamic noprefixroute scope: global 
  broadcast: <filter> 
  IP v6: <filter> type: dynamic mngtmpaddr scope: global 
  IP v6: <filter> type: noprefixroute scope: link 
  WAN IP: <filter> 
Bluetooth:
  Message: No Bluetooth data was found. 
RAID:
  Message: No RAID data was found. 
Drives:
  Local Storage: total: 2.73 TiB used: 134.01 GiB (4.8%) 
  SMART Message: Unable to run smartctl. Root privileges required. 
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 960 EVO 500GB 
  size: 465.76 GiB block size: physical: 512 B logical: 512 B speed: 31.6 Gb/s 
  lanes: 4 rotation: SSD serial: <filter> rev: 3B7QCXE7 temp: 33.9 C 
  scheme: GPT 
  ID-2: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 860 QVO 2TB 
  size: 1.82 TiB block size: physical: 512 B logical: 512 B speed: 6.0 Gb/s 
  rotation: SSD serial: <filter> rev: 2B6Q scheme: MBR 
  ID-3: /dev/sdb maj-min: 8:16 vendor: Samsung model: SSD 850 EVO 500GB 
  size: 465.76 GiB block size: physical: 512 B logical: 512 B speed: 6.0 Gb/s 
  rotation: SSD serial: <filter> rev: 2B6Q scheme: GPT 
  Message: No Optical or Floppy data was found. 
Partition:
  ID-1: / raw size: 359.01 GiB size: 352.37 GiB (98.15%) 
  used: 99.45 GiB (28.2%) fs: ext4 dev: /dev/sdb2 maj-min: 8:18 label: N/A 
  uuid: 8e860395-4677-472a-8100-e1c17eee9db6 
  ID-2: /boot/efi raw size: 300 MiB size: 299.4 MiB (99.80%) 
  used: 312 KiB (0.1%) fs: vfat dev: /dev/sdb1 maj-min: 8:17 label: N/A 
  uuid: 07FB-8D36 
  ID-3: /run/timeshift/backup raw size: 97.66 GiB size: 95.62 GiB (97.92%) 
  used: 34.56 GiB (36.1%) fs: ext4 dev: /dev/sdb4 maj-min: 8:20 
  label: timeshift uuid: 5e9bea17-190e-4573-80a0-ac15c58321c6 
Swap:
  Kernel: swappiness: 60 (default) cache pressure: 100 (default) 
  ID-1: swap-1 type: partition size: 8.8 GiB used: 0 KiB (0.0%) priority: -2 
  dev: /dev/sdb3 maj-min: 8:19 label: N/A 
  uuid: 1c114593-7577-4f39-bd7e-19de5c3b78b8 
Unmounted:
  ID-1: /dev/nvme0n1p1 maj-min: 259:1 size: 549 MiB fs: ntfs 
  label: System Reserved uuid: 2CE009A9E00979FA 
  ID-2: /dev/nvme0n1p2 maj-min: 259:2 size: 465.13 GiB fs: ntfs label: N/A 
  uuid: 80340A2D340A272E 
  ID-3: /dev/nvme0n1p3 maj-min: 259:3 size: 100 MiB fs: vfat label: N/A 
  uuid: F806-1F87 
  ID-4: /dev/sda1 maj-min: 8:1 size: 1.82 TiB fs: ntfs label: GAMEZ 
  uuid: BCB2A77DB2A73AB2 
USB:
  Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 14 rev: 2.0 
  speed: 480 Mb/s chip ID: 1d6b:0002 class ID: 0900 
  Device-1: 1-4:2 info: Corsair CORSAIR VIRTUOSO SE Wireless Gaming Headset 
  type: HID driver: hid-generic,usbhid interfaces: 1 rev: 2.0 speed: 12 Mb/s 
  chip ID: 1b1c:0a46 class ID: 0300 serial: <filter> 
  Device-2: 1-5:3 info: Microsoft XBOX ACC type: <vendor specific> driver: N/A 
  interfaces: 1 rev: 2.0 speed: 480 Mb/s chip ID: 045e:02fe class ID: 0000 
  serial: <filter> 
  Device-3: 1-9:4 info: ASUSTek AURA LED Controller type: HID 
  driver: hid-generic,usbhid interfaces: 1 rev: 2.0 speed: 12 Mb/s 
  chip ID: 0b05:1872 class ID: 0300 serial: <filter> 
  Device-4: 1-14:5 info: Corsair Hydro Series H115i Liquid CPU Cooler 
  type: <vendor specific> driver: N/A interfaces: 1 rev: 1.1 speed: 12 Mb/s 
  chip ID: 1b1c:0c0a class ID: 0000 serial: <filter> 
  Hub-2: 2-0:1 info: Full speed (or root) Hub ports: 8 rev: 3.1 speed: 10 Gb/s 
  chip ID: 1d6b:0003 class ID: 0900 
  Hub-3: 3-0:1 info: Full speed (or root) Hub ports: 2 rev: 2.0 
  speed: 480 Mb/s chip ID: 1d6b:0002 class ID: 0900 
  Hub-4: 3-1:2 info: Texas Instruments TUSB8041 4-Port Hub ports: 4 rev: 2.1 
  speed: 480 Mb/s chip ID: 0451:8142 class ID: 0900 
  Device-1: 3-1.2:3 info: Tobii AB EyeChip type: Video driver: uvcvideo 
  interfaces: 3 rev: 2.0 speed: 480 Mb/s chip ID: 2104:0127 class ID: 0e02 
  serial: <filter> 
  Hub-5: 4-0:1 info: Full speed (or root) Hub ports: 2 rev: 3.1 speed: 10 Gb/s 
  chip ID: 1d6b:0003 class ID: 0900 
  Hub-6: 4-1:2 info: Texas Instruments TUSB8041 4-Port Hub ports: 4 rev: 3.0 
  speed: 5 Gb/s chip ID: 0451:8140 class ID: 0900 
  Hub-7: 5-0:1 info: Full speed (or root) Hub ports: 4 rev: 2.0 
  speed: 480 Mb/s chip ID: 1d6b:0002 class ID: 0900 
  Device-1: 5-3:2 info: Logitech G502 Mouse type: Mouse,HID 
  driver: hid-generic,usbhid interfaces: 2 rev: 2.0 speed: 12 Mb/s 
  chip ID: 046d:c07d class ID: 0300 serial: <filter> 
  Device-2: 5-4:3 info: Logitech Gaming Keyboard G213 type: Keyboard,HID 
  driver: hid-generic,usbhid interfaces: 2 rev: 2.0 speed: 12 Mb/s 
  chip ID: 046d:c336 class ID: 0300 serial: <filter> 
  Hub-8: 6-0:1 info: Full speed (or root) Hub ports: 4 rev: 3.1 speed: 10 Gb/s 
  chip ID: 1d6b:0003 class ID: 0900 
Sensors:
  System Temperatures: cpu: 38.8 C mobo: 27.0 C gpu: nvidia temp: 49 C 
  Fan Speeds (RPM): cpu: 1483 case-1: 0 case-2: 581 case-3: 559 gpu: nvidia 
  fan: 0% 
  Power: 12v: 12.23 5v: N/A 3.3v: N/A vbat: N/A 
Info:
  Processes: 310 Uptime: 41m wakeups: 0 Init: systemd v: 247 Compilers: 
  gcc: 10.2.0 Packages: pacman: 1247 lib: 374 Shell: Zsh v: 5.8 
  running in: konsole inxi: 3.3.01```

Any ideas?

Hi @c2dan88, and welcome!

I had much the same problem, only it wasn’t limited to KDE applications and it was on my desktop with the second monitor permanently attached.

The way I fixed it was by setting a rule for the window in System settings.

Or you can just Right click on the icon in the titlebar of the application’s window, after it is in the correct position. Then you can go to More actionsCustomize window…. Then click on the button to Detect window… and select the window you wish to set the rule for.

The popup box’s rules will then populate with the clicked windows’ settings. Select and enable which one the ones you would like to keep and close the popup when done.

With the popup closed, you can then set when the rules should be applied. When done, click Apply and quit the window.

I am unable to remember the exact steps, but this is the gist of it. Play around with the settings until you find what works for you.

Also: Please excuse my typing, I’m having keyboard problems that I hope to get sorted out this week.

1 Like

Yeah I have been changing those window settings and nothing seems to work.
Even if I set a fixed size and position for the window kde apps refuse to adhere to those settings and reverts to opening a tiny window located randomly or off screen (top left corner usually).

When I disconnect second display the apps will remember their size and location when they were closed.

This is infuriating. I did record my screen to show how the dolphin file manager behaves, but this forum won’t let me upload video files or drop a link to the video uploaded on any 3rd party service. Excellent.

If I enable the system setting Allow apps to remember the positions of their own windows, if they support it then all KDE / system windows still open small, but at the top-left corner of my left-most monitor. With it disabled they at least open on the primary monitor (middle of 3 monitors) but never remember the size or position. I’ve tried using both Special Window Settings and Special Application Settings with specific sizes initially, forced, remember, with and without the recommended Ignore requested geometry option.

It just doesn’t work.

Position isn’t too important, as long as they open on the primary monitor, but why they got to be so small?! I moved to Plasma because I was hoping it was a GNOME issue, but apparently not.

You can “cheat” by breaking up the URL, such as,

vidservice (dot) com (slash) 123abc

I recall their being a file I had to delete to force Plasma to generate a new one, and it temporarily resolved a similar issue on my end. I’ll have to figure out which file it is in the meantime. Granted, this is on a laptop with an externally attached monitor (not exactly the same as your setup.)

I’m allowed to post links and videos now, so here it is:

I know the video only shows the application settings with size set to “apply initially” but it behaves the same with various combinations as mentioned in my previous comment.

This works for me, with the caveat that I had to logoff / login for it to begin taking effect:

Note the Ignore requested geometry option, set to Force and Yes


I find it odd, because in the past I never had to logoff and sign back in for Kwin Rules to properly take effect.


I might add, you probably want to select which Window Types this applies to, since I doubt you want pop-ups and dialog windows to also open at 1300x900 in size.

1 Like

So after much playing about, I have found a way that works: set Position and Size to “Remember” as well as Ignore requested geometry to “Force” - but it has to be replicated manually for every application / window I encounter that does not behave properly by default.

So far most non-system windows (e.g. Firefox, Discord) behave properly by themselves but every system thing (e.g. settings, dolphin, terminal, software store) need this frustrating fix applying. Notably, while main Firefox windows are fine, devtools also needed these settings applying to it. Odd.

1 Like