Bug 536663 - Eclipse Photon 4.8 messes up graphics with black parts and DPI scaling
Summary: Eclipse Photon 4.8 messes up graphics with black parts and DPI scaling
Status: CLOSED DUPLICATE of bug 536542
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.8   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-03 17:21 EDT by Jan Richter CLA
Modified: 2018-07-12 09:25 EDT (History)
5 users (show)

See Also:


Attachments
Image of messed up graphics and output of console (458.99 KB, image/png)
2018-07-03 17:21 EDT, Jan Richter CLA
no flags Details
Console log of swt.autoScale = default (messed up graphics) (2.29 KB, text/plain)
2018-07-03 17:25 EDT, Jan Richter CLA
no flags Details
Console log of swt.autoScale = false (no messed up graphics, but dpi scaling issues) (2.29 KB, text/plain)
2018-07-03 17:26 EDT, Jan Richter CLA
no flags Details
Screenshot with GDK_SCALE=2 and swt.autoscale=true (186.26 KB, image/png)
2018-07-09 08:35 EDT, Jan Richter CLA
no flags Details
Screenshot with GDK_SCALE=2 and swt.autoscale=false (160.42 KB, image/png)
2018-07-09 08:38 EDT, Jan Richter CLA
no flags Details
Gnome Calculator scaling correctly on i3wm (72.59 KB, image/png)
2018-07-09 08:57 EDT, Jan Richter CLA
no flags Details
Gnome calculator at 100% and at 200% (43.45 KB, image/png)
2018-07-09 09:48 EDT, Sravan Kumar Lakkimsetti CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Richter CLA 2018-07-03 17:21:20 EDT
Created attachment 274784 [details]
Image of messed up graphics and output of console

Overview:

Like stated in the forums (https://www.eclipse.org/forums/index.php/t/1094012/), the update to Photon from Oxygen messes up Eclipse Interface with black parts (see attachment screenshot).
Even on a new Eclipse Photon installation this happens.

Ed Merks suggested changing the swt.autoScale and swt.autoScale.method. Changing swt.autoScale to false it solves the black parts, but disables DPI scaling which makes it impossible to read and work on my screen. Other settings for swt.autoScale and any settings for swt.autoScale.method keep the messed up graphics.

Steps to Reproduce:
Install Eclipse Photon via Installer from eclipse.org/downloads.
Start Eclipse

Actual Results:
Eclipse starts but is unusable, as the interface is littered with black parts. UI elements are also drawn smaller than they are (the clickable area is much larger than the buttons). See attached screenshot.

Expected Results:
Eclipse starts normally and renders all elements according to my DPI.

Build Date & Hardware:

Hardware specs:
Surface Pro 4
Display: 12.3 inches (31 cm) 2736x1824 (267ppi)

Software:
Ubuntu 18.04 with gdm and i3wm
Eclipse Version: Photon Release (4.8.0)
Build id: 20180619-1200


Any ideas what the issue is? And what can I provide more to further help debugging it?
Comment 1 Jan Richter CLA 2018-07-03 17:25:07 EDT
Created attachment 274785 [details]
Console log of swt.autoScale = default (messed up graphics)
Comment 2 Jan Richter CLA 2018-07-03 17:26:29 EDT
Created attachment 274786 [details]
Console log of swt.autoScale = false (no messed up graphics, but dpi scaling issues)
Comment 3 Andrey Loskutov CLA 2018-07-04 00:42:26 EDT
Which GTK 3 version do you have and which scaling on the OS level?
Comment 4 Sravan Kumar Lakkimsetti CLA 2018-07-04 04:30:59 EDT
Looks like you are using plasma desktop. I feel its a duplicate of 536542.
Comment 5 Jan Richter CLA 2018-07-04 08:10:42 EDT
(In reply to Sravan Kumar Lakkimsetti from comment #4)
> Looks like you are using plasma desktop. I feel its a duplicate of 536542.

No, like I stated in my initial description, I am using i3wm and not plasma. But you are right, it looks like a similar graphical issue.
Comment 6 Jan Richter CLA 2018-07-04 08:13:20 EDT
(In reply to Andrey Loskutov from comment #3)
> Which GTK 3 version do you have and which scaling on the OS level?

The GTK3 version should be 3.22.30. Concerning scaling I have none activated, I just set "Xft.dpi: 192" in my .Xresources file, which helps for the most part.
Comment 7 Jan Richter CLA 2018-07-04 08:24:23 EDT
Ah, I also use "GDK_DPI_SCALE=1.1".
Comment 8 Sravan Kumar Lakkimsetti CLA 2018-07-04 09:13:06 EDT
Can you please try with environment variable GDK_SCALE=2
Comment 9 Jan Richter CLA 2018-07-09 08:35:32 EDT
Created attachment 274891 [details]
Screenshot with GDK_SCALE=2 and swt.autoscale=true

With GDK_SCALE=2 and swt.autoscale=true, the graphics are correct, however the UI is far to large to work with. GDK_SCALE does not allow for floating values, so this is not a solution.
Comment 10 Jan Richter CLA 2018-07-09 08:38:18 EDT
Created attachment 274892 [details]
Screenshot with GDK_SCALE=2 and swt.autoscale=false

With GDK_SCALE=2 and swt.autoscale=false, the graphics are messed up and also far too big.

So with GDK_SCALE=2 the "autoscale" messed up graphics switch: before (with GDK_SCALE=1) the graphics were messed up with autoscale=true and correct when on autoscale=false.
Now (with GDK_SCALE=2) the graphics are correct on autoscale=true and wrong on autoscale=false.
Comment 11 Sravan Kumar Lakkimsetti CLA 2018-07-09 08:40:58 EDT
It looks like a problem in the the GTK itself . I found that none the GTK applications scale properly on the plasma desktop. Probably you are also see in the same problem in i3wm.

To confirm you can try with gtk-calculator app. Please check whether the icons scale properly or not.
Comment 12 Sravan Kumar Lakkimsetti CLA 2018-07-09 08:43:56 EDT
(In reply to Sravan Kumar Lakkimsetti from comment #11)
> It looks like a problem in the the GTK itself . I found that none the GTK
> applications scale properly on the plasma desktop. Probably you are also see
> in the same problem in i3wm.
> 
> To confirm you can try with gtk-calculator app. Please check whether the
> icons scale properly or not.

The appname is gnome-calculator
Comment 13 Jan Richter CLA 2018-07-09 08:53:54 EDT
I found a temporary workaround. With GDK_SCALE=2 and swt.autoscale=true I have all graphics rendered correctly, but twice as big. I can use GDK_DPI_SCALE=0.5 to rescale everything to normal size. 

However this is only a workaround for the DPI rendering bug of eclipse, as all other applications on my machine (firefox or else) can render correctly (and in correct size) without all those tweaks.
Comment 14 Jan Richter CLA 2018-07-09 08:57:41 EDT
Created attachment 274893 [details]
Gnome Calculator scaling correctly on i3wm

No, I do not see wrong rendering in gnome calculator. This is because I explicitly set the DPI in the xft settings (Xresources file). Maybe eclipse does not use the DPI settings of the X server?
Comment 15 Thomas Stieler CLA 2018-07-09 09:28:34 EDT
And I also tested gnome-calculator: It scales nicely unter KDE Plasma, without any additional settings...
Comment 16 Sravan Kumar Lakkimsetti CLA 2018-07-09 09:48:47 EDT
Created attachment 274899 [details]
Gnome calculator at 100% and at 200%

(In reply to Thomas Stieler from comment #15)
> And I also tested gnome-calculator: It scales nicely unter KDE Plasma,
> without any additional settings...

Please compare the images on the tool bar. Yo can clearly see that the images are not scaled.
Comment 17 Andrey Loskutov CLA 2018-07-09 09:50:09 EDT
*** Bug 536841 has been marked as a duplicate of this bug. ***
Comment 18 Thomas Stieler CLA 2018-07-09 10:06:06 EDT
(In reply to Sravan Kumar Lakkimsetti from comment #16)
> Created attachment 274899 [details]
> Gnome calculator at 100% and at 200%
> 
> (In reply to Thomas Stieler from comment #15)
> > And I also tested gnome-calculator: It scales nicely unter KDE Plasma,
> > without any additional settings...
> 
> Please compare the images on the tool bar. Yo can clearly see that the
> images are not scaled.

Ok, I see your point and agree, that the toolbar images are not scaled...
Comment 19 Jan Richter CLA 2018-07-09 13:04:56 EDT
Okay, that is true. Can you elaborate more on what exactly the window manager must do to support this for GTK3? Because while this might get fixed for plasma by some developers, we i3wm users will most certainly have to fix it ourselves.
Comment 20 Sravan Kumar Lakkimsetti CLA 2018-07-10 04:57:49 EDT
(In reply to Jan Richter from comment #19)
> Okay, that is true. Can you elaborate more on what exactly the window
> manager must do to support this for GTK3? Because while this might get fixed
> for plasma by some developers, we i3wm users will most certainly have to fix
> it ourselves.

I have to check with GTK developers here. Raised https://gitlab.gnome.org/GNOME/gtk/issues/1207 with GTK
Comment 21 Sravan Kumar Lakkimsetti CLA 2018-07-12 09:25:11 EDT

*** This bug has been marked as a duplicate of bug 536542 ***