Bug 541370 - Running wayland with fractional scaling leads to major rendering problems
Summary: Running wayland with fractional scaling leads to major rendering problems
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.10   Edit
Hardware: PC Linux
: P3 normal with 2 votes (vote)
Target Milestone: 4.17 M3   Edit
Assignee: Soraphol (Paul) Damrongpiriyapong CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
: 553486 (view as bug list)
Depends on:
Blocks: 535260
  Show dependency tree
 
Reported: 2018-11-20 08:43 EST by Robert Munteanu CLA
Modified: 2020-08-14 21:22 EDT (History)
10 users (show)

See Also:


Attachments
Screenshot of workbench window (236.32 KB, image/png)
2018-11-20 08:43 EST, Robert Munteanu CLA
no flags Details
Screenshot at 125% zoom (809.91 KB, image/png)
2018-11-23 05:11 EST, Robert Munteanu CLA
no flags Details
Wayland scaling problem (445.61 KB, image/png)
2020-02-15 13:17 EST, Christian Balcom CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Munteanu CLA 2018-11-20 08:43:42 EST
Created attachment 276634 [details]
Screenshot of workbench window

I am running

Eclipse IDE for Enterprise Java Developers.

Version: 2018-12 M2 (4.10.0M2)
Build id: 20181108-1653

On Gnome 3.30, wayland session. I am connecting a 4K monitor with fractional scaling set at 150% and my laptop's screen FHD screen at 100%.

When starting up Eclipse the main workbench window is completely unusable if displayed in the scaled monitor. Otherwise on the laptop display it works just fine.

Using keyboard accelerators to open dialogs ( e.g. the About dialog ) works just fine, but the main views and the editor are completely unusable.
Comment 1 Robert Munteanu CLA 2018-11-23 05:11:40 EST
Created attachment 276670 [details]
Screenshot at 125% zoom

I've attached a screenshot at 125% zoom, where the distortions are different, but still unusable. It seems the icons are scaled too much, while the fonts appear correct.
Comment 2 Eric Williams CLA 2019-09-18 10:14:06 EDT
(In reply to Robert Munteanu from comment #1)
> Created attachment 276670 [details]
> Screenshot at 125% zoom
> 
> I've attached a screenshot at 125% zoom, where the distortions are
> different, but still unusable. It seems the icons are scaled too much, while
> the fonts appear correct.

Please try with 4.13, there have been Wayland HiDPI fixes in the meantime.
Comment 3 Robert Munteanu CLA 2019-09-20 07:58:46 EDT
(In reply to comment #2)
> (In reply to Robert Munteanu from comment #1)
> > Created attachment 276670 [details]
> > Screenshot at 125% zoom
> >
> > I've attached a screenshot at 125% zoom, where the distortions are
> > different, but still unusable. It seems the icons are scaled too much, while
> > the fonts appear correct.
> 
> Please try with 4.13, there have been Wayland HiDPI fixes in the meantime.

Sorry, I am no longer running Wayland so cannot confirm whether it's fixed or not.
Comment 4 Christian Balcom CLA 2020-02-15 13:17:39 EST
Created attachment 281825 [details]
Wayland scaling problem
Comment 5 Christian Balcom CLA 2020-02-15 13:20:14 EST
I am able to reproduce this issue with Eclipse 1.14 and Sway 1.4 on a display with scale=2.

Eclipse IDE for Java Developers

Version: 2019-12 (4.14.0)
Build id: 20191212-1212

I have attached a screenshot of the problem.
Comment 6 Norbert Lange CLA 2020-03-19 07:09:50 EDT
Problem is still there with 2020-03.

I am using non-fractional 200% scaling on one monitor and normal 100% on the other.

If Eclipse is on the 200% monitor, it looks like Christian's screenshot, if I move it to the other monitor its ok.

Using Gnome 3.34 with Debian Bullseye
Comment 7 Jon Mako CLA 2020-03-23 15:07:47 EDT
It would be nice to know when this bug will be addressed. I can reproduce this with any scaling which is not 1. With the proliferation of HiDPI screens and the uptake of wayland, this bug should be prioritized IMHO.
Comment 8 Jon Mako CLA 2020-03-27 19:46:19 EDT
These seem to be related if not duplicates:

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

https://bugs.eclipse.org/bugs/show_bug.cgi?id=549504
Comment 9 Andrey Loskutov CLA 2020-03-28 02:07:51 EDT
*** Bug 553486 has been marked as a duplicate of this bug. ***
Comment 10 Jon Mako CLA 2020-05-20 13:39:38 EDT
Is there a blocker for this issue? This is an ACCESSIBILITY issue for us more than anything. Can this please be re-prioritized given that that this issue was reported for 4.10 and we are getting ready to update to 4.16.
Comment 11 Andrey Loskutov CLA 2020-05-20 13:50:21 EDT
(In reply to Jon Mako from comment #10)
> Is there a blocker for this issue? This is an ACCESSIBILITY issue for us
> more than anything. Can this please be re-prioritized given that that this
> issue was reported for 4.10 and we are getting ready to update to 4.16.

If this is a blocker for you, try to contribute : https://wiki.eclipse.org/Platform/How_to_Contribute

I guess this will not make in 4.16, it is too late and I guess also there are no contributors working on Wayland, so they don't feel the pain. Take a debugger and go reverse engineer SWT code. That's the only way to get things done.
Comment 12 Soraphol (Paul) Damrongpiriyapong CLA 2020-06-17 17:19:16 EDT
Hello, just wanted to give everyone an update on this. I have picked up working on this scaling issue. A fixed is on the way, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=564097. 

Although the fix does make the UI usable at larger scales (I have only tested 200%, but will be testing with other scales and DEs in the days to come, I have just gotten a 4k monitor to test), some icons and images are still not scaled properly. I am trying to fix that atm.
Comment 13 Jon Mako CLA 2020-06-26 14:10:58 EDT
(In reply to Soraphol (Paul) Damrongpiriyapong from comment #12)
> Hello, just wanted to give everyone an update on this. I have picked up
> working on this scaling issue. A fixed is on the way, see
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=564097. 
> 
> Although the fix does make the UI usable at larger scales (I have only
> tested 200%, but will be testing with other scales and DEs in the days to
> come, I have just gotten a 4k monitor to test), some icons and images are
> still not scaled properly. I am trying to fix that atm.

@soraphol I can confirm this is working in:
Version: 2020-09 (4.17)
Build id: I20200625-1800
Comment 14 Soraphol (Paul) Damrongpiriyapong CLA 2020-06-26 14:22:43 EDT
Thank you so much for testing, and I'm glad it did. I'm guessing the only issue is the scaling of the toolbar icons? (There are other images that don't scale but those are non critical) I have a fix for that in gerrit, just waiting for review.
Comment 15 Soraphol (Paul) Damrongpiriyapong CLA 2020-06-26 14:22:54 EDT
Just putting this in here for anyone else who experiences scaling issues:

If you would like to run Eclipse on fractional scaling please use the system settings to set this. This is so that SWT can recognize the change in scale. Again the icon scaling fixes are coming, using -DswtAutoScale flag causes problems. 

You may need to enable fractional scaling using this command (may require restart to have an effect):
dconf write /org/gnome/mutter/experimental-features "['scale-monitor-framebuffer']"
Comment 16 Jon Mako CLA 2020-07-02 19:32:21 EDT
This is still working quite well. A minor issue (since the fix to icon sizes) is that when I unplug my external monitor which is the one that is scaled (1.5x), Eclipse adjusts to the regular scaling and dpi of the laptop monitor. Except the icons which don't adjust and remain quite big. I have to restart Eclipse for the icons to reset to the correct scaling.
Comment 17 Jon Mako CLA 2020-07-12 13:42:37 EDT
Another issue from my testing: I found that if the scaled (external) monitor is the leftmost (primary/pos 0 0) one, then Eclipse does not scale well. A work around is to set the leftmost monitor to scale 1, start eclipse and then reset the monitor scaling to 1.5 (in my case). At this point, Eclipse figures out the correct scaling. Weirdly, this is not an issue if the leftmost monitor's position is set to negative and the rightmost is at pos 0 0. I'm using Sway.
Comment 18 Soraphol (Paul) Damrongpiriyapong CLA 2020-08-12 12:12:40 EDT
Hello, just an update. There has been a recent patch included in the latest integration builds that allows for the icon to scale when the DPI changes. 
https://download.eclipse.org/eclipse/downloads/drops4/I20200810-1800/

If you don't mind, I'm going to close this bug since seems to be working quite well for Jon. If any other scaling issues occur please open a new bug.
Comment 19 Jon Mako CLA 2020-08-14 21:22:12 EDT
Sounds good. thanks!