Skip to content

IntelliJ HiDPI

Hey,

I'm running IntelliJ Community on Arch/I3Gaps on an XPS 13.

Until recently everything scaled fine. Now though, even though i3, Firefox, and IntelliJ itself are still scaling fine, when I run applications I wrote in IntelliJ (Java swing apps for instance), they no longer scale.

I have no clue what might be causing this (my gut says it's IntelliJ itself).

This is my .xinitrc:

#!/bin/sh
#
#~/.xinitrc
#
# Executed by startx (run your window manger from here)

if [ -d /etc/X11/xinit/xinitrc.d ]; then
        for f in /etc/X11/xinit/xinitrc.d/*; do
                [ -x "$f" ] && . "$f"
        done
        unset f
fi
xrdb -merge ~/.Xresources
# autocutsel -selection PRIMARY -fork
xrandr --dpi 220
pulseaudio --start
exec dbus-launch i3

This is .Xresources:

Xft.dpi:220

Edit: If I run my java app from the command line like this java -Dsun.java2d.uiScale=2 myApp.class it works just fine.

Edit: solved it. Apperently I needed to use the JBR (JetBrains Runtime) which comes packaged with IntelliJ.

Edited 16 Oct 2019. We only hold this version.

2 points1 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
2 · 100% up
Kind
Text
ID
dilvan

Author

39
posts
13
comments
0
media
View profile

1 comment

Sounds like a Java bug. Look into the OpenJDK bug tracker and try a different Java version. Or maybe some internals changed.

IntelliJ itself is also Java, so maybe you are missing something in your code too.

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.