Nymea-app display issue on Ubuntu 18.04

I have installed Nymea-app on my new XPS15-9500.
It works just fine but there is a display sizing issue.
the computer it is running on is a XPS-15-9500 with touch screen (i.e. 3840x2400) max resolution
If I have the laptop plugged into my Viewsonic DVSI monitor the resolution is set to 3840x2160 for replicated but I run with the laptop lid closed.
In this mode, display has the Nymea-app with about 10% of the screen, which is fine.
If I do not have the external monitor plugged in and have the laptop lid open whether the screen resolution is set to 3840x2160 or 3840X2400 then the Nymea display is much larger ~ 40% of display screen.
in addition, when with no external monitor and minimizing Nymea app a little window comes up showing 352x482 in center of nymea window (no problem just info on what i see).

To add to my setup, it is a dual boot with Ubuntu 18.04 running NEMO desktop using cinnamon and Windows 10.
nymea app is ok on size in windows 10

any suggestions how to fix the sizing problem?

Hi. I’m struggling a bit to understand what the issue actually is… Can you perhaps post a screenshot of the bogus state?

For high resolution screens there is an environment variables that controls the zoom factor. This should already be set on reasonably modern distributions but perhaps it isn’t. Try exporting this when launching the app:

QT_AUTO_SCREEN_SCALE_FACTOR=1

More info on this can be found here: https://doc.qt.io/qt-5/highdpi.html#high-dpi-support-in-qt
Perhaps you can also use the manual QT_SCREEN_SCALE_FACTORS one to explicitly set a scale factor per screen as a workaround if the automatic thing doesn’t work properly.

apparently my email reply did not get thru.
I tried QT_AUTO_SCREEN_SCALE_FACTOR=1 but no affect on size.
to check if it did anything tried QT_AUTO_SCREEN_SCALE_FACTOR=2 but that did make it much bigger.
attached is a screen shot for size.

if that helps
I am on Ubuntu 18.04 running NEMO Desktop with cinnamon on a Dell XPS15-9500 laptop with monitor at 3840x2400. If I lower to the 3840x2160 without the external monitor attached, I still get the same size. If I attach the external monitor which automatically changes to 3840x2160 (setup as mirror mode), then the relative size of the Nymea window significantly reduces (by about half). I normally run in lid closed when the external monitor is connected.

any other suggestions?

So, according to the docs the QT_AUTO_SCREEN_SCALE_FACTOR one is a boolean. That means it takes only 0 or 1 (or true/false). That would enable auto-detection and normally should work good enough. Not sure why it doesn’t seem to do for you and also not sure why it doubles the size if you set it to 2. Should be the same as 1 really.

Then there is another env var QT_SCREEN_SCALE_FACTORS which takes a list of floating point numbers, for example

QT_SCREEN_SCALE_FACTORS=1;1.25

This should set the scale factor to 1 (no scaling) on the first screen and to 1.25 on the second screen.

Hope this helps.

So if I export QT_SCREEN_SCALE_FACTORS=.5
then I get a correct size on the monitor. I will probably need to figure out a method to determine if the external monitor is plugged in and deal with that there.
Thanks for the suggestion.