EGLFS: Unable to query physical screen size, defaulting to 100 dpi.
-
Hi all,
I have a Qt Quick application on a BeagleBone Black board using EGLFS.
It's connected to a TV using HDMI and it works fine.I can see to the monitor what I expect.The doubt is that when launching the application I get the message:
Unable to query physical screen size, defaulting to 100 dpi. To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
I know (from other posts) that I can solve by setting the two env var as described on the message.
My question is:
What's the "real" effect of leaving the variables unsetted?
Does it means that the "screen" works at lower resolution?Thanks
-
@luca
The physical screen size has an impact on the size of visual items. A font size for example can be set withsetPointSize
. The actual pixelSize of this font depends on the display device pixel density.
If you have screen A with 1920x1080 pixel and 19 Inch and screen B with 1920x1080 pixel but 15 Inch, a 20pt font pixelSize on B is greater than on screen A, resulting in the font beeing displayed on both screens at the same physical size.If you get the message
Unable to query physical screen size, defaulting to 100 dpi. To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
this tells you that your font (and other visual items) may be either bigger or smaller than a 20pt font on a display where the physical width and height are known, unless your display has 100dpi.
In short, if you don´t plan to run your application on screens with different dpi and the appearance suits your needs,
you can ignore it. It will also run on screens with lower resolution but maybe with a different size.@UPSNAIL
I guess your application is running on eglfs plugin, so there´s no window manager and therefore no window decoration with exit button. -
@sneubert Thanks for your reply. Indeed ,my application is running on gelfs plugin,Do you have resolution to this phenomenon.when i run the application on linuxfb plugin,the application cannot work.Could you know why?I'm a chinese boy ,excuse my bad English.
-
@luca
I´m not sure, if you can set this in your code, but there´s a section on this site http://doc.qt.io/qt-5/embedded-linux.html#eglfs-with-eglfs-kms-backend
dealing with multiple screens and talking about physicalWidth and physicalHeight
properties. Maybe that´s a starting point, or someone else can answer this.@UPSNAIL
Do I get you right, that your problem is the missing quit button? If yes, linuxfb won´t
solve this. You can run your application under xserver or wayland. With QtWayland compositor it is very easy to write your own window manager.
I like this one http://blog.qt.io/blog/2017/01/23/creating-devices-with-multiple-ui-processes-using-wayland/
take a look at the video at the bottom.