phoc computes a scale factor that is too large for phosh on devices with 16:9 resolution and 300 DPI
This is a continuation of phosh#1055 (closed)
My samsung-a5 computes a scale factor of 2.0:
G_MESSAGES_DEBUG="phoc-utils" phoc -E glxgears
Running compositor on wayland display 'wayland-0'
(phoc:1362): phoc-wlroots-CRITICAL **: 16:28:03.813: [backend/drm/util.c:66] Failed to parse EDID
phoc-output-Message: 16:28:03.815: Output 'DSI-1' added ('(null)'/'(null)'/'(null)'), 62mm x 110mm
(phoc:1362): phoc-utils-DEBUG: 16:28:03.826: Output DPI is 295.563660 for mode 720x1280, using scale 2.000000
According to the specs for this device, the calculated ~300 dpi is correct. The problem is that a scale factor of 2.0
with a native vertical resolution of 1280 means that the effective vertical resolution is 640.
@guidog noted the following in phosh#1055 (closed):
1280/2 = 640 which is < 720 so this is expected and the lock screen is just the most visible place where this goes wrong.
If 720 is the magical minimum vertical resolution that phosh cares about, should we codify that somewhere?
For example, maybe we could add a minimum_vertical_resolution
config (and default it to 720
) to phoc.ini
, and ensure that phoc_utils_compute_scale
never produces a scale factor that goes below that minimum amount.