Bug 408003 - Plasma panel height is not respecting "force font dpi" in system settings when resizing window in virtualbox with auto-resize guest display enabled
Summary: Plasma panel height is not respecting "force font dpi" in system settings whe...
Status: CLOSED NOT A BUG
Alias: None
Product: libplasma
Classification: Frameworks and Libraries
Component: libplasma (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-27 17:38 UTC by Marian Klein
Modified: 2021-07-28 16:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Klein 2019-05-27 17:38:26 UTC
SUMMARY

Modern HiDpi laptops/tablets/convertibles need to set higher value in force fonts DPI in systems setting. The logic that calculates default panel height 
does not take system settings force font dpi" into account. 
Panel height can be set manually by user easily if user is not happy and fonts/icons are too small.
But when the screen resolution is constantly changing as is the face for users of virtualbox with "auto-resize guest display" feature then this is no longer an option.  Please review the logic for default/automatic panel height setting.

STEPS TO REPRODUCE
1. use HiDPI laptop with resolution at least 3200x1800. I use HP spectre x360 convertible with resolution 3840x2160. Set the highest resolution of the laptop.
2. Use virtualbox 6 and install neon-developer-20190514-0001.iso into it, update packages (as of 27may 2019)
3. In both the host and guest(neon) system set the highest resolution of the laptop  and set true/genuine dpi for that resolution in force font dpi setting.  You calculate true dpi by taking horizontal resolution of the screen and divide horizontal dimension of the screen in inches . In my case 3840 / 29.5cm = 3840/11.6 inch= 330dpi


OBSERVED RESULT
In the guest system neon the plasma panel height is too small and initially can be set manually to an acceptable height to make opened applications names 
 readable. When resizing the window in virtualbox with "auto-resize guest display" feature the panel height is not preserved "readable" height as set manually because the kde/plasma always resets panel height to a very small height as it was initially. Opened application titles are not readable with that height on hidpi laptops.

EXPECTED RESULT
Either panel height does not change with each display resolution change inside the virtual box after setting the height manually or logic for the default/automatic panel height respects "force font dpi" value in system setting.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.16.80
KDE Frameworks Version: 5.59.0
Qt Version: 5.12.0
Kernel Version: 5.0.0-15-lowlatency
OS Type: 64-bit
Processor: 1 × Intel® Core™ i7-8550U CPU @ 1.80GHz
Memory: 3.9 GiB of RAM


Note that menu/launcher/dashboard is not affected and fonts is always correct when resizing display. Just the panel at the bottom is affected.
Comment 1 Marian Klein 2019-05-27 17:55:45 UTC
Additional information.
The Display Graphic Controller in VirtualBox 6 setting is VboxSVGA. This allows guest OS(neon) display resizing with "auto-resize guest display" feature.
Comment 2 Marian Klein 2019-05-27 19:20:13 UTC
Interesting when virtualbox window is in maximized state the guest OS panel height (neon) is set correctly even with high "force font dpi" system settings.

The problem is only in windowed mode (not maximised state) in virtual box.
Even if the size of virtual box window in windowed mode is close to actual size of maximized window there is big difference between height of panel.
Comment 3 Marian Klein 2019-05-27 19:45:28 UTC
The problem can be seen for those VirtualBox 6.0 Graphics controllers:
VBoxSVGA,VBoxVGA. The last one VMSVGA caused VM to set display in 800x600 resolution only so I could not test it panel.
Comment 4 Marian Klein 2019-05-27 20:14:23 UTC
So I used VMSVGA graphic controller with Guest OS additions provided by VirtualBox so I had flexibility in display size. The problem can be reproduced as well.
Comment 5 Nate Graham 2019-05-28 21:32:34 UTC
> Modern HiDpi laptops/tablets/convertibles need to set higher value in force fonts DPI in systems setting.

Actually that's not the recommend way to achieve high DPI scaling. You should be using the Screen scaling system in System Settings > Display & Monitor > Scale Display.

If you are unable or willing to use this because of outstanding bugs, those should be filed rather than resorting to the use of the Force Fonts DPI control.

The bug that tracks Plasma not working with it on X11 is Bug 356446 (it works fine on Wayland).
Comment 6 Marian Klein 2019-05-28 23:21:53 UTC
Who said it is not recommended?
Why the "force font DPI" is in the system then? Remove it then.
Even if something is not recommended as you said and system allows it and system misbehave when it is used then it is still bug. 

I am not happy you keep closing the valid bugs for me. 
Do you want to keep your bug list short?  
I am reporting the problem from the user perspective as it is the status now, not from ideal design perspective far in the future. So do a temporary fix now and then you revisit later.
Comment 7 Nate Graham 2019-05-29 03:13:00 UTC
Plasma core developers say it's not recommended.

I understand that it is very frustrating to have your bugs closed with no satisfactory resolution since from your perspective it's still broken. However it's important to understand how bug reporting systems work. It may help to read https://community.kde.org/Get_Involved/Bug_Reporting#Understand_what_the_resolution_statuses_mean

For this particular bug, the situation is a bit complex for both technical and political reasons. We are not going to make Plasma respond to the Force Fonts DPI control because it's not supposed to do that. I'm totally with you that this control should probably not even exist, but that's another matter. The correct solution for your problem is to make Plasma respond properly to the official scaling setting. This already works on Wayland, but does not work on X; see bug 356446 for more details.
Comment 8 Marian Klein 2019-05-29 04:13:11 UTC
OK, 

if you don't want to honour "force font dpi" setting
 what about not to change the height of plasma panel at all when the screen resolution changes? That would be enough for me.

Is this an acceptable fix?
Comment 9 Nate Graham 2019-05-29 04:25:15 UTC
(In reply to Marian Klein from comment #8)
> OK, 
> 
> if you don't want to honour "force font dpi" setting
>  what about not to change the height of plasma panel at all when the screen
> resolution changes? That would be enough for me.
> 
> Is this an acceptable fix?
If we implemented your suggestion, after reducing the screen resolution but keeping the panel height constant in millimeters by reducing the number of pixels of height, then the clock's date display would become smaller and blurrier, and a panel that was previously tall enough to have two rows of System Tray icons would be reduced in height enough to bump it down to only one row.

These are all behaviors that would cause other people to file bug reports. The correct solution is to fix the bug so that you don't feel the need to work around it by changing the screen resolution or using the Force Fonts DPI setting, not put in a workaround that would cause other issues for other people.
Comment 10 Marian Klein 2019-05-29 07:41:44 UTC
I still don't know what you said in last message.
When you keep shrinking resolution to almost zero you will always have an issue at some point. Too many items on desktop and you cannot display all of them properly. Blurring or dropping some of them is alternative to deal with that.

What is your suggestion for fixing this? I have to stress when I maximize window the panel is displayed properly recognizing "force font dpi".

Another point,it looks to me you made a logical error.
For virtual box changing the resolution "auto resize guest display" does NOT mean changing dpi.
For full screen with virtual box or with native installation  changing the resolution DOES mean changing dpi.
It is opposite to what you said. 
For virtual box fixed height in mm and fixed dpi translates to fixed height in pixels,when using virtual box , the physical resolution and dpi is fixed, so there is no such problem. For native installation or Full screen virtual box lowering the resolution does mean the panel gets taller as number of pixel is always the same so no blurring at all.

In absolute terms the same , but it would be bigger relatively to whole desktop. However panel is special so deserves height stability when resizing window.

I also tested with unchecked/unused "force font dpi"  and with scale 300%. The problem is still there. Plus there are other problems with fonts as you mentioned. I am going to open similar bug for scaling. Overall I still prefer using "force font dpi", it works better than scaling for now.
Comment 11 Nate Graham 2019-05-29 16:23:34 UTC
There's so much discussion here that I'm having a hard time identifying what the issue really is. Can you attach a screen recording that depicts it happening? That would be very helpful.
Comment 12 Marian Klein 2019-05-29 17:53:58 UTC
see bug 408055