Bug 559199 - [GTK3][HiDPI] UI corrupted with autoScale arguments
Summary: [GTK3][HiDPI] UI corrupted with autoScale arguments
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.14   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo, regression
Depends on:
Blocks:
 
Reported: 2020-01-15 08:01 EST by Stjepan Cvitanović CLA
Modified: 2021-08-18 03:15 EDT (History)
10 users (show)

See Also:


Attachments
2018-09 with normal icons (154.72 KB, image/png)
2020-01-15 08:02 EST, Stjepan Cvitanović CLA
no flags Details
2018-09 with icons far too small to be usable (202.47 KB, image/png)
2020-01-15 08:03 EST, Stjepan Cvitanović CLA
no flags Details
2019-12 with swt scaling is unusable (84.91 KB, image/png)
2020-01-15 08:03 EST, Stjepan Cvitanović CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stjepan Cvitanović CLA 2020-01-15 08:01:34 EST
I have a problem with eclipse version 2019-12. The icons are far too small to be usable. If I try the GDK_SCALE=2 workaround, the icons are then too large. The problem seems to originate with version 2018-12 as it also has the same problem, but 2018-09 version doesn't. Because of that I have reverted to using version 2018-09. I am on Manjaro Linux with KDE + Openbox and 4k AOC display with 3840x2160 resolution:

lsb_release -a
LSB Version:    n/a
Distributor ID: ManjaroLinux
Description:    Manjaro Linux
Release:        18.1.5
Codename:       Juhraya


uname -a
Linux scvitanovic-pc 5.4.6-2-MANJARO #1 SMP PREEMPT Tue Dec 24 15:55:20 UTC 2019 x86_64 GNU/Linux

The eclipse 2018-09 version is:
Version: 2018-09 (4.9.0)
Build id: 20180917-1800
org.eclipse.swt.internal.deviceZoom=180
org.eclipse.swt.internal.gdk.backend=x11
org.eclipse.swt.internal.gtk.theme=Breeze
org.eclipse.swt.internal.gtk.version=3.24.13

The eclipse 2019-12 version is:
Version: 2019-12 (4.14.0)
Build id: 20191212-1212
also, from Help -> About -> Installation Details -> Configuration
org.eclipse.swt.internal.deviceZoom=100
org.eclipse.swt.internal.gdk.backend=x11
org.eclipse.swt.internal.gtk.theme=Breeze
org.eclipse.swt.internal.gtk.version=3.24.13
Comment 1 Stjepan Cvitanović CLA 2020-01-15 08:02:22 EST
Created attachment 281505 [details]
2018-09 with normal icons

This is the screenshot of the eclipse 2018-09 version with the following added in the eclipse.ini file, making the icons normal:
-Dswt.enable.autoScale=true
-Dswt.autoScale=180
-Dswt.autoScale.method=nearest
Comment 2 Stjepan Cvitanović CLA 2020-01-15 08:03:18 EST
Created attachment 281506 [details]
2018-09 with icons far too small to be usable

Screenshot with icons far too small to be usable. It is of eclipse version 2018-09, however all the eclipse versions I tested (up to and including Oxygen) show up like this (without manual swt scaling).
Comment 3 Stjepan Cvitanović CLA 2020-01-15 08:03:56 EST
Created attachment 281507 [details]
2019-12 with swt scaling is unusable

This screenshot is of eclipse 2019-12 with the following in the eclipse.ini:
-Dswt.enable.autoScale=true
-Dswt.autoScale=180
-Dswt.autoScale.method=nearest
No matter what swt scaling is set, the end result is somewhat similar, i.e. the eclipse is unusable with icons not showing, blobs of black covering the workspace, etc.
Comment 4 Andrey Loskutov CLA 2020-01-15 08:06:47 EST
(In reply to Stjepan Cvitanović from comment #0)

Thanks.

> Build id: 20180917-1800
> org.eclipse.swt.internal.deviceZoom=180

> Build id: 20191212-1212
> org.eclipse.swt.internal.deviceZoom=100

I see that deviceZoom is *now* 100. Is this your config change may be?

Can you please add here the command line of how each Eclipse is started?
Comment 5 Stjepan Cvitanović CLA 2020-01-15 08:12:40 EST
If I change the zoom factor eclipse 2019-12 completely breaks (see attachment 2019 [details]-12). My eclipse.ini of 2019-12 is:
-startup
plugins/org.eclipse.equinox.launcher_1.5.600.v20191014-2022.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1100.v20190907-0426
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms2048m
-Xmx2048m
--add-modules=ALL-SYSTEM

My eclipse.ini for 2018-09 is:
-startup
plugins/org.eclipse.equinox.launcher_1.5.100.v20180827-1352.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.800.v20180827-1352
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dswt.enable.autoScale=true
-Dswt.autoScale=180
-Dswt.autoScale.method=nearest
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx1024m
--add-modules=ALL-SYSTEM


Both are started equally, by calling the eclipse executable (no params, no env variables changed)
Comment 6 Stjepan Cvitanović CLA 2020-01-15 08:14:03 EST
The attachment in question is, of course, attachment 281507 [details]
Comment 7 Andrey Loskutov CLA 2020-01-15 08:45:17 EST
In my environment (no HiDPI unfortunately) starting *any* Eclipse version with the options above results in unusable, *corrupted* UI.

-Dswt.enable.autoScale=true
-Dswt.autoScale=180
-Dswt.autoScale.method=nearest

@Nikolai: can you please check that too?
Comment 8 Mykola Zakharchuk CLA 2020-01-15 09:12:24 EST
Hi Andrey,

I've tried this on the different versions (on my high DPI monitor):
4.14, 4.13 looks like on the "2019-12 with swt scaling is unusable" screenshot.
4.9, 4.10 looks good (proper zooming).
Comment 9 Mykola Zakharchuk CLA 2020-01-15 09:24:53 EST
Regression starts from 4.11

My monitor resolution is: 3840x1600 (so it's not "extremely" high DPI)
Comment 10 Stjepan Cvitanović CLA 2020-01-22 05:22:32 EST
For me, regression starts with version 4.10, not 4.11:
Version: 2018-12 (4.10.0)
Build id: 20181214-0600
Comment 11 Marcel Austenfeld CLA 2020-02-17 04:38:26 EST
I think this bug is related:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=546011

It shows the same symptoms.

I first thought this was JavaFX/SWT specific but now it seems to be a general bug on HighDPI Linux displays.
Comment 12 Aleksandar Nikolov CLA 2020-03-23 13:00:36 EDT
I have definitely the same problem as described by Stjepan Cvitanović. I also see a regression compared to 2018.09 version - where the icons can be scaled by -vmargs (-Dswt.enable.autoScale=true -Dswt.autoScale=exact -Dswt.autoScale.method=exact) in eclipse.ini, but now - cannot.

I use Debian 9 / KDE / 4.19.0-0.bpo.2-amd64 / 3200x1800 pixels
Comment 13 Anton Petrusevich CLA 2021-03-18 03:16:23 EDT
Version: 2020-12 (4.18.0)
Build id: 20201210-1552

org.eclipse.swt.internal.deviceZoom=100
org.eclipse.swt.internal.gdk.backend=x11
org.eclipse.swt.internal.gtk.theme=Breeze
org.eclipse.swt.internal.gtk.version=3.24.20

I bought my new shiny 4k Monitor and now I see this bug. What bothers me -- I see no plans to fix it since a year. I can create my own screenshots, but they are very similar to already provided.
Comment 14 Soraphol (Paul) Damrongpiriyapong CLA 2021-03-18 16:43:49 EDT
Hello, I was wondering if your system is capable of increasing the screen scale. If so, could you try starting eclipse without any of the autoscaling related flags.

eg.
-Dswt.enable.autoScale=true
-Dswt.autoScale=180
-Dswt.autoScale.method=nearest
Comment 15 Anton Petrusevich CLA 2021-03-18 17:21:45 EDT
This is my full eclipse.ini:

-startup
plugins/org.eclipse.equinox.launcher_1.6.0.v20200915-1508.jar
--launcher.library
/home/anton/.p2/pool/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.2.0.v20200915-1442
-product
org.eclipse.epp.package.cpp.product
-showsplash
/home/anton/.p2/pool/plugins/org.eclipse.epp.package.common_4.18.0.20201210-1200
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=11
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-Dsun.java.command=Eclipse
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=11
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx2048m
--add-modules=ALL-SYSTEM
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/