Bug 1381828
Summary: | Broken window scaling for some QT5 applications | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Marco Kundt <mrckndt> |
Component: | qt5-qtbase | Assignee: | Rex Dieter <rdieter> |
Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 26 | CC: | amlau, ben.r.xiao, dtantsur, fzatlouk, geert.warrink, helio, jan.public, jgrulich, jreznik, k333152, kparal, ksyblast, laurent.rineau__fedora, leigh123linux, mkourim, nixuser, rdieter, than, thomas.pi |
Target Milestone: | --- | Keywords: | CommonBugs, Reopened |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | https://fedoraproject.org/wiki/Common_F25_bugs#qt5-scaling-too-aggresive | ||
Fixed In Version: | qt5-qtbase-5.7.1-13.fc25 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-05-29 11:46:56 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Attachments: |
This affects all of Qt5 apps in my case. It doesn't matter if I use Wayland, XWayland or pure X, scaling is broken everywhere. I can't find any patterns in breakage, it depends on connecting/disconnecting external monitor (both display and monitor are FULL HD). I've attached screenshots, I hope I didn't do any mistake when naming the files. Apart from broken scaling, VLC outputs video only to 1/4th of screen. I am running Fedora 25, so qt5-qtbase-5.7.0-3 Created attachment 1212158 [details]
Calibre on Wayland (Native)
Created attachment 1212159 [details]
Calibre on Wayland (XWayland)
Created attachment 1212160 [details]
Spyder on Wayland (Native)
Created attachment 1212161 [details]
Spyder on Wayland (XWayland)
Created attachment 1212162 [details]
Spyder on Wayland (XWayland)
Created attachment 1212163 [details]
Spyder on X
Could you try it without qgnomeplatform? Marco and Frantisek, can you please post the output of xrandr --list? (In reply to Martin Bříza from comment #9) > Marco and Frantisek, can you please post the output of xrandr --list? $ xrandr --list xrandr: unrecognized option '--list' Try 'xrandr --help' for more information. $ xrandr Screen 0: minimum 320 x 200, current 1920 x 2160, maximum 8192 x 8192 XWAYLAND0 connected 1920x1080+0+1080 310mm x 170mm 1920x1080 59.96*+ XWAYLAND2 connected 1920x1080+0+0 510mm x 290mm 1920x1080 59.96*+ Will post result from X session when I have time to logout. Btw, I've figured out this behaviour: Laptop screen = bad scaling External screen in the office = bad scaling External screen @home = OK All of them are 1920 x 1080 (but different physical size). I'll post xrandr output for all of them. Ok, my laptop screen: eDP1 connected 1920x1080+0+1080 (normal left inverted right x axis y axis) 310mm x 170mm 1920x1080 60.01*+ 1400x1050 59.98 1600x900 60.00 1280x1024 60.02 1280x960 60.00 1368x768 60.00 1280x720 60.00 1024x768 60.00 1024x576 60.00 960x540 60.00 800x600 60.32 56.25 864x486 60.00 640x480 59.94 720x405 60.00 640x360 60.00 (UI elements too big on X) External monitor: DP2-2 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 510mm x 290mm 1920x1080 60.00*+ 50.00 59.94 1680x1050 59.88 1400x1050 59.95 1600x900 60.00 1280x1024 75.02 60.02 1440x900 59.90 1280x960 60.00 1280x800 59.91 1152x864 75.00 1280x720 60.00 50.00 59.94 1024x768 75.03 70.07 60.00 832x624 74.55 800x600 72.19 75.00 60.32 56.25 720x576 50.00 720x480 60.00 59.94 640x480 75.00 72.81 66.67 60.00 59.94 720x400 70.08 (All good) If I run calibre without having external monitor connected, it is broken in a different way (UI elements still too big but not as much as if it's launched with connected external monitor and then placed to laptop screen). Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767 eDP1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 280mm x 160mm 1920x1080 60.04*+ 1400x1050 59.98 1600x900 60.00 1280x1024 60.02 1280x960 60.00 1368x768 60.00 1280x720 60.00 1024x768 60.00 1024x576 60.00 960x540 60.00 800x600 60.32 56.25 864x486 60.00 640x480 59.94 720x405 60.00 640x360 60.00 I wasn't able to reproduce this on Fedora 25 with any of my 1080p monitors (laptop 15", 23" and 24"). Did you increase font scaling or you didn't touch any scaling at all? What happens if you switch to another QPA, e.g using "export QT_QPA_PLATFORMTHEME=gtk3"? Btw. looks that both Calibre and Spyder are written in PyQt4, which means they are not affected by any QPA (including qgnomeplatform). Regarding seafile-client, I wasn't able to find the source code for that, but I found in changelog they handle HiDPI themself and maybe break it somehow. Would be nice to test your problems with any other Qt5 application, like dolphin from KDE. (In reply to Jan Grulich from comment #15) > Btw. looks that both Calibre and Spyder are written in PyQt4, which means > they are not affected by any QPA (including qgnomeplatform). Interesting but: if I run calibre/spyder with QT_QPA_PLATFORM=wayland-egl: decorations are "broken" (some blue qt style) I see that application as native Wayland window (checked through looking glass in gnome) scaling is working fine without that: decorations are inherited from gtk theme scaling is broken app is running under XWayland (looking glass) I forgot to mention that I am using spyder from PIP (so it's compiled with PyQT5). But calibre is from Fedora repositories (I've built src.rpm from f26). (In reply to Jan Grulich from comment #14) > I wasn't able to reproduce this on Fedora 25 with any of my 1080p monitors > (laptop 15", 23" and 24"). Did you increase font scaling or you didn't touch > any scaling at all? What happens if you switch to another QPA, e.g using > "export QT_QPA_PLATFORMTHEME=gtk3"? I was using plain GNOME, no modifications to the QT_QPA_PLATFORMTHEME variable. So, i think it was set to 'gnome' since it's the default behaviour? The scaling wasn't changed at all. (In reply to Marco Kundt from comment #17) > (In reply to Jan Grulich from comment #14) > > I wasn't able to reproduce this on Fedora 25 with any of my 1080p monitors > > (laptop 15", 23" and 24"). Did you increase font scaling or you didn't touch > > any scaling at all? What happens if you switch to another QPA, e.g using > > "export QT_QPA_PLATFORMTHEME=gtk3"? > > I was using plain GNOME, no modifications to the QT_QPA_PLATFORMTHEME > variable. So, i think it was set to 'gnome' since it's the default > behaviour? The scaling wasn't changed at all. I forgot to mention that i switched back to my previous distro/install. Maybe František can try the value 'gtk3' for the variable. I will again try when F25 was released. I can easily reproduce this using mediawriter package (or vlc). On laptop screen, QT apps are too big. On external screen, everything is fine. On a second external screen, everything is fine until I rotate it, then apps are resized a bit. All screens are 1920x1080. $ xrandr Screen 0: minimum 320 x 200, current 4920 x 1920, maximum 8192 x 8192 XWAYLAND1 connected 1920x1080+1920+0 510mm x 290mm 1920x1080 59.96*+ XWAYLAND6 connected 1080x1920+3840+0 510mm x 290mm 1080x1920 59.96*+ XWAYLAND7 connected 1920x1080+0+0 310mm x 170mm 1920x1080 59.96*+ Created attachment 1213902 [details]
mediawriter laptop vs external screen
This shows mediawriter changes when moving between laptop and external screen.
Created attachment 1213904 [details]
mediawriter with QT_QPA_PLATFORM=wayland-egl
The same approach using QT_QPA_PLATFORM=wayland-egl means the window is too big everywhere (doesn't change sizes).
(btw, QT_QPA_PLATFORMTHEME=gtk3 has no effect, neither does removing qgnomeplatform)
Created attachment 1213905 [details]
mediawriter on 2 external monitors
When using 2 external monitors, mediawriter does not change size when moving between them (all is OK).
Created attachment 1213906 [details]
mediawriter on 2 external monitors when 1 is rotated
But when one of the 2 external monitors is rotated, mediawriter starts to change size slightly.
gnome-shell-3.22.1-2.fc25.x86_64 gtk3-3.22.2-1.fc25.x86_64 mediawriter-3.97.2-0.fc25.x86_64 mutter-3.22.1-5.fc25.x86_64 qgnomeplatform-0.2-10.20161024git.fc25.x86_64 qt5-qtbase-5.7.0-3.fc25.x86_64 Don't take mediawriter into account as it tries to scale the UI itself if I'm not wrong. Right now we have confirmed that the scaling is broken for PyQt applications, VLC and seafile-client (which we don't know how is implemented). Please try some KDE applications (e.g. dolphin, kcalc, gwenview) which don't try to implement the scaling themself or they are not written in Python. I don't see any issues with dolphin, kcalc or gwenview. So after some debugging I have some remarks about this. First, this bug appears only in the applications that have set the AA_EnableHighDpiScaling QApplication flag, which is just a fraction of all Qt applications - this applies to VLC, Calibre and Fedora Media Writer 4.0.0 for example (FMW versions below 4 didn't use this flag). The biggest part of it lies in the fact Qt considers every display of DPI above 144 a highDPI display, so it sets up 2x scaling. Another problem, though, is how it actually scales the application on different displays. It seems to compare the DPIs of the screens and scale the app further using the ratio between these two. That seems to be the reason Frantisek's applications had so small fonts, etc. I think it would be a good start to change the scaling threshold to 192 to match the threshold of GNOME application scaling. It's possible to workaround this issue by setting QT_SCALE_FACTOR=1 (when launching the application, in ~/.bash_profile, etc.) With the recent update of Calibre and the qt5 libraries in Fedora 24, the problem is now also present in this release of Fedora. After a installing the Fedora 25 (completly new, no in-place upgrade) i'm experiencing the same behaviour with at least seafile under Wayland. QT_SCALE_FACTOR=1 command doesn't work either (see last attachment). Created attachment 1234302 [details]
Seafile-client on Fedora 25 w/ Wayland
>I think it would be a good start to change the scaling threshold to 192 to match the threshold of GNOME application scaling. Seems this is really related to QT (guess the component bug should be re-assigned). In KDE Neon / Kubuntu I'm experiencing exactly the same if Wayland is used ( https://blog.martin-graesslin.com/blog/2016/05/running-plasma-wayland-on-kde-neon/ ). There all QT apps, including the system settings don't even fit on my 1920x1080 screen tablet. The task bar and window controls are fine, but all symbols, fonts & GUI elements from QT are totally unusable. Created attachment 1236979 [details]
Fedora25_Gnome_Applications_Scaled_And_Unusable
E.g. Terminal & system settings don't even fit on a 11" Dell Venue 11 Pro FullHD 1920x1080, because they're upscaled that big.
If I change the resolution from 1920x1080 to 1600x900, at least Fedora & GTK Gnome apps are correctly scaled and usable again, Calibre can be used with the "QT_SCALE_FACTOR=1 calibre" workaround. Tested with the original Fedora 25 Live image (same happened to my original Fedora installation after the ugrade to 25, if the resolution is not lowered Fedora becomes unusable on a small FullHD screen). But there's definitely sth. really messed up currently. (In reply to sac from comment #33) > Created attachment 1236979 [details] > Fedora25_Gnome_Applications_Scaled_And_Unusable > > E.g. Terminal & system settings don't even fit on a 11" Dell Venue 11 Pro > FullHD 1920x1080, because they're upscaled that big. Those are GNOME applications though. Seemingly the same, unfortunately though a different problem that should be tracked elsewhere. For the Seafile-client there is already an issue (https://github.com/haiwen/seafile-client/issues/809) and I let them know what the culprit is. I hope they revert the auto scale feature until QT changes the hiDPI threshold or nearly everyone has real hiDPI display. Created attachment 1243871 [details]
Proposed fix
This patch moves the threshold for 2x scaling from the DPI of 144 to 192, the same value GNOME uses. It's not a complete solution, however it will improve the behavior for most people and will make Qt applications act the same as GTK3.
Triaging to qt5-qtbase component, and applying the proposed patch I just installed the freshly build qt5-qtbase packages and the patch works for me as expected. The seafile-client is scaled right without any env-variables. Thank you very much. qt5-qtbase-5.7.1-13.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-d991dd7e59 qt5-qtbase-5.7.1-13.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-d991dd7e59 qt5-qtbase-5.7.1-13.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report. cutegram still looks ugly, and QT_SCALE_FACTOR=1 only solves fonts. I guess they may be using their own logic.. The scaling problem with Calibre and e-book viewer is back in Fedora 26. On Fedora 26 I have crazy big interface fonts with VLC. Subtitle fonts and interface in general look ok. QT_SCALE_FACTOR=1 only resizes the window, no impact on interface or fonts. However everything looks nice with an external monitor connected. I suspect your 2 screens may have (very) different dpi Entertainment system is Fedora 26 with a large sized Samsung TV as a monitor (but only 1080p) I have crazy interface in VLC, all tool bar buttons are at least 4 x their regular size. Thankfully it will still play videos full screen but any GUI component, when visible, is crazy proportions. This message is a reminder that Fedora 25 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '25'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 25 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Apparently still valid for F26, I can reproduce it only openshot-qt, see also comment 45 The problem is also valid for F27, I can reproduce it with Calibre and rhe ebook reader. This message is a reminder that Fedora 26 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '26'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 26 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. Stil exists in Fedora 27 and Fedora 28. Everything started this week. Upgrade to Fedora to version 28 does not fixed anything. QT_SCALE_FACTOR=1 fixes the problem for me for applications started from the console. |
Created attachment 1207457 [details] Screenshot of broken seafile Description of problem: Some QT5 programs seems to have problems with the window scaling. I'm using an 1920x1080 display without scaling but for example seafile-client is enormous (which can be seen in the attachment). The same appears to happen to the newly to QT5-ported vlc, so i think it's rather an Qt bug than seafile-client. Strangely i don't having any problems with yubikey-personalisation-gui which also depends on Qt5. Version-Release number of selected component (if applicable): qt5-qtbase: 5.6.1-3 seafile-client: 5.1.1-3 qgnomeplatform: 0.2-9.20160718git How reproducible: Install and open seafile-client on 1080p display. Actual results: See attachment. Additional info: The Fedora 24 install is freshly installed and the computer is an ThinkPad x250 with Intel graphics.