# 4k/HiDPI monitor support (SOLVED)

**URL:** <https://forum.defold.com/t/4k-hidpi-monitor-support-solved/64108>\
**Category:** Questions\
**Created:** [December 17, 2019, 10:01am UTC](https://forum.defold.com/t/4k-hidpi-monitor-support-solved/64108 "2019-12-17T10:01:08Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![ilbeastli](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/ilbeastli/32/18896_2.png) [@ilbeastli](https://forum.defold.com/u/ilbeastli)\
**Post date:** [December 17, 2019, 10:01am UTC](https://forum.defold.com/t/4k-hidpi-monitor-support-solved/64108/1 "2019-12-17T10:01:08Z")

</div>

Do you have plans to support this kind of monitor?  
This is what it looks like when I start Defold on my laptop with Linux 🙁:

 ![image](https://forum-defold-uploads.b-cdn.net/original/3X/4/a/4a5f8f3ac77af9be82fac18c41358e68ba54483b.png)

---

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [December 17, 2019, 10:18am UTC](https://forum.defold.com/t/4k-hidpi-monitor-support-solved/64108/2 "2019-12-17T10:18:47Z")

</div>

Please make an issue here [GitHub · Where software is built](https://github.com/defold/editor2-issues/issues)

---

<div class="post-metadata">

**Author:** ![Pawel](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pawel/32/24623_2.png) [@Pawel](https://forum.defold.com/u/Pawel)\
**Post date:** [December 17, 2019, 3:01pm UTC](https://forum.defold.com/t/4k-hidpi-monitor-support-solved/64108/3 "2019-12-17T15:01:26Z")

</div>

Generally, a lot of software is not suited for 4k displays, for example, I’m struggling to select a proper icon in GIMP 😕

---

<div class="post-metadata">

**Author:** ![ross.grams](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/r/cab0a1/32.png) [@ross.grams](https://forum.defold.com/u/ross.grams)\
**Post date:** [December 17, 2019, 4:33pm UTC](https://forum.defold.com/t/4k-hidpi-monitor-support-solved/64108/4 "2019-12-17T16:33:28Z")

</div>

Just a curious onlooker here, but don’t you just scale up the text size of your operating system when you have a monitor like that?

---

<div class="post-metadata">

**Author:** ![totebo](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/totebo/32/36087_2.png) [@totebo](https://forum.defold.com/u/totebo)\
**Post date:** [December 17, 2019, 4:37pm UTC](https://forum.defold.com/t/4k-hidpi-monitor-support-solved/64108/5 "2019-12-17T16:37:28Z")

</div>

> [@ross.grams](#):
>
> don’t you just scale up the text size of your operating system when you have a monitor like that?

That’s what I do on my 4k monitor on macOS.

---

<div class="post-metadata">

**Author:** ![Pawel](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pawel/32/24623_2.png) [@Pawel](https://forum.defold.com/u/Pawel)\
**Post date:** [December 18, 2019, 6:50am UTC](https://forum.defold.com/t/4k-hidpi-monitor-support-solved/64108/6 "2019-12-18T06:50:13Z")

</div>

Scaling in Windows doesn’t help, icons are just too small, text is unreadable 😕 I was reading about it and issues remains unresolved, not even a single workaround, it is something that devs must ensure, unfortunately

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [December 18, 2019, 7:02am UTC](https://forum.defold.com/t/4k-hidpi-monitor-support-solved/64108/7 "2019-12-18T07:02:07Z")

</div>

> [@Pawel](#):
>
> it is something that devs must ensure, unfortunately

I think JavaFX should be able to help with this. @vlaaad and @mats.gisselson?

---

<div class="post-metadata">

**Author:** ![vlaaad](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/vlaaad/32/10538_2.png) [@vlaaad](https://forum.defold.com/u/vlaaad)\
**Post date:** [December 18, 2019, 8:17am UTC](https://forum.defold.com/t/4k-hidpi-monitor-support-solved/64108/8 "2019-12-18T08:17:09Z")

</div>

Huh, I have HiDPI Linux at home, Defold looks fine there. One thing that might help: edit `config` file in Defold installation directory: after "vmargs = " add “-Djdk.gtk.version=2,” and restart Defold.

---

<div class="post-metadata">

**Author:** ![ilbeastli](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/ilbeastli/32/18896_2.png) [@ilbeastli](https://forum.defold.com/u/ilbeastli)\
**Post date:** [April 17, 2020, 7:57pm UTC](https://forum.defold.com/t/4k-hidpi-monitor-support-solved/64108/9 "2020-04-17T19:57:51Z")

</div>

@vlaaad, that didn’t help in my case, but I’ve found [a solution](https://unix.stackexchange.com/a/552411) for my GNOME desktop environment:  
`gsettings set org.gnome.desktop.interface scaling-factor 2`  
Initially it was set to `0`.  
Hope it will help someone 🙂

And this is the result:

 ![image](https://forum-defold-uploads.b-cdn.net/original/3X/3/8/38fb9ccb96398b9727ebfaafc46e25ce6aa335cc.png)

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [April 18, 2020, 12:50pm UTC](https://forum.defold.com/t/4k-hidpi-monitor-support-solved/64108/10 "2020-04-18T12:50:07Z")

</div>

Thank you for sharing the solution! I added this to the [Linux FAQ](https://defold.com/faq/faq/#linux). I wonder if this is something we could do on startup somehow?

---

<div class="post-metadata">

**Author:** ![PeteX](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/petex/32/25623_2.png) [@PeteX](https://forum.defold.com/u/PeteX)\
**Post date:** [July 9, 2021, 11:16pm UTC](https://forum.defold.com/t/4k-hidpi-monitor-support-solved/64108/12 "2021-07-09T23:16:43Z")

</div>

I know this is an old topic but I think there is a better solution for the font scaling. The problem is that for a lot of monitors, you want to scale up by a fraction, for example 1.5 seems to work well for mine. The solution above only allows for an integral scaling factor.

You should edit `Defold/config` and find the `vmargs` line. Change it as follows:

vmargs = **-Dglass.gtk.uiScale=1.5,** -Dfile.encoding=UTF-8…

If you don’t want to scale by 1.5, include your own value of course.

Perhaps this could be added to the Linux FAQ too?

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [July 10, 2021, 7:13am UTC](https://forum.defold.com/t/4k-hidpi-monitor-support-solved/64108/13 "2021-07-10T07:13:10Z")

</div>

> [@PeteX](#):
>
> Perhaps this could be added to the Linux FAQ too?

Thanks! Added it just now. It should be visible in a minute or so.

---

<div class="post-metadata">

**Author:** ![PeteX](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/petex/32/25623_2.png) [@PeteX](https://forum.defold.com/u/PeteX)\
**Post date:** [July 10, 2021, 11:52am UTC](https://forum.defold.com/t/4k-hidpi-monitor-support-solved/64108/14 "2021-07-10T11:52:24Z")

</div>

Thank you! Now when I forget how I did it in six months’ time, it will be there waiting. 🙂
