ATLauncher icon indicating copy to clipboard operation
ATLauncher copied to clipboard

Barely usable on HiDPI

Open mnn opened this issue 4 years ago • 11 comments
trafficstars

Describe the bug Scaling/DPI doesn't seem to be taken from system, so everything is microscopic and barely readable.

To Reproduce Steps to reproduce the behavior:

  1. Use small 4k monitor

Expected behavior Either correct scaling/DPI is detected from system, or (probably better) a user is given an option to set custom UI scaling (please note that font size is not the same as UI scaling, but it would be a start).

Screenshots 2021-02-14_08-41 See window titles at top or names of workspaces at bottom, that's a normal font size I would expect. (Just noticed the tray icon has scaling and background issues.)

System information (please complete the following information, or remove if not applicable):

  • OS (including distro/version): Manjaro 20.2.1
  • Java Version: OpenJDK Runtime Environment (build 1.8.0_275-b01) (this old Java version is required by atlauncher-bin package from AUR)
  • ATLauncher Version: 3.4.3.0 (installed today)

Additional context

system details
System:    Kernel: 5.10.7-3-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.1 Desktop: i3 4.19 Distro: Manjaro Linux
Machine:   Type: Desktop Mobo: ASRock model: X570 Phantom Gaming X serial:  UEFI: American Megatrends v: P1.80
           date: 08/08/2019
CPU:       Info: 8-Core model: AMD Ryzen 7 3800X bits: 64 type: MT MCP arch: Zen 2 rev: 0 L2 cache: 4 MiB
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 124851
           Speed: 1867 MHz min/max: 2200/3900 MHz boost: enabled Core speeds (MHz): 1: 1867 2: 2797 3: 1867 4: 1866 5: 1866
           6: 1867 7: 2796 8: 1857 9: 1866 10: 1866 11: 1867 12: 1866 13: 2800 14: 1866 15: 1863 16: 2800
Graphics:  Device-1: NVIDIA TU102 [GeForce RTX 2080 Ti Rev. A] vendor: ASUSTeK driver: nvidia v: 460.32.03 bus ID: 10:00.0
           Display: x11 server: X.Org 1.20.10 driver: loaded: nvidia resolution: 1: 1920x1080~60Hz 2: 3840x2160~60Hz
           3: 1920x1080~60Hz
           OpenGL: renderer: GeForce RTX 2080 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 460.32.03 direct render: Yes
Audio:     Device-1: NVIDIA TU102 High Definition Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel bus ID: 10:00.1
           Device-2: Advanced Micro Devices [AMD] Starship/Matisse HD Audio vendor: ASRock driver: snd_hda_intel v: kernel
           bus ID: 12:00.4
           Sound Server: ALSA v: k5.10.7-3-MANJARO
Network:   Device-1: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel bus ID: 08:00.0
           IF: wlp8s0 state: down mac: 
           Device-2: Intel I211 Gigabit Network vendor: ASRock driver: igb v: kernel port: e000 bus ID: 0a:00.0
           IF: enp10s0 state: up speed: 1000 Mbps duplex: full mac: 
           Device-3: Realtek RTL8125 2.5GbE vendor: ASRock driver: r8169 v: kernel port: d000 bus ID: 0c:00.0
           IF: enp12s0 state: down mac: 
Drives:    Local Storage: total: 2.5 TiB used: 2.01 TiB (80.4%)
           ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO Plus 250GB size: 232.89 GiB temp: 45.9 C
           ID-2: /dev/nvme1n1 vendor: Samsung model: SSD 970 EVO Plus 250GB size: 232.89 GiB temp: 45.9 C
           ID-3: /dev/nvme2n1 vendor: Samsung model: SSD 970 EVO Plus 250GB size: 232.89 GiB temp: 48.9 C
           ID-4: /dev/sda vendor: Western Digital model: WD20EZRZ-00Z5HB0 size: 1.82 TiB temp: 30 C
Partition: ID-1: / size: 219.27 GiB used: 187.48 GiB (85.5%) fs: ext4 dev: /dev/dm-0
           mapped: luks-78d47a35-fb47-4d0e-b017-a7f88b2644d1
           ID-2: /boot/efi size: 299.4 MiB used: 424 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1
Swap:      ID-1: swap-1 type: partition size: 8.8 GiB used: 0 KiB (0.0%) dev: /dev/dm-1
           mapped: luks-c9fb1ecf-ca30-4a76-86d9-d22e7a0f0ef3
Sensors:   System Temperatures: cpu: 54.6 C mobo: 40.5 C gpu: nvidia temp: 43 C
           Fan Speeds (RPM): fan-1: 0 fan-2: 1088 fan-3: 0 fan-4: 763 fan-5: 775 fan-6: 0 fan-7: 895 gpu: nvidia fan: 34%
Info:      Processes: 427 Uptime: 2h 39m Memory: 31.29 GiB used: 6.56 GiB (21.0%) Init: systemd Compilers: gcc: 10.2.0
           clang: 11.0.1 Packages: 2518 Shell: Zsh v: 5.8 inxi: 3.2.02

Edit: Tried all themes and "Disable Custom Font", but no combination fixed this.

mnn avatar Feb 14 '21 08:02 mnn

I had the same problem using Arch. I switched to OpenJDK Runtime Environment (build 11.0.11+9), which solved the issue for me. No changes in the preferences of ATLauncher needed.

Tom9876 avatar May 12 '21 19:05 Tom9876

Check https://github.com/ATLauncher/ATLauncher/issues/287 and https://github.com/ATLauncher/ATLauncher/issues/240 for potential workarounds.

This is, AFAIK, a Java 8 issue and using Java 11 to load the launcher fixes the issue.

RyanTheAllmighty avatar Jun 12 '21 12:06 RyanTheAllmighty

i was already using OpenJDK 11 but still the UI was too small to read. I modified the atlauncher script to include -Dsun.java2d.uiScale=2.0

so, the line reads:

exec java -Dsun.java2d.uiScale=2.0 -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -jar ATLauncher.jar "$@"

jasonblewis avatar Jul 15 '21 10:07 jasonblewis

Why was this marked low priority? Something thatʼs “barely usable” on displays that are getting more common doesnʼt sound low priority.

My display isnʼt even very high DPI, but I have low vision, and this plus not using the systemʼs default font size makes this barely usable for me too.

dhouck avatar Oct 13 '21 21:10 dhouck

@dhouck there are multiple workarounds posted in this thread which has solved the issue for people.

If you've tried them all (including using Java 11 or newer to launch the launcher) then please provide logs just after bootup of the launcher (using copy logs button on the console rather than upload logs) and provide it here along with maybe some screenshots to better understand what you're seeing.

RyanTheAllmighty avatar Oct 14 '21 00:10 RyanTheAllmighty

I tried switching to a later version of Java (though I used 17, not 11) and it didnʼt help (and #287 points out issues with that (I havenʼt noticed yet). I havenʼt yet tried modifying the script to add extra flags, and the workarounds in #240 donʼt apply because I donʼt use Windows.

But either way, being able to actually set the font size would be useful, since even if the window were scaled correctly for my monitor it would be hard to read because of my vision; Iʼd need to overscale it to make things the right size. Also (again I havenʼt tried it yet) my understanding is that adding those flags still requires changing the Java version to work right, so unless the issues with that are addressed it isnʼt a good solution.

dhouck avatar Oct 14 '21 02:10 dhouck

Even setting the font size bigger would probably be a pretty big task. Currently all the UI is hardcoded to a very specific font size, which can vary from theme to theme. It's the main reason multi language support hasn't come yet, even though all the translations are done.

It's worth looking at it if you want to raise a separate feature request for a font size option. But again as for the scaling, I haven't had anyone tell me the workarounds don't work to get it working.

Provide the information I mentioned previously along with your os, window manager, Java, kernel versions etc (the more the better) and it can be looked at and attempted to be replicated, as I'd ideally like to get the scaling issue resolved as bigger monitor resolutions are normal now

RyanTheAllmighty avatar Oct 14 '21 03:10 RyanTheAllmighty

Adding -Dsun.java2d.uiScale=2.0 works for me if Iʼm using a Java version greater than 8, but -Dsun.java2d.dpiaware=true does not. That could be some other configuration issue on my system because itʼs Arch, but I donʼt see the issue elsewhere.

I can still provide all that information if it helps, but it looks like Iʼm in the same boat as everyone else so it might not be as useful?

If the theme can change the font size are there any large-font-size themes available that you know of?

dhouck avatar Oct 14 '21 03:10 dhouck

Where can I add -Dsun.java2d.uiScale=2.0 with the flatpak version of ATLauncher

sybenx avatar Jun 13 '22 17:06 sybenx

Where can I add -Dsun.java2d.uiScale=2.0 with the flatpak version of ATLauncher

I believe you have to edit the launcher file, but I will have to consider a env flag to easily set with flatseal.

Doomsdayrs avatar Apr 04 '23 03:04 Doomsdayrs