Bug 444136 - Konsole window upon reload has vertical height too small on my 3 monitor setup with panel in middle screen
Summary: Konsole window upon reload has vertical height too small on my 3 monitor setu...
Status: CONFIRMED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 21.08.2
Platform: Neon Linux
: NOR minor
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-20 18:42 UTC by Eric Fontaine
Modified: 2022-09-02 21:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
how Konsole looks when I reopen it (14.98 KB, image/png)
2021-10-20 18:42 UTC, Eric Fontaine
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Fontaine 2021-10-20 18:42:23 UTC
Created attachment 142686 [details]
how Konsole looks when I reopen it

SUMMARY
Konsole window upon reload has vertical height too small on my 3 monitor setup with panel in middle screen.

STEPS TO REPRODUCE
Glitch happens when I have konsole's "Remember Window Size" checked in preferences (as is default), but doesn't happen if I unchecked that setting.

I have a 3-monitor setup*:
- Screen 0: DP 1080x1920 (vertical orientation on right)
- Screen 1: HDMI 1280x1024 (on left)
- Screen 2: DVI-D 2560x1600 (primary in middle, with panel)

The first time I opened Konsole, it is fine.  However upon reopening it, the glitch happens...

OBSERVED RESULT

When konsole is closed, the file .config/konsolerc is created with what I believe are buggy settings:

[Desktop Entry]
DefaultProfile=Profile 1.profile

[MainWindow]
DVI-D-0 DisplayPort-0 HDMI-A-0 XPosition 2560x1600=2269
DVI-D-0 DisplayPort-0 HDMI-A-0 YPosition 2560x1600=29
RestorePositionForNextInstance=false
State=AAAA/wAAAAD9AAAAAAAABTcAAAAYAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAIAAAAWAG0AYQBpAG4AVABvAG8AbABCAGEAcgEAAAAA/////wAAAAAAAAAAAAAAHABzAGUAcwBzAGkAbwBuAFQAbwBvAGwAYgBhAHIBAAAFD/////8AAAAAAAAAAA==
StatusBar=Disabled
ToolBarsMovable=Disabled

At this point if I open konsole again, its window height is very short...can only see about half a row of the terminal (see attached konsole-resize.png).

However if I delete that konsolerc file before opening konsole again, it displays fine.  So the bug seems to be in how this file is saved when I have my particular monitor setup.


*for reference here is output of xrandr (which I configured using KDE's Display Configuration gui) so you know exactly my screen settings:

Screen 0: minimum 320 x 200, current 4920 x 1920, maximum 16384 x 16384
DisplayPort-0 connected 1080x1920+3840+0 left (normal left inverted right x axis y axis) 531mm x 299mm
   1920x1080     60.00*+  59.94  
   1680x1050     59.95  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1440x900      59.89  
   1280x800      59.81  
   1152x864      75.00  
   1280x720      60.00    59.94  
   1024x768      75.03    70.07    60.00  
   832x624       74.55  
   800x600       72.19    75.00    60.32    56.25  
   640x480       75.00    72.81    66.67    60.00    59.94  
   720x400       70.08  
HDMI-A-0 connected 1280x1024+0+576 (normal left inverted right x axis y axis) 375mm x 300mm
   1280x1024     60.02*+  75.02  
   1920x1080     60.00    50.00    59.94  
   1280x800      60.02  
   1152x864      75.00  
   1280x720      60.00    50.00    59.94  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    60.00    59.94  
   720x400       70.08  
DVI-D-0 connected primary 2560x1600+1280+0 (normal left inverted right x axis y axis) 641mm x 401mm
   2560x1600     59.86* 
   1280x800      59.91  


EXPECTED RESULT
Konsole remembers my window size.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE neon 5.23 User Edition (fresh install https://files.kde.org/neon/images/user/20211014-1524/neon-user-20211014-1524.iso) on Linux v5.11.0-38-generic (#42~20.04.1-Ubuntu SMP Tue Sep 28 20:41:07 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux)
KDE Plasma Version: 5.23.0
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
I login to KDE plasma with X as is the default, not wayland.

I can work around the bug by simply disabling that checkmark in preferences to remember window size.
Comment 1 Ryan Ronnander 2022-01-04 23:42:55 UTC
I've noticed similar behavior when moving to a triple monitor configuration with one center horizontal monitor flanked by two vertical monitors a few weeks ago. I believe it may also be related to using "Ctrl + D"  to exit Konsole. When you close Konsole in this manner the "remember window position" functionality does not appear to save on exit. 

I was able to reproduce this just now. Closing Konsole through kwin's titlebar saves Konsole's position and size upon exit allowing Konsole to open as expected during the next launch.
Comment 2 Thiago Sueto 2022-09-02 21:23:04 UTC
This is still reproducible in Konsole 22.04.1, but it seems to be an X11 exclusive bug. You can test this with a RHEL 9 or Fedora 36 system, for instance.

It doesn't happen when running as a Wayland window.

It happens when running as an XWayland window, but only when there is no prior window size recorded in the konsolerc.

It does not happen when running as an XWayland window after a window size is recorded in the konsolerc, window sizes are saved correctly.

In the X11 session, if you delete the konsolerc file and open Konsole it shows up fine, but when it writes to the file it writes the same weird window sizes. Those seem to be arbitrary sizes.

Given the mention of "Let applications remember their positions and sizes" which is a known source of issues on Xorg, perhaps it would make sense for a KWin dev to look into this.