Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 492433

Summary: [HiDPI][GTK3] UI scaled too much on Wayland
Product: [Eclipse Project] Platform Reporter: Michael Rapp <michael.rapp90>
Component: UIAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: akurtakov, alhashash, browseria, dpelevin, dwagelaar, gautier.desaintmartinlacaze, gpothier, isahmedcevizci, jan.public, janboe.ye, lorenzo.bettini, maggu2810, marc+eclipse, michael.rapp90, michael.weirauch, mike, peter, robberphex, sewe, tom
Version: 4.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug
Attachments:
Description Flags
Screenshot of the Eclipse UI up-scaled too much on Wayland
none
Wrong icon scaling in menus, tabs, and toolbar handles none

Description Michael Rapp CLA 2016-04-26 06:56:48 EDT
Created attachment 261249 [details]
Screenshot of the Eclipse UI up-scaled too much on Wayland

I just tested out Eclipse Neon Milestone 6 (4.6.0M6) to see if any progress concerning the HiDPI support has been made. Unfortunately on my system, the UI is up-scaled way too much (see attached screenshot). 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

I figured out, that the issue has something to do with Wayland as it disappears when using X as the display server instead. Maybe the reason is, that on Wayland GTK3 applications are scaled automatically depending on the display's DPI. So the HiDPI scaling is done twice - by Eclipse as well as by Wayland/GTK - causing the UI elements to have double the size they should have.

By the way, I face the same issues with Libre Office (also using GTK3) on the same system (https://bugs.documentfoundation.org/show_bug.cgi?id=99508).
Comment 1 Alexander Kurtakov CLA 2016-04-26 07:14:25 EDT
Would you please try with latest I-build? There were a number of fixes to the way detection was done since M6 so maybe one of them fixed your case.
Comment 2 Michael Rapp CLA 2016-04-26 07:34:04 EDT
Alright, I just installed the latest version using the Eclipse Installer (I am not sure, if this is what you meant with "I build") and indeed the UI elements now have the correct size even on Wayland. Thank you.
Comment 3 Michael Rapp CLA 2016-06-22 20:13:45 EDT
I just tried out the latest Eclipse Neon (4.6.0) release and the exact same issue as I described it earlier occurs again, althought it seemed to be fixed in a previous build: A lot of icons are upscaled too much on Wayland with GTK3 as it can be seen on the originally uploaded screenshot, causing Eclipse to be unusable. My system's specifications are:

OS: Arch Linux 64 bit
DE: GNOME 3.20.2 on Wayland
GTK version: 3.20.6
Display resolution: 2880 x 1620 px
Comment 4 Michael Vorburger CLA 2016-06-28 08:30:37 EDT
I'm not seeing what the attached screenshot shows on Wayland on Fedora 24 (although I'm noticing a few other, much more minor issues there; see bug 496923), so must suspect that this has perhaps something to do with how Wayland is pre-configured on Arch Linux?
Comment 5 Michael Rapp CLA 2016-08-06 09:40:15 EDT
I don't think that there are any modifications of the Wayland configuration on Arch Linux as its against its philosophy of providing packages without any upstream modifications. 

You have tested this issue on a HiDPI screen with GTK3 enabled, right? Because this is what this bug report is about: The combination of GTK3, Wayland and HiDPI causes the UI to be up-scaled too much (see my original post). This becomes more obvious when varying the configuration as follows:

- When using Wayland, a HiDPI screen and switching back to GTK 2 by starting Eclipse with the command "eclipse --launcher.GTK_version 2" the issue goes away.

- When running a X session, even when using GTK 3 and a HiDPI screen, the problem does not occur.

- When using Wayland and GTK3 on a regular screen, the UI is scaled correctly (it is not scaled at all).

As I already mentioned, a similar issue occurs with LibreOffice running on the same system (https://bugs.documentfoundation.org/show_bug.cgi?id=99508). It has already been cofirmed by other users. As far as I know, both Eclipse as well as LibreOffice implement an application-side mechanism for HiDPI UI-scaling. However, GTK3 on Wayland causes applications to be up-scaled out of the box when run on HiDPI screens. So my guess would be, that either the UI-scaling performed by GTK or by Eclipse itself must be disabled in such case.
Comment 6 Marc Ponschab CLA 2016-08-20 15:07:43 EDT
I have the exact same issue on Fedora 24 using Wayland with a HiDPI display. 

GTK version: 3.20.8
Eclipse: 4.6.0-3.fc24
Display: 2880x1620 / 340mm x 190mm
Comment 7 Browser Ia CLA 2017-01-10 20:36:44 EST
I have the exact same issue on Fedora 25, Wayland, Gnome 3.22, 3200x1800 resolution and the latest Oxygen. See my attachments on https://bugs.eclipse.org/bugs/show_bug.cgi?id=496923
Comment 8 Guillaume Pothier CLA 2017-09-27 18:20:26 EDT
I can confirm the same issue with Oxygen on Ubuntu 17.10. I also confirm the workaround (--launcher.GTK_version 2) mitigates the issue.
Comment 9 Ahmed Cevizci CLA 2017-10-17 10:28:05 EDT
I have the same issue with Eclipse Oxygen 1a and Neon 3, Antergos (Arch) Gnome 3.26. I have UHD 4K monitor (Dell XPS 15) and scaling set to 2.
Comment 10 Michael Weirauch CLA 2018-01-16 16:10:53 EST
Can confirm the above with the following setup:
Version: Oxygen.2 Release (4.7.2)
Build id: 20171218-0600
Fedora 27, Gnome 3.26.2, Wayland 1.14.0, Eclipse 4.7.2

Same setup but with:
Version: Photon Milestone 4 (4.8.0M4)
Build id: 20171214-1849
- Prefs look ok
- About looks ok
- Toolbars look ok (except to much spacing around them, thus occupying more space compared to 4.7.2 with SWT_GTK3=0); Vertical separators scaled 2x from the looks
- Menu Item spacing a bit too wide (both horizontally and vertically)
- Tab Icons scaled twice from the looks
Comment 11 Andreas Sewe CLA 2018-03-02 06:37:00 EST
(In reply to Michael Weirauch from comment #10)
> Can confirm the above with the following setup:

I can confirm this with Oxygen.2 and Photon M5 as well.

OS: Ubuntu 17.10 64 bit
DE: GNOME 3.26.2 on Wayland
GTK version: 3.22.25
Display resolution: 3840 x 2160 px
Comment 12 Mohammad Alhashash CLA 2018-09-08 06:07:48 EDT
I have the same issue with Eclipse 2018-09 (4.9) RC1 on Wayland. 

Disabling Wayland with GDK_BACKEND=x11 or switching to GTK2 using SWT_GTK3=0 environment variables fixes the problem. 

OS: Fedora 28 64bit
DE: GNOME 3.28.2 on Wayland
GTK version: 3.22.30
Display resolution: 3840x2160
Comment 13 Mohammad Alhashash CLA 2018-09-08 06:09:49 EDT
Created attachment 275751 [details]
Wrong icon scaling in menus, tabs, and toolbar handles
Comment 14 Eclipse Genie CLA 2021-08-05 12:47:14 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.