Created attachment 124645 [details] Screenshot of Libre Office Writer being up-scaled too much on Wayland with GTK3 I am running Libre Office (version 5.1.2.2.0+) on a Laptop with a HiDPI screen. When using Wayland as the default display server, the UI of all Libre Office applications is up-scaled too much (see attached screenshot). When I am running a traditional X session instead, the issue disappears. These are the specifications of my system: OS: Arch Linux 64 bit DE: GNOME 3.20.1 on Wayland GTK version: 3.20.3 Display resolution: 2880 x 1620 px Maybe the reason for this issue is, that Wayland automatically scales GTK3 applications based on the display's DPI. So the HiDPI scaling is done twice - by Libre Office as well as by Wayland/GTK - causing the UI elements to have double the size they should have.
Confirmed on Reddit: https://www.reddit.com/r/libreoffice/comments/4hn78i/bug_confirmation_request_hidpi_scaling_broken_on/
*** Bug 100613 has been marked as a duplicate of this bug. ***
A workaround I found is to edit the file at: .config/libreoffice/4/user/registrymodifications.xcu Search for the following entry: <item oor:path="/org.openoffice.Office.Common/View"><prop oor:name="FontScaling" oor:op="fuse"><value>50</value></prop></item> The font scaling can then be set below 80. See the attached screenshot for the results I get. The only problem is that the icons are too big, I haven't found any setting to change the scaling for those.
Created attachment 126387 [details] Screenshot with font scaling workaround
I found that the following command works: env GDK_DPI_SCALE=0.5 libreoffice --writer With this the icons and font are scaled correctly and I can keep the font scaling in the options at 100%.
I can confirm, that when using the command "env GDK_DPI_SCALE=0.5 libreoffice --writer", the UI is properly scaled. However, all text and icons are blurry when using this method (see attached screenshot).
Created attachment 126388 [details] Correctly scaled, but blurry UI when using GDK_DPI_SCALE=0.5 parameter
Created attachment 126442 [details] screenshot at 3200x1800 showing blurriness and titlebar text shrinkage with GDK_DPI_SCALE=0.5 I can confirm the UI blurriness with the GDK_DPI_SCALE=0.5 env var. I might also point out that this workaround also shrinks titlebar text, as you can see in the attachment. This is complete conjecture, but I don't see this env var change as playing any role in a solution for this bug. The best practical workaround I've found, if anyone hasn't already seen this, is to set the env var SAL_USE_VCLPLUGIN=gtk Obviously, though, that won't be a final solution for this bug, as it just switches away from GTK3 features entirely.
This bug is not limited to Writer. It affects all LibreOffice apps on xWayland. This bug makes LibreOffice nearly unusable on xWayland without a workaround because all the dialog boxes stretch way outside screen boundaries. Here is a better workaround until someone can fix this, don't use gtk3: $ env SAL_USE_VCLPLUGIN=gtk libreoffice --writer
Is this going to be fixed anytime soon? With the upcoming Fedora 25 release (Which is going to use Wayland as a default display server as far as I understand) I'd consider this bug major/critical ... Sure, i can always start LibreOffice without the GTK3 plugin, but then that's kind of annoying.
Created attachment 127971 [details] Screenshot of LibreOffice Writer on Dell XPS 13 2015 in Wayland mode This is a big deal-breaker when using LibreOffice in Wayland mode. The UI as a whole is utterly unusable in this mode, and the GDK_DPI_SCALE=0.5 trick seen a few posts ago no longer appears to improve the situation at all. For reference, I am running LibreOffice 5.2.2 on 64-bit Arch Linux on a Dell XPS 13 2015 laptop. Below is the standard output I see in the terminal when running Writer. It appears that something about negative widget dimensions might be the root of the problem? (soffice:14180): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed (soffice:14180): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed (soffice:14180): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed <HUNDREDS MORE OMITTED HERE> (soffice:14180): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed *** BUG *** In pixman_region32_init_rect: Invalid rectangle passed Set a breakpoint on '_pixman_log_error' to debug (soffice:14180): Gtk-WARNING **: GtkAccelLabel 0x2dbe3c0 attempted to adjust its size allocation from 31,1958056732 114x1958056720 to 31,-1357882214 114x19. adjust_size_allocation must keep allocation inside original bounds *** BUG *** In pixman_region32_init_rect: Invalid rectangle passed Set a breakpoint on '_pixman_log_error' to debug (soffice:14242): Gtk-WARNING **: GtkAccelLabel 0x2427f50 attempted to adjust its size allocation from 29,2029298981 1x169108238 to 29,2113853090 1x19. adjust_size_allocation must keep allocation inside original bounds (soffice:14242): Gtk-WARNING **: Negative content width -1 (allocation 9, extents 5x5) while allocating gadget (node menuitem, owner GtkModelMenuItem) (soffice:14242): Gtk-WARNING **: Negative content width -1 (allocation 9, extents 5x5) while allocating gadget (node menuitem, owner GtkModelMenuItem) (soffice:14242): Gtk-WARNING **: Negative content width -1 (allocation 9, extents 5x5) while allocating gadget (node menuitem, owner GtkModelMenuItem) (soffice:14242): Gtk-WARNING **: Negative content width -1 (allocation 9, extents 5x5) while allocating gadget (node menuitem, owner GtkModelMenuItem) (soffice:14242): Gtk-WARNING **: Negative content width -1 (allocation 9, extents 5x5) while allocating gadget (node menuitem, owner GtkModelMenuItem) <HUNDREDS MORE OMITTED HERE> (soffice:14242): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed (soffice:14242): Gtk-WARNING **: GtkAccelLabel 0x249a1e0 attempted to adjust its size allocation from 29,2029298981 1x169108238 to 29,2113853090 1x19. adjust_size_allocation must keep allocation inside original bounds
The latest patch set of https://bugzilla.gnome.org/show_bug.cgi?id=771841 fixes the weird menu placement issue seen in attachment #127917 [details]
I meant attachment #127971 [details] sorry
> The latest patch set of https://bugzilla.gnome.org/show_bug.cgi?id=771841 > fixes the weird menu placement issue seen in attachment #127917 [details] I have the same issues on an HiDPI screen. Eyal Kalderon did not mention that the issues have been introduced after updating to GTK 3.22. But this is clearly the root of the problem. I already applied the patches you mentioned and it solves the menu placement. Using GDK_DPI_SCALE=0.5 fixes the size of the icons but also shrink the size of the font. My observation about the scaled images are, that they are now somehow scaled twice. Once by some instance which was added by the updated and once by another instance (GNOME??) which already scaled it before the updated. In Eclipse where the icons are also scaled twice the second instance is SWT. Turning of the swt autoscale fixes the overlarge icons but leaves some tiny icons which, for some reason are not scaled by the other instance. 3 quarters of the screen are still clipped and no option seemed to help.
*** Bug 103220 has been marked as a duplicate of this bug. ***
Tomaz - can you poke at this if it's going to be quick ? sub 1/2 day or so ?
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=d9a6e0023c9a192850b9db00f8120fbcc4256ec9 Resolves: tdf#99508 ensure sufficient size for hidpi backing surface It will be available in 5.3.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-5-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=1df0bc489ae9bdfdac48bf6cb945edc3b54ab5b2&h=libreoffice-5-3 Resolves: tdf#99508 ensure sufficient size for hidpi backing surface It will be available in 5.3.0.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-5-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=2c24cc40e37ffb09d6a4fa88ca9d9b9d346982cc&h=libreoffice-5-2 Resolves: tdf#99508 ensure sufficient size for hidpi backing surface It will be available in 5.2.4. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
It’s been 48 hours. Should there not be a patch available at: http://dev-builds.libreoffice.org/daily/libreoffice-5-2/Linux-rpm_deb-x86_64@70-TDF for those looking for a deb amd64?
(In reply to yolo from comment #20) > It’s been 48 hours. Should there not be a patch available at: > > http://dev-builds.libreoffice.org/daily/libreoffice-5-2/Linux-rpm_deb- > x86_64@70-TDF > > for those looking for a deb amd64? The buildbox is stuck for some reason.
I just updated to Libre Office 5.2.4 on my Arch Linux system and the UI scaling does now properly work with GTK 3 enabled. Thanks for fixing this!
I confirm this is fixed indeed (if you ignore the ugly non-HiDPI icons). GTK3 is still not usable though because of #103174 affecting both X11 and Wayland, so sticking to gtk for now...