Hi,
QT5 application installed or compiled on my system are scaled by the factor 2 but should not be scaled. Thus the applications are way too big compared to GTK applications.
QT_SCALE_FACTOR=1 QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_QPA_PLATFORM=wayland QT_WAYLAND_DISABLE_WINDOWDECORATION=1 qt5ct
also:
QT_SCALE_FACTOR=1 QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_QPA_PLATFORM=xcb qt5ct
Only eglfs scales fine, but is not responding (mouse, keyboard):
QT_SCALE_FACTOR=1 QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_QPA_PLATFORM=eglfs qt5ct
Sway version:
sway version 1.0-alpha.4-268-g5de2223c (Aug 4 2018, branch 'master')
I'm also experiencing the exact same problem - also tried to fiddle with the QT/Wayland env vars to no avail.
I may have had the same issue, a while back. If I recall correctly, Qt5 uses the DPI implied by wl_output settings, which often differs from the physical and/or logical DPI inferred under X11. The physical dimension information provided to Qt can be modified by patching wlroots, e.g. with dpi_patch.txt. One can find what wl_output is usually set to using the command weston-info.
This sounds like a Qt bug.
I'm also experiencing the issue with sway. However, it is not present with other desktop environments like Gnome and KDE.
weston-info yields the wl_output parameters:
interface: 'wl_output', version: 3, name: 22
x: 1280, y: 0, scale: 1,
physical_width: 309 mm, physical_height: 173 mm,
make: 'Panasonic Industry Company', model: '0x96A2',
subpixel_orientation: unknown, output_transform: normal,
mode:
width: 2560 px, height: 1440 px, refresh: 48.000 Hz,
flags:
mode:
width: 2560 px, height: 1440 px, refresh: 59.999 Hz,
flags: current
What does weston-info say on GNOME and KDE?
interface: 'wl_output', version: 3, name: 26
x: 0, y: 0, scale: 1,
physical_width: 310 mm, physical_height: 170 mm,
make: 'VVX14T058J10', model: 'eDP-1-unknown',
subpixel_orientation: unknown, output_transform: normal,
mode:
width: 2560 px, height: 1440 px, refresh: 48.000 Hz,
flags:
mode:
width: 2560 px, height: 1440 px, refresh: 59.999 Hz,
flags: current preferre
The different x and y values are because I've vonfigured my display for a multihead setup in sway. (The config is:
https://gist.github.com/wilecoyote2015/fd19bceda96c23305564bec0afd558e6 )
Can you try to set QT_WAYLAND_FORCE_DPI? (https://github.com/GarageGames/Qt/blob/master/qt-5/qtwayland/src/client/qwaylandscreen.cpp#L111)
I've tried now and with QT_WAYLAND_FORCE_DPI=96, QT applications scale as intended with 1x.
However, menus are misaligned with QT_WAYLAND_FORCE_DPI=96 set.
For example, open Konsole and try to open the File drop-down menu. It is shifted by a half screen width to the right on my QHD screen.
Unfortunately I have the same issue on alpha 5... Interestingly it scales fine on my external screen out of the box. When I unplug that and swtich to my interal scren (that has higher DPI) then I see everything very large... weston-info says:
interface: 'wl_output', version: 3, name: 22
x: 0, y: 0, scale: 1,
physical_width: 309 mm, physical_height: 174 mm,
make: 'Unknown', model: '0x046D',
subpixel_orientation: unknown, output_transform: normal,
mode:
width: 1920 px, height: 1080 px, refresh: 60.020 Hz,
flags: current
The dimensions should be about right I think... I calculated the DPI for my screen, which is 157. If I force this DPI using the mentioned variable, then everything is way too large again...
Hi, I'm working on Qt and would be very happy to get any Qt related bugs sorted out!
There might be a couple of different issues involved here. Could each of you experiencing this please answer all of the following questions:
weston-info report correct physical dimensions? All the previous bugs I've seen on font size issues have been because the compositor reports the wrong physical size.WAYLAND_DEBUG=1 set.QT_*SCALE_* env vars set?If you have Qt 5.11 or newer and weston-info is reporting the correct physical size. Please open a new bug at bugreports.qt.io (with answers to the questions above).
And just a side note: Because compositors so often are misreporting physical size, in Qt Wayland 5.12 we will switch to forcing 96 DPI by default, essentially making pixel sized and point sized fonts the same thing. If you have a working compositor and want fonts with point size 11 to be the same physical size on each monitor regardless of its DPI (their intended use), you can restore the old behavior by setting QT_WAYLAND_FORCE_DPI=physical. Pixel sized fonts will still get their size from the monitor scale factor.
@johanhelsing
edit:
By the way QT_WAYLAND_FORCE_DPI=96 fixes the issue for me.
/edit
1.
[rik@T450 ~]$ dnf info qt5-devel
Last metadata expiration check: 2 days, 0:12:04 ago on Fri 14 Sep 2018 11:40:12 AM CEST.
Installed Packages
Name : qt5-devel
Version : 5.11.1
Release : 3.fc28
Arch : noarch
Size : 25
Source : qt5-5.11.1-3.fc28.src.rpm
Repo : @System
From repo : updates
Summary : Qt5 meta devel package
URL : https://getfedora.org/
License : GPLv3
Description : Qt5 meta devel package.
2.
I'm on a 14" 1080p screen. Seems correct:
interface: 'wl_output', version: 3, name: 22
x: 0, y: 0, scale: 1,
physical_width: 309 mm, physical_height: 173 mm,
make: 'Unknown', model: '0x123D',
subpixel_orientation: unknown, output_transform: normal,
mode:
width: 1920 px, height: 1080 px, refresh: 40.033 Hz,
flags:
mode:
width: 1920 px, height: 1080 px, refresh: 60.049 Hz,
flags: current
3.
Usually not. I did not test in multi-monitor setup
4.
[rik@T450 ~]$ QT_SCALE_FACTOR=1 QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_QPA_PLATFORM=wayland WAYLAND_DEBUG=1 okular
[383267.363] -> [email protected]_registry(new id wl_registry@2)
[383267.401] -> [email protected](new id wl_callback@3)
[383267.493] [email protected]_id(3)
[383267.518] [email protected](1, "wl_shm", 1)
[383267.544] -> [email protected](1, "wl_shm", 1, new id [unknown]@4)
[383267.578] [email protected](2, "zwp_linux_dmabuf_v1", 3)
[383267.599] [email protected](3, "wl_drm", 2)
[383267.618] [email protected](4, "wl_compositor", 4)
[383267.639] -> [email protected](4, "wl_compositor", 3, new id [unknown]@5)
[383267.665] [email protected](5, "wl_subcompositor", 1)
[383267.686] -> [email protected](5, "wl_subcompositor", 1, new id [unknown]@6)
[383267.716] [email protected](6, "wl_data_device_manager", 3)
[383267.736] -> [email protected](6, "wl_data_device_manager", 1, new id [unknown]@7)
[383267.764] [email protected](7, "gamma_control_manager", 1)
[383267.786] [email protected](8, "zwlr_gamma_control_manager_v1", 1)
[383267.806] [email protected](9, "gtk_primary_selection_device_manager", 1)
[383267.827] [email protected](10, "zxdg_output_manager_v1", 2)
[383267.847] [email protected](11, "org_kde_kwin_idle", 1)
[383267.869] [email protected](12, "zwp_idle_inhibit_manager_v1", 1)
[383267.889] [email protected](13, "zwlr_layer_shell_v1", 1)
[383267.909] [email protected](14, "zxdg_shell_v6", 1)
[383267.929] [email protected](15, "xdg_wm_base", 2)
[383267.951] [email protected](16, "org_kde_kwin_server_decoration_manager", 1)
[383267.974] [email protected](17, "zwlr_export_dmabuf_manager_v1", 1)
[383267.995] [email protected](18, "zwlr_screencopy_manager_v1", 1)
[383268.016] [email protected](19, "wl_seat", 6)
[383268.037] -> [email protected](19, "wl_seat", 4, new id [unknown]@8)
[383268.066] -> [email protected]_data_device(new id wl_data_device@9, wl_seat@8)
[383268.084] [email protected](20, "zwp_virtual_keyboard_manager_v1", 1)
[383268.109] [email protected](21, "zwlr_input_inhibit_manager_v1", 1)
[383268.129] [email protected](22, "wl_output", 3)
[383268.156] -> [email protected](22, "wl_output", 2, new id [unknown]@10)
[383268.186] -> [email protected](new id wl_callback@11)
[383268.200] [email protected](3961)
[383268.263] [email protected]_id(11)
[383268.275] [email protected](0)
[383268.287] [email protected](1)
[383268.298] [email protected](875708993)
[383268.310] [email protected](875709016)
[383268.322] [email protected]("seat0")
[383268.331] [email protected](7)
[383268.345] -> [email protected]_keyboard(new id wl_keyboard@3)
[383268.359] -> [email protected]_pointer(new id wl_pointer@12)
[383268.374] -> [email protected]_surface(new id wl_surface@13)
[383268.389] -> [email protected]_touch(new id wl_touch@14)
[383268.406] [email protected](0, 0, 309, 173, 0, "Unknown", "0x123D", 0)
[383268.453] [email protected](0, 1920, 1080, 40033)
[383268.480] [email protected](1, 1920, 1080, 60049)
[383268.514] [email protected](1)
[383268.526] [email protected]()
[383268.537] [email protected](3961)
[383268.659] -> [email protected]_pool(new id wl_shm_pool@11, fd 5, 4096)
[383268.883] -> [email protected](12288)
[383268.990] -> [email protected](28672)
[383269.159] -> [email protected](61440)
[383271.028] -> [email protected](126976)
[383271.116] -> [email protected](258048)
[383271.259] -> [email protected](520192)
[383273.228] -> [email protected](1044480)
[383278.301] -> [email protected](2093056)
[383383.769] -> [email protected]_registry(new id wl_registry@15)
[383383.800] -> [email protected](new id wl_callback@16)
[383383.976] [email protected]_id(16)
[383383.997] [email protected](1, "wl_shm", 1)
[383384.009] [email protected](2, "zwp_linux_dmabuf_v1", 3)
[383384.027] -> [email protected](2, "zwp_linux_dmabuf_v1", 3, new id [unknown]@17)
[383384.057] [email protected](3, "wl_drm", 2)
[383384.079] -> [email protected](3, "wl_drm", 2, new id [unknown]@18)
[383384.103] [email protected](4, "wl_compositor", 4)
[383384.122] [email protected](5, "wl_subcompositor", 1)
[383384.141] [email protected](6, "wl_data_device_manager", 3)
[383384.162] [email protected](7, "gamma_control_manager", 1)
[383384.179] [email protected](8, "zwlr_gamma_control_manager_v1", 1)
[383384.199] [email protected](9, "gtk_primary_selection_device_manager", 1)
[383384.218] [email protected](10, "zxdg_output_manager_v1", 2)
[383384.236] [email protected](11, "org_kde_kwin_idle", 1)
[383384.252] [email protected](12, "zwp_idle_inhibit_manager_v1", 1)
[383384.271] [email protected](13, "zwlr_layer_shell_v1", 1)
[383384.289] [email protected](14, "zxdg_shell_v6", 1)
[383384.305] [email protected](15, "xdg_wm_base", 2)
[383384.324] [email protected](16, "org_kde_kwin_server_decoration_manager", 1)
[383384.340] [email protected](17, "zwlr_export_dmabuf_manager_v1", 1)
[383384.360] [email protected](18, "zwlr_screencopy_manager_v1", 1)
[383384.377] [email protected](19, "wl_seat", 6)
[383384.394] [email protected](20, "zwp_virtual_keyboard_manager_v1", 1)
[383384.411] [email protected](21, "zwlr_input_inhibit_manager_v1", 1)
[383384.430] [email protected](22, "wl_output", 3)
[383384.446] [email protected](3962)
[383384.458] -> [email protected](new id wl_callback@16)
[383384.611] [email protected]_id(16)
[383384.623] [email protected](808669761, 0, 0)
[383384.643] [email protected](808669761, 16777216, 1)
[383384.659] [email protected](808669761, 16777216, 2)
[383384.678] [email protected](808669784, 0, 0)
[383384.696] [email protected](808669784, 16777216, 1)
[383384.713] [email protected](808669784, 16777216, 2)
[383384.733] [email protected](875713089, 0, 0)
[383384.751] [email protected](875713089, 16777216, 1)
[383384.770] [email protected](875713089, 16777216, 2)
[383384.790] [email protected](875708993, 0, 0)
[383384.806] [email protected](875708993, 16777216, 1)
[383384.823] [email protected](875708993, 16777216, 2)
[383384.842] [email protected](875713112, 0, 0)
[383384.861] [email protected](875713112, 16777216, 1)
[383384.881] [email protected](875713112, 16777216, 2)
[383384.897] [email protected](875709016, 0, 0)
[383384.915] [email protected](875709016, 16777216, 1)
[383384.936] [email protected](875709016, 16777216, 2)
[383384.953] [email protected](892424769, 0, 0)
[383384.969] [email protected](892424769, 16777216, 1)
[383384.986] [email protected](892424769, 16777216, 2)
[383385.005] [email protected](909199186, 0, 0)
[383385.022] [email protected](909199186, 16777216, 1)
[383385.038] [email protected](909199186, 16777216, 2)
[383385.059] [email protected](538982482, 0, 0)
[383385.077] [email protected](538982482, 16777216, 1)
[383385.096] [email protected](538982482, 16777216, 2)
[383385.114] [email protected](540422482, 0, 0)
[383385.133] [email protected](540422482, 16777216, 1)
[383385.148] [email protected](540422482, 16777216, 2)
[383385.167] [email protected](943215175, 0, 0)
[383385.183] [email protected](943215175, 16777216, 1)
[383385.200] [email protected](943215175, 16777216, 2)
[383385.217] [email protected](842224199, 0, 0)
[383385.235] [email protected](842224199, 16777216, 1)
[383385.251] [email protected](842224199, 16777216, 2)
[383385.270] [email protected](961959257, 0, 0)
[383385.286] [email protected](961959257, 16777216, 1)
[383385.301] [email protected](961959257, 16777216, 2)
[383385.317] [email protected](825316697, 0, 0)
[383385.336] [email protected](825316697, 16777216, 1)
[383385.355] [email protected](825316697, 16777216, 2)
[383385.373] [email protected](842093913, 0, 0)
[383385.391] [email protected](842093913, 16777216, 1)
[383385.410] [email protected](842093913, 16777216, 2)
[383385.431] [email protected](909202777, 0, 0)
[383385.447] [email protected](909202777, 16777216, 1)
[383385.467] [email protected](909202777, 16777216, 2)
[383385.487] [email protected](875713881, 0, 0)
[383385.508] [email protected](875713881, 16777216, 1)
[383385.529] [email protected](875713881, 16777216, 2)
[383385.548] [email protected](961893977, 0, 0)
[383385.568] [email protected](961893977, 16777216, 1)
[383385.584] [email protected](961893977, 16777216, 2)
[383385.603] [email protected](825316953, 0, 0)
[383385.622] [email protected](825316953, 16777216, 1)
[383385.639] [email protected](825316953, 16777216, 2)
[383385.656] [email protected](842094169, 0, 0)
[383385.673] [email protected](842094169, 16777216, 1)
[383385.690] [email protected](842094169, 16777216, 2)
[383385.706] [email protected](909203033, 0, 0)
[383385.725] [email protected](909203033, 16777216, 1)
[383385.746] [email protected](909203033, 16777216, 2)
[383385.767] [email protected](875714137, 0, 0)
[383385.788] [email protected](875714137, 16777216, 1)
[383385.810] [email protected](875714137, 16777216, 2)
[383385.831] [email protected](842094158, 0, 0)
[383385.853] [email protected](842094158, 16777216, 1)
[383385.869] [email protected](842094158, 16777216, 2)
[383385.878] [email protected](909203022, 0, 0)
[383385.886] [email protected](909203022, 16777216, 1)
[383385.894] [email protected](909203022, 16777216, 2)
[383385.902] [email protected](1448695129, 0, 0)
[383385.911] [email protected](1448695129, 16777216, 1)
[383385.922] [email protected](1448695129, 16777216, 2)
[383385.933] [email protected](1498831189, 0, 0)
[383385.944] [email protected](1498831189, 16777216, 1)
[383385.961] [email protected](1498831189, 16777216, 2)
[383385.984] [email protected]("/dev/dri/card0")
[383386.030] -> [email protected](6)
[383386.041] [email protected](808669761)
[383386.051] [email protected](808669784)
[383386.060] [email protected](875713089)
[383386.071] [email protected](875713112)
[383386.083] [email protected](909199186)
[383386.093] [email protected](961959257)
[383386.104] [email protected](825316697)
[383386.114] [email protected](842093913)
[383386.123] [email protected](909202777)
[383386.132] [email protected](875713881)
[383386.141] [email protected](842094158)
[383386.151] [email protected](909203022)
[383386.161] [email protected](1448695129)
[383386.171] [email protected](1)
[383386.182] [email protected](3962)
[383386.196] -> [email protected](new id wl_callback@16)
[383386.249] [email protected]_id(16)
[383386.262] [email protected]()
[383386.270] [email protected](3962)
[383393.550] -> [email protected]_surface(new id wl_surface@16)
[383410.136] -> [email protected]_buffer(new id wl_buffer@19, 36864, 32, 32, 128, 0)
[383410.198] -> [email protected]_cursor(0, wl_surface@13, 5, 5)
[383410.218] -> [email protected](wl_buffer@19, 0, 0)
[383410.235] -> [email protected](0, 0, 32, 32)
[383410.260] -> [email protected]()
[383410.295] -> [email protected](14, "zxdg_shell_v6", 1, new id [unknown]@20)
[383410.332] -> [email protected]_xdg_surface(new id zxdg_surface_v6@21, wl_surface@16)
[383410.354] -> [email protected]_toplevel(new id zxdg_toplevel_v6@22)
[383410.370] -> [email protected]_title("Okular")
[383410.383] -> [email protected]_app_id("org.kde.okular")
[383410.394] -> [email protected]_buffer_scale(1)
[383411.860] -> [email protected]_buffer_transform(0)
[383411.893] -> [email protected]()
[383411.905] [email protected](1, fd 5, 49987)
[383421.639] [email protected]_info(50, 250)
[383444.473] [email protected](3964)
[383444.531] -> [email protected](3964)
[383444.540] [email protected](0, 0, array)
[383444.560] [email protected](3963)
[383444.571] -> [email protected]_configure(3963)
[383444.661] -> [email protected]_pool(new id wl_shm_pool@23, fd 15, 8574552)
[383444.679] -> [email protected]_buffer(new id wl_buffer@24, 0, 1926, 1113, 7704, 0)
[383466.598] -> [email protected](new id wl_callback@25)
[383466.656] -> [email protected](wl_buffer@24, 0, 0)
[383466.673] -> [email protected](3, 30, 1920, 1080)
[383466.751] -> [email protected]()
[383467.330] -> [email protected]_pool(new id wl_shm_pool@26, fd 15, 8574552)
[383467.369] -> [email protected]_buffer(new id wl_buffer@27, 0, 1926, 1113, 7704, 0)
[383479.649] -> [email protected](new id wl_callback@28)
[383479.687] -> [email protected](wl_buffer@27, 0, 0)
[383479.711] -> [email protected](532, 131, 156, 43)
[383479.736] -> [email protected]()
[383479.786] [email protected]_id(25)
[383479.805] [email protected]()
[383479.813] [email protected](3968, wl_surface@16, array)
[383479.836] -> [email protected](new id wl_callback@25)
[383479.850] [email protected]_offer(new id wl_data_offer@87642672)
[383479.865] [email protected]("text/html")
[383479.879] [email protected]("text/_moz_htmlcontext")
[383479.890] [email protected]("text/_moz_htmlinfo")
[383479.901] [email protected]("text/plain;charset=utf-8")
[383479.912] [email protected]("text/plain")
[383479.923] [email protected]("text/x-moz-url-priv")
[383479.934] [email protected](wl_data_offer@4278190080)
[383479.948] [email protected](3969, 0, 0, 16, 0)
[383479.981] [email protected](1916, 1030, array)
[383480.002] [email protected](3965)
[383480.021] -> [email protected]_configure(3965)
[383481.011] -> [email protected]()
[383481.045] -> [email protected]()
[383481.135] -> [email protected]_pool(new id wl_shm_pool@29, fd 15, 7893920)
[383481.161] -> [email protected]_buffer(new id wl_buffer@30, 0, 1916, 1030, 7664, 0)
[383494.908] -> [email protected](new id wl_callback@31)
[383494.973] -> [email protected](wl_buffer@30, 0, 0)
[383494.998] -> [email protected](3, 30, 1910, 997)
[383495.020] -> [email protected]()
[383495.067] -> [email protected](new id wl_callback@32)
[383495.083] -> [email protected](wl_buffer@30, 0, 0)
[383495.107] -> [email protected](3, 30, 1910, 997)
[383495.132] -> [email protected]()
[383495.147] -> [email protected](new id wl_callback@33)
[383495.162] -> [email protected](wl_buffer@30, 0, 0)
[383495.183] -> [email protected](3, 30, 1910, 997)
[383495.205] -> [email protected]()
[383495.246] [email protected]_id(25)
[383495.264] [email protected]_id(28)
[383495.272] [email protected]()
[383495.285] [email protected](3969)
[383496.284] -> [email protected]()
[383496.326] -> [email protected]()
[383496.457] -> [email protected]_pool(new id wl_shm_pool@25, fd 15, 7893920)
[383496.490] -> [email protected]_buffer(new id wl_buffer@28, 0, 1916, 1030, 7664, 0)
[383511.898] -> [email protected](new id wl_callback@34)
[383511.971] -> [email protected](wl_buffer@28, 0, 0)
[383512.011] -> [email protected](3, 121, 517, 96)
[383512.036] -> [email protected](3, 217, 171, 769)
[383512.068] -> [email protected](490, 217, 30, 769)
[383512.118] -> [email protected](3, 986, 171, 40)
[383512.157] -> [email protected](490, 986, 1423, 40)
[383512.185] -> [email protected](3, 1026, 1910, 1)
[383512.217] -> [email protected]()
[383512.928] -> [email protected]_pool(new id wl_shm_pool@35, fd 15, 7893920)
[383512.965] -> [email protected]_buffer(new id wl_buffer@36, 0, 1916, 1030, 7664, 0)
[383528.459] -> [email protected](new id wl_callback@37)
[383528.493] -> [email protected](wl_buffer@36, 0, 0)
[383528.518] -> [email protected](3, 121, 517, 96)
[383528.539] -> [email protected](3, 217, 171, 769)
[383528.561] -> [email protected](490, 217, 30, 769)
[383528.583] -> [email protected](3, 986, 171, 40)
[383528.612] -> [email protected](490, 986, 1423, 40)
[383528.633] -> [email protected](3, 1026, 1910, 1)
[383528.659] -> [email protected]()
[383528.685] [email protected]_id(23)
[383528.697] [email protected]_id(24)
[383528.707] [email protected]_id(26)
[383528.717] [email protected]_id(27)
[383528.726] [email protected]_id(34)
[383528.736] [email protected]_id(33)
[383528.746] [email protected]_id(32)
[383528.752] [email protected]_id(31)
[383528.761] [email protected]()
[383528.769] [email protected](wl_output@10)
[383528.780] [email protected]()
[383528.787] [email protected]()
[383528.793] [email protected]()
[383529.662] [email protected]()
[383531.520] [email protected]_id(37)
[383531.534] [email protected](45443472)
[384341.638] [email protected](3971, wl_surface@16, 999.570312, 393.109375)
[384341.761] -> [email protected]_cursor(3971, wl_surface@13, 5, 5)
[384341.818] -> [email protected](wl_buffer@19, 0, 0)
[384341.878] -> [email protected](0, 0, 32, 32)
[384341.962] -> [email protected]()
[384342.001] [email protected](45444280, 999.570312, 393.109375)
[384438.725] [email protected](45444379, 1000.300781, 393.402344)
[384479.848] [email protected](3972, 45444421, 125, 1)
[384479.995] [email protected](3973, 64, 0, 16, 0)
[384487.496] [email protected](45444428, 1000.988281, 393.539062)
[384497.274] [email protected](3974, 45444438, 42, 1)
[384497.411] [email protected](3975, 65, 0, 16, 0)
[384515.682] [email protected](45444456, 1001.437500, 393.652344)
[384555.628] [email protected](45444496, 1001.882812, 393.761719)
[384585.260] [email protected](45444526, 1002.367188, 394.003906)
[384631.172] [email protected](45444572, 1002.906250, 394.410156)
[384650.388] [email protected](45444591, 1003.390625, 394.652344)
[384673.481] [email protected]()
[384673.888] -> [email protected]()
[384673.917] -> [email protected]()
[384673.935] -> [email protected]()
[384674.249] -> [email protected](new id wl_callback@37)
[384694.322] -> [email protected]()
[384694.348] -> [email protected]()
[384696.242] -> [email protected]()
[384696.272] -> [email protected]()
[384696.494] -> [email protected]()
[384696.521] -> [email protected]()
[384696.697] [email protected]_id(22)
[384696.718] [email protected]_id(21)
[384696.723] [email protected]_id(16)
[384696.730] [email protected]_id(37)
[384696.739] [email protected](3977, nil)
[384696.797] [email protected](3986, nil)
[384696.819] [email protected](3987)
[384701.793] -> [email protected]()
[384701.850] -> [email protected]()
[384701.942] -> [email protected]()
[384701.960] -> [email protected]()
[384701.987] -> [email protected]()
[384702.094] -> [email protected]()
[rik@T450 ~]$ WAYLAND_DEBUG=1 okular
[502144.584] -> [email protected]_registry(new id wl_registry@2)
[502144.616] -> [email protected](new id wl_callback@3)
[502144.757] [email protected]_id(3)
[502144.781] [email protected](1, "wl_shm", 1)
[502144.799] -> [email protected](1, "wl_shm", 1, new id [unknown]@4)
[502144.835] [email protected](2, "zwp_linux_dmabuf_v1", 3)
[502144.851] [email protected](3, "wl_drm", 2)
[502144.877] [email protected](4, "wl_compositor", 4)
[502144.892] -> [email protected](4, "wl_compositor", 3, new id [unknown]@5)
[502144.904] [email protected](5, "wl_subcompositor", 1)
[502144.920] -> [email protected](5, "wl_subcompositor", 1, new id [unknown]@6)
[502144.938] [email protected](6, "wl_data_device_manager", 3)
[502144.948] -> [email protected](6, "wl_data_device_manager", 1, new id [unknown]@7)
[502144.970] [email protected](7, "gamma_control_manager", 1)
[502144.988] [email protected](8, "zwlr_gamma_control_manager_v1", 1)
[502145.006] [email protected](9, "gtk_primary_selection_device_manager", 1)
[502145.023] [email protected](10, "zxdg_output_manager_v1", 2)
[502145.040] [email protected](11, "org_kde_kwin_idle", 1)
[502145.057] [email protected](12, "zwp_idle_inhibit_manager_v1", 1)
[502145.074] [email protected](13, "zwlr_layer_shell_v1", 1)
[502145.091] [email protected](14, "zxdg_shell_v6", 1)
[502145.108] [email protected](15, "xdg_wm_base", 2)
[502145.125] [email protected](16, "org_kde_kwin_server_decoration_manager", 1)
[502145.143] [email protected](17, "zwlr_export_dmabuf_manager_v1", 1)
[502145.160] [email protected](18, "zwlr_screencopy_manager_v1", 1)
[502145.177] [email protected](19, "wl_seat", 6)
[502145.196] -> [email protected](19, "wl_seat", 4, new id [unknown]@8)
[502145.220] -> [email protected]_data_device(new id wl_data_device@9, wl_seat@8)
[502145.236] [email protected](20, "zwp_virtual_keyboard_manager_v1", 1)
[502145.253] [email protected](21, "zwlr_input_inhibit_manager_v1", 1)
[502145.270] [email protected](22, "wl_output", 3)
[502145.288] -> [email protected](22, "wl_output", 2, new id [unknown]@10)
[502145.313] -> [email protected](new id wl_callback@11)
[502145.323] [email protected](4456)
[502145.391] [email protected]_id(11)
[502145.403] [email protected](0)
[502145.412] [email protected](1)
[502145.421] [email protected](875708993)
[502145.429] [email protected](875709016)
[502145.438] [email protected]("seat0")
[502145.447] [email protected](7)
[502145.460] -> [email protected]_keyboard(new id wl_keyboard@3)
[502145.472] -> [email protected]_pointer(new id wl_pointer@12)
[502145.482] -> [email protected]_surface(new id wl_surface@13)
[502145.493] -> [email protected]_touch(new id wl_touch@14)
[502145.518] [email protected](0, 0, 309, 173, 0, "Unknown", "0x123D", 0)
[502145.559] [email protected](0, 1920, 1080, 40033)
[502145.580] [email protected](1, 1920, 1080, 60049)
[502145.602] [email protected](1)
[502145.610] [email protected]()
[502145.621] [email protected](4456)
[502145.712] -> [email protected]_pool(new id wl_shm_pool@11, fd 5, 4096)
[502145.923] -> [email protected](12288)
[502146.038] -> [email protected](28672)
[502146.204] -> [email protected](61440)
[502147.962] -> [email protected](126976)
[502148.047] -> [email protected](258048)
[502148.176] -> [email protected](520192)
[502150.052] -> [email protected](1044480)
[502154.647] -> [email protected](2093056)
[502275.878] -> [email protected]_registry(new id wl_registry@15)
[502275.904] -> [email protected](new id wl_callback@16)
[502276.120] [email protected]_id(16)
[502276.144] [email protected](1, "wl_shm", 1)
[502276.159] [email protected](2, "zwp_linux_dmabuf_v1", 3)
[502276.176] -> [email protected](2, "zwp_linux_dmabuf_v1", 3, new id [unknown]@17)
[502276.201] [email protected](3, "wl_drm", 2)
[502276.219] -> [email protected](3, "wl_drm", 2, new id [unknown]@18)
[502276.246] [email protected](4, "wl_compositor", 4)
[502276.264] [email protected](5, "wl_subcompositor", 1)
[502276.278] [email protected](6, "wl_data_device_manager", 3)
[502276.294] [email protected](7, "gamma_control_manager", 1)
[502276.309] [email protected](8, "zwlr_gamma_control_manager_v1", 1)
[502276.330] [email protected](9, "gtk_primary_selection_device_manager", 1)
[502276.346] [email protected](10, "zxdg_output_manager_v1", 2)
[502276.364] [email protected](11, "org_kde_kwin_idle", 1)
[502276.380] [email protected](12, "zwp_idle_inhibit_manager_v1", 1)
[502276.397] [email protected](13, "zwlr_layer_shell_v1", 1)
[502276.418] [email protected](14, "zxdg_shell_v6", 1)
[502276.435] [email protected](15, "xdg_wm_base", 2)
[502276.453] [email protected](16, "org_kde_kwin_server_decoration_manager", 1)
[502276.469] [email protected](17, "zwlr_export_dmabuf_manager_v1", 1)
[502276.487] [email protected](18, "zwlr_screencopy_manager_v1", 1)
[502276.516] [email protected](19, "wl_seat", 6)
[502276.537] [email protected](20, "zwp_virtual_keyboard_manager_v1", 1)
[502276.554] [email protected](21, "zwlr_input_inhibit_manager_v1", 1)
[502276.570] [email protected](22, "wl_output", 3)
[502276.589] [email protected](4457)
[502276.600] -> [email protected](new id wl_callback@16)
[502276.749] [email protected]_id(16)
[502276.761] [email protected](808669761, 0, 0)
[502276.781] [email protected](808669761, 16777216, 1)
[502276.797] [email protected](808669761, 16777216, 2)
[502276.817] [email protected](808669784, 0, 0)
[502276.833] [email protected](808669784, 16777216, 1)
[502276.853] [email protected](808669784, 16777216, 2)
[502276.869] [email protected](875713089, 0, 0)
[502276.889] [email protected](875713089, 16777216, 1)
[502276.909] [email protected](875713089, 16777216, 2)
[502276.926] [email protected](875708993, 0, 0)
[502276.944] [email protected](875708993, 16777216, 1)
[502276.960] [email protected](875708993, 16777216, 2)
[502276.978] [email protected](875713112, 0, 0)
[502276.991] [email protected](875713112, 16777216, 1)
[502277.011] [email protected](875713112, 16777216, 2)
[502277.029] [email protected](875709016, 0, 0)
[502277.046] [email protected](875709016, 16777216, 1)
[502277.062] [email protected](875709016, 16777216, 2)
[502277.081] [email protected](892424769, 0, 0)
[502277.097] [email protected](892424769, 16777216, 1)
[502277.117] [email protected](892424769, 16777216, 2)
[502277.136] [email protected](909199186, 0, 0)
[502277.155] [email protected](909199186, 16777216, 1)
[502277.169] [email protected](909199186, 16777216, 2)
[502277.186] [email protected](538982482, 0, 0)
[502277.204] [email protected](538982482, 16777216, 1)
[502277.223] [email protected](538982482, 16777216, 2)
[502277.239] [email protected](540422482, 0, 0)
[502277.257] [email protected](540422482, 16777216, 1)
[502277.275] [email protected](540422482, 16777216, 2)
[502277.294] [email protected](943215175, 0, 0)
[502277.313] [email protected](943215175, 16777216, 1)
[502277.332] [email protected](943215175, 16777216, 2)
[502277.350] [email protected](842224199, 0, 0)
[502277.367] [email protected](842224199, 16777216, 1)
[502277.382] [email protected](842224199, 16777216, 2)
[502277.399] [email protected](961959257, 0, 0)
[502277.418] [email protected](961959257, 16777216, 1)
[502277.436] [email protected](961959257, 16777216, 2)
[502277.454] [email protected](825316697, 0, 0)
[502277.470] [email protected](825316697, 16777216, 1)
[502277.490] [email protected](825316697, 16777216, 2)
[502277.516] [email protected](842093913, 0, 0)
[502277.533] [email protected](842093913, 16777216, 1)
[502277.550] [email protected](842093913, 16777216, 2)
[502277.567] [email protected](909202777, 0, 0)
[502277.584] [email protected](909202777, 16777216, 1)
[502277.603] [email protected](909202777, 16777216, 2)
[502277.621] [email protected](875713881, 0, 0)
[502277.637] [email protected](875713881, 16777216, 1)
[502277.655] [email protected](875713881, 16777216, 2)
[502277.673] [email protected](961893977, 0, 0)
[502277.687] [email protected](961893977, 16777216, 1)
[502277.707] [email protected](961893977, 16777216, 2)
[502277.726] [email protected](825316953, 0, 0)
[502277.744] [email protected](825316953, 16777216, 1)
[502277.763] [email protected](825316953, 16777216, 2)
[502277.779] [email protected](842094169, 0, 0)
[502277.799] [email protected](842094169, 16777216, 1)
[502277.818] [email protected](842094169, 16777216, 2)
[502277.836] [email protected](909203033, 0, 0)
[502277.849] [email protected](909203033, 16777216, 1)
[502277.863] [email protected](909203033, 16777216, 2)
[502277.880] [email protected](875714137, 0, 0)
[502277.897] [email protected](875714137, 16777216, 1)
[502277.917] [email protected](875714137, 16777216, 2)
[502277.934] [email protected](842094158, 0, 0)
[502277.953] [email protected](842094158, 16777216, 1)
[502277.971] [email protected](842094158, 16777216, 2)
[502277.987] [email protected](909203022, 0, 0)
[502278.004] [email protected](909203022, 16777216, 1)
[502278.021] [email protected](909203022, 16777216, 2)
[502278.036] [email protected](1448695129, 0, 0)
[502278.056] [email protected](1448695129, 16777216, 1)
[502278.076] [email protected](1448695129, 16777216, 2)
[502278.095] [email protected](1498831189, 0, 0)
[502278.112] [email protected](1498831189, 16777216, 1)
[502278.132] [email protected](1498831189, 16777216, 2)
[502278.145] [email protected]("/dev/dri/card0")
[502278.187] -> [email protected](6)
[502278.199] [email protected](808669761)
[502278.207] [email protected](808669784)
[502278.213] [email protected](875713089)
[502278.220] [email protected](875713112)
[502278.231] [email protected](909199186)
[502278.240] [email protected](961959257)
[502278.251] [email protected](825316697)
[502278.261] [email protected](842093913)
[502278.269] [email protected](909202777)
[502278.278] [email protected](875713881)
[502278.285] [email protected](842094158)
[502278.292] [email protected](909203022)
[502278.301] [email protected](1448695129)
[502278.310] [email protected](1)
[502278.318] [email protected](4457)
[502278.327] -> [email protected](new id wl_callback@16)
[502278.375] [email protected]_id(16)
[502278.386] [email protected]()
[502278.394] [email protected](4457)
[502285.413] -> [email protected]_surface(new id wl_surface@16)
[502307.604] -> [email protected]_buffer(new id wl_buffer@19, 36864, 32, 32, 128, 0)
[502307.662] -> [email protected]_cursor(0, wl_surface@13, 5, 5)
[502307.687] -> [email protected](wl_buffer@19, 0, 0)
[502307.706] -> [email protected](0, 0, 32, 32)
[502307.728] -> [email protected]()
[502307.755] -> [email protected](14, "zxdg_shell_v6", 1, new id [unknown]@20)
[502307.790] -> [email protected]_xdg_surface(new id zxdg_surface_v6@21, wl_surface@16)
[502307.810] -> [email protected]_toplevel(new id zxdg_toplevel_v6@22)
[502307.823] -> [email protected]_title("Okular")
[502307.834] -> [email protected]_app_id("org.kde.okular")
[502307.844] -> [email protected]_buffer_scale(1)
[502310.257] -> [email protected]_buffer_transform(0)
[502310.305] -> [email protected]()
[502310.319] [email protected](1, fd 5, 49987)
[502319.121] [email protected]_info(50, 250)
[502347.995] [email protected](4459)
[502348.020] -> [email protected](4459)
[502348.044] [email protected](0, 0, array)
[502348.066] [email protected](4458)
[502348.078] -> [email protected]_configure(4458)
[502348.167] -> [email protected]_pool(new id wl_shm_pool@23, fd 15, 8574552)
[502348.194] -> [email protected]_buffer(new id wl_buffer@24, 0, 1926, 1113, 7704, 0)
[502373.952] -> [email protected](new id wl_callback@25)
[502374.002] -> [email protected](wl_buffer@24, 0, 0)
[502374.027] -> [email protected](3, 30, 1920, 1080)
[502374.051] -> [email protected]()
[502374.611] -> [email protected]_pool(new id wl_shm_pool@26, fd 15, 8574552)
[502374.640] -> [email protected]_buffer(new id wl_buffer@27, 0, 1926, 1113, 7704, 0)
[502389.708] -> [email protected](new id wl_callback@28)
[502389.748] -> [email protected](wl_buffer@27, 0, 0)
[502389.776] -> [email protected](532, 131, 156, 43)
[502389.802] -> [email protected]()
[502389.863] [email protected]_id(25)
[502389.883] [email protected]()
[502389.896] [email protected](4463, wl_surface@16, array)
[502389.925] -> [email protected](new id wl_callback@25)
[502389.942] [email protected]_offer(new id wl_data_offer@661333760)
[502389.958] [email protected]("UTF8_STRING")
[502389.972] [email protected]("COMPOUND_TEXT")
[502389.985] [email protected]("TEXT")
[502389.996] [email protected]("STRING")
[502390.008] [email protected]("text/plain;charset=utf-8")
[502390.020] [email protected]("text/plain")
[502390.032] [email protected]("SAVE_TARGETS")
[502390.047] [email protected](wl_data_offer@4278190080)
[502390.059] [email protected](4464, 0, 0, 16, 0)
[502390.098] [email protected](1916, 1030, array)
[502390.123] [email protected](4460)
[502390.142] -> [email protected]_configure(4460)
[502391.186] -> [email protected]()
[502391.213] -> [email protected]()
[502391.284] -> [email protected]_pool(new id wl_shm_pool@29, fd 15, 7893920)
[502391.316] -> [email protected]_buffer(new id wl_buffer@30, 0, 1916, 1030, 7664, 0)
[502409.049] -> [email protected](new id wl_callback@31)
[502409.104] -> [email protected](wl_buffer@30, 0, 0)
[502409.120] -> [email protected](3, 30, 1910, 997)
[502409.151] -> [email protected]()
[502409.197] -> [email protected](new id wl_callback@32)
[502409.212] -> [email protected](wl_buffer@30, 0, 0)
[502409.234] -> [email protected](3, 30, 1910, 997)
[502409.259] -> [email protected]()
[502409.269] -> [email protected](new id wl_callback@33)
[502409.281] -> [email protected](wl_buffer@30, 0, 0)
[502409.300] -> [email protected](3, 30, 1910, 997)
[502409.323] -> [email protected]()
[502409.355] [email protected]_id(25)
[502409.369] [email protected]_id(28)
[502409.378] [email protected]()
[502409.384] [email protected](4464)
[502410.477] -> [email protected]()
[502410.500] -> [email protected]()
[502410.578] -> [email protected]_pool(new id wl_shm_pool@25, fd 15, 7893920)
[502410.612] -> [email protected]_buffer(new id wl_buffer@28, 0, 1916, 1030, 7664, 0)
[502426.219] -> [email protected](new id wl_callback@34)
[502426.292] -> [email protected](wl_buffer@28, 0, 0)
[502426.330] -> [email protected](3, 121, 517, 96)
[502426.352] -> [email protected](3, 217, 171, 769)
[502426.368] -> [email protected](490, 217, 30, 769)
[502426.385] -> [email protected](3, 986, 171, 40)
[502426.453] -> [email protected](490, 986, 1423, 40)
[502426.482] -> [email protected](3, 1026, 1910, 1)
[502426.523] -> [email protected]()
[502427.583] -> [email protected]_pool(new id wl_shm_pool@35, fd 15, 7893920)
[502427.646] -> [email protected]_buffer(new id wl_buffer@36, 0, 1916, 1030, 7664, 0)
[502440.495] -> [email protected](new id wl_callback@37)
[502440.540] -> [email protected](wl_buffer@36, 0, 0)
[502440.560] -> [email protected](3, 121, 517, 96)
[502440.585] -> [email protected](3, 217, 171, 769)
[502440.609] -> [email protected](490, 217, 30, 769)
[502440.633] -> [email protected](3, 986, 171, 40)
[502440.655] -> [email protected](490, 986, 1423, 40)
[502440.679] -> [email protected](3, 1026, 1910, 1)
[502440.701] -> [email protected]()
[502440.727] [email protected]_id(23)
[502440.739] [email protected]_id(24)
[502440.746] [email protected]_id(26)
[502440.754] [email protected]_id(27)
[502440.763] [email protected]_id(34)
[502440.773] [email protected]_id(33)
[502440.784] [email protected]_id(32)
[502440.791] [email protected]_id(31)
[502440.800] [email protected]()
[502440.806] [email protected](wl_output@10)
[502440.818] [email protected]()
[502440.823] [email protected]()
[502440.827] [email protected]()
[502441.742] [email protected]()
[502451.011] [email protected]_id(37)
[502451.047] [email protected](45562391)
[502512.230] [email protected](4466, wl_surface@16, 471.695312, 699.425781)
[502512.357] -> [email protected]_cursor(4466, wl_surface@13, 5, 5)
[502512.430] -> [email protected](wl_buffer@19, 0, 0)
[502512.490] -> [email protected](0, 0, 32, 32)
[502512.576] -> [email protected]()
[502512.619] [email protected](45562451, 471.695312, 699.425781)
[502987.230] [email protected](45562928, 471.003906, 697.574219)
[503266.057] [email protected](45563206, 470.941406, 697.453125)
[503418.442] [email protected](4467, 45563359, 272, 1)
[503423.861] -> [email protected](new id wl_callback@37)
[503423.915] -> [email protected](wl_buffer@36, 0, 0)
[503423.954] -> [email protected](173, 216, 341, 1)
[503424.031] -> [email protected](173, 217, 1, 809)
[503424.092] -> [email protected](490, 217, 24, 809)
[503424.166] -> [email protected](173, 1026, 341, 1)
[503424.238] -> [email protected]()
[503425.457] [email protected]_id(37)
[503425.495] [email protected]()
[503425.543] [email protected](45563366)
[503505.232] [email protected](4468, 45563446, 272, 0)
[503534.097] [email protected](45563475, 470.941406, 697.453125)
[503680.004] [email protected](45563621, 470.980469, 697.414062)
[503695.652] [email protected](4469, 45563637, 42, 1)
[503695.698] [email protected](4470, 1, 0, 16, 0)
[503696.031] [email protected](4471, 45563637, 125, 1)
[503696.063] [email protected](4472, 65, 0, 16, 0)
[503698.123] [email protected](45563639, 471.019531, 697.453125)
[503756.549] [email protected](45563697, 471.105469, 697.710938)
[503804.477] [email protected](45563745, 471.257812, 697.863281)
[503823.962] [email protected]()
[503824.350] -> [email protected]()
[503824.381] -> [email protected]()
[503824.398] -> [email protected]()
[503824.758] -> [email protected](new id wl_callback@37)
[503859.735] -> [email protected]()
[503859.771] -> [email protected]()
[503861.676] -> [email protected]()
[503861.697] -> [email protected]()
[503861.950] -> [email protected]()
[503861.960] -> [email protected]()
[503862.257] [email protected]_id(22)
[503862.278] [email protected]_id(21)
[503862.283] [email protected]_id(16)
[503862.289] [email protected]_id(37)
[503862.298] [email protected](4474, nil)
[503862.309] [email protected](4483, nil)
[503862.319] [email protected](4484)
[503864.047] -> [email protected]()
[503864.079] -> [email protected]()
[503864.164] -> [email protected]()
[503864.185] -> [email protected]()
[503864.199] -> [email protected]()
[503864.294] -> [email protected]()
@Rikorose:
Point sized fonts in Qt are meant to be physically the same size regardless of what DPI you screen is. It's meant as a way for the application programmer to say this character is going to be this size in mm in the physical world. It becomes a problem when applications mix pixel sized UI elements (which follow scale factor) with point sized fonts (which follow real world sizes). Since you're using a very low scale factor (1) on a display with a very high dpi (157), things will look weird for applications that mix the two concepts.
So unless I've overseen something, these are application bugs. They should probably switch to pixel sized fonts for the things that should scale with scale factor and not with the DPI.
A workaround is of course to set QT_WAYLAND_FORCE_DPI, and lie about your DPI. Which is what we will do in Qt 5.12, because apparently, neither compositors nor applications can be trusted. Sigh...
However, just to make sure I'm not mistaken, can you run the following and make sure everything makes sense?
#!/usr/bin/env qml
import QtQuick 2.7
import QtQuick.Window 2.2
Window {
id: win
visible: true
width: 600
height: 300
Column {
anchors.fill: parent
Text { text: "Screen name: " + win.screen.name }
Text { text: "Screen model: " + win.screen.model }
Text { text: "Screen width: " + win.screen.width }
Text { text: "Screen height: " + win.screen.height }
Text { text: "Screen devicePixelRatio: " + win.screen.devicePixelRatio }
Text { text: "Screen pixelDensity: " + win.screen.pixelDensity }
Text { text: "\"pixels\" per inch: " + win.screen.pixelDensity * 25.4 }
Text { text: "Physical DPI: " + win.screen.pixelDensity * 25.4 * win.screen.devicePixelRatio }
Text { text: "Physical width: " + win.screen.width / win.screen.pixelDensity }
Text { text: "Physical height: " + win.screen.height / win.screen.pixelDensity }
Text { text: "pixelSize 12"; font.pixelSize: 12 }
Text { text: "pointSize 12"; font.pointSize: 12 }
}
}
EDIT: And btw, the reason it looks "right" with eglfs, is probably because it doesn't know the correct physical size of your screen. It can be set through QT_QPA_EGLFS_KMS_CONFIG.
It opens maximized (not floating) for me in sway:

@johanhelsing
As said, QT_WAYLAND_FORCE_DPI=96 fixes the issue, but leads to some menus (e.g. all menus from the menubar in krusader) are dispaced, so that it isn't usable really. Does anyone experience this, too?
I have also this issue, but only when launching sway through sddm.
If I launch sway from VT command line, everything seems to be scaled correctly.
Any ideas what could cause the different behaviour?
The .desktop file has nothing special and the launcher script simply has the same command line that works when launched manually (QT_WAYLAND_DISABLE_WINDOWDECORATION=1 XKB_DEFAULT_LAYOUT=fi sway)
Different monitors preserve Window size - finally; however, Qt is still not High DPI aware in 5.11.2 on Windows. Scaling issue abounds for non HiDPI monitors still (years of promises now). When will it be fixed?
Hello everyone,
I'm facing similar scaling issues with QT5 apps, too. (Running 1.0-0.beta.2).
If I start up my computer and start Sway right away, Nextcloud client (QT-based) starts up automatically. It is scaled too big (compare to terminal - this is a FullHD screen):

(Also note the glitch at the bottom border of the qt window)
But if I start up my Gnome Shell first and then switch to Sway later, everything is fine:

My guess is that Gnome sets some properties to make things work as they should, and Sway doesn't. But I'm not sure. The workaround is reproducible on my machine.
If you set Xft.dpi to 96 in your Xresources and load these on startup, does it work better?
Unfortunately it seems to have no effect at all. I've tried different values from 80 to 150, but couldn't tell a difference (in general, also concerning the size of QT apps)
Correct me if I'm wrong, but as far as I understand Xresources is not relevant for Wayland sessions, because it says "X", is it?
Oh, right. These font issues generally happen with Xwayland, but it isn't the case here. In which case…
My guess is that Gnome sets some properties to make things work as they should, and Sway doesn't.
No, with pure Wayland there isn't anything like this.
@ThomasLeister (and also @cg9999): My guess it that you are experiencing varying behavior because you are sometimes not running Qt using the wayland backend.
My guess at what's happening, making a lot of assumptions:
Qt (5.11 an newer) will select the wayland plugin if XDG_SESSION_TYPE=wayland is set in the environment. This is normally done when you log in using a graphical login manager.
However, we (Qt) are currently blacklisting gnome-shell and run our X backend there instead due to this bug: https://gitlab.gnome.org/GNOME/mutter/issues/199
So:
XDG_SESSION_TYPE is set)XDG_SESSION_TYPE is unset)The reason it's different, is that the application is using point-sized fonts, which according to our documentation, is supposed to be physically sized. I.e.
[...] sets the point size in a device-independent manner. However, specifying fonts in points and other sizes in pixels causes problems, because points are independent of the display density. A frame around a string that looks correct on low DPI displays is likely to become too small on high DPI displays, causing the text to be clipped.
So arguably it's an application bug. So why is it working on X, then? Well the answer is simple: On X it's hard or impossible to get reliable DPI information, so it's almost always set to 96 or some value close to that.
On wayland, we usually have accurate DPI information available, but since all the applications developed for X assumed a constant DPI of 96, without any consideration that it might change, they are now looking incredibly ugly on Wayland, and people start believing it's a bug either in the compositor or in the Qt Wayland plugin.
Now we have two options:
Somewhat disappointingly, we chose the latter starting with Qt 5.12. The old behavior can be re-enabled by setting QT_WAYLAND_FORCE_DPI=physical.
If you're on older Qt and would just like your Qt applications to look nice, you can set QT_WAYLAND_FORCE_DPI=96 and get the new default behavior immediately.
@johanhelsing: Makes sense, and I can confirm that now with QT 5.12 the fonts are scaled similarly to X with sway/wayland session.
@johanhelsing thanks for explaining! As I'm running QT 4.8.7 on Fedora 29, I'll just start my applications with QT_WAYLAND_FORCE_DPI=96 (and wait for QT 5.12).
But still it would make sense to ask application developers to change their code to pixel sized or point sized elements only, right? Because even if QT 5.12 introduces a "fix" for that problem, problems will again occur if you try to change DPI. It that correct?
@ThomasLeister, yes, reporting bugs to those projects would make sense. It would also make it a lot easier for those projects if they decide to add support for macOS, for instance, where the DPI is hard coded to 72 iirc.
Closing this, as I don't see any sway bug in there. Let me know if I've missed anything.
Most helpful comment
@ThomasLeister (and also @cg9999): My guess it that you are experiencing varying behavior because you are sometimes not running Qt using the wayland backend.
My guess at what's happening, making a lot of assumptions:
Qt (5.11 an newer) will select the wayland plugin if
XDG_SESSION_TYPE=waylandis set in the environment. This is normally done when you log in using a graphical login manager.However, we (Qt) are currently blacklisting gnome-shell and run our X backend there instead due to this bug: https://gitlab.gnome.org/GNOME/mutter/issues/199
So:
XDG_SESSION_TYPEis set)XDG_SESSION_TYPEis unset)Now your fonts are looking different than they do on X. The questions is still, is it a bug? And whose bug is it?
The reason it's different, is that the application is using point-sized fonts, which according to our documentation, is supposed to be physically sized. I.e.
So arguably it's an application bug. So why is it working on X, then? Well the answer is simple: On X it's hard or impossible to get reliable DPI information, so it's almost always set to 96 or some value close to that.
On wayland, we usually have accurate DPI information available, but since all the applications developed for X assumed a constant DPI of 96, without any consideration that it might change, they are now looking incredibly ugly on Wayland, and people start believing it's a bug either in the compositor or in the Qt Wayland plugin.
Now we have two options:
Somewhat disappointingly, we chose the latter starting with Qt 5.12. The old behavior can be re-enabled by setting
QT_WAYLAND_FORCE_DPI=physical.If you're on older Qt and would just like your Qt applications to look nice, you can set
QT_WAYLAND_FORCE_DPI=96and get the new default behavior immediately.