Optimize Ubuntu interface scaling on HiDPI displays.

After I received my XPS 13 (QHD+ dsiplay) I noticed that, by default, Ubuntu and a lot of applications does not support HiDPI screens properly (yet). Everything just look horribly small…

Example : Spotify currently does not support HiDPI displays

Example : Spotify currently does not support HiDPI displays

HiDPI (High Dots Per Inch) displays are screens with a high resolution (3 200 x 1 800 for example). 4k, 5k, ‘Retina’ or QHD monitors are HiDPI displays.

Reducing resolution back to 1920×1080 is not a proper solution. The best way to meet “comfortable” environment is to scale the user interface.

I compiled here a list of the current major tweaks and setting available for optimizing Ubuntu interface scaling for HiDPI displays.

Environments

Unity

Go in : Parameters > Display and setting  “Scale for menu and title bars” to 2 (or the value you prefer).

Ubuntu System Settings > Displays

Ubuntu System Settings > Displays

There is currently a bug  witch make cursor small and not scaled when hovering Unity interface (file browser, task bar, etc…). Until this issue is fixed you can use the following workaround :

Add the following line to the end of the file :

(Thanks Alan C. for pointing it out to me)

Gnome

Open a terminal (Ctrl + Alt + T) and run :

 


Grub

Grub menu is also hardly readable. Open grub configuration file:

Change the value of GRUB_GFXMODE to :

GRUB_GFXMODE=1024x768

Then update your grub configuration file (/boot/grub/grub.cfg) by running :


TTY

You can increase the font size of the TTY by doing :

1) Select UTF-8,
2) Choose the default Combined – Latin, … option (“Latin” includes the English alphabet),
3) Choose the font,
4) Select 16×32 size

 


Applications

IntelliJ IDEA

If HiDPI does not work in Intellij IDEA, add “-Dhidpi=true” to your “IntellijIDEA/bin/idea.vmoptions” file (or  “IntellijIDEA/bin/idea64.vmoptions” if you use the 64 bits version).

The file should look something like this :

Refer here for more information.

 


That it for the moment, if you have any tweaks/tips you want to share do not hesitate to leave a comment!

If you search for other tweaks, take a look to the Arch Wiki page on HiDPI display. It is pretty complete too.

 

  • Alan C

    I had a problem with the cursor being too small if it was not hovering over Chrome. I was able to fix this by following https://bugs.launchpad.net/unity/+bug/1359211 comment #5.

    • hg8

      Thanks! I was searching a solution for that. It work great I will add it to the post 🙂

  • Matthias Johnson

    For completeness it should be

    Xcursor*size: 48

    that is appended to /etc/X11/Xresources/x11-common rather than the EXPORT that’s listed.

    • hg8

      That was a mistake. I have corrected it. It is either that or running : export XCURSOR_SIZE=48.

      Sorry and thanks for letting me know =)

  • Hithin

    Thanks, it helps also for an Asus UX303LB

  • steven luo

    I have a problem with Chrome and things like atom where like the bars for tabs and url are sooo tiny. Do you have a fix for this issue? I have the 1920×1080 version of the xps so i don’t understand why scaling is an issue. Thanks!

  • Pingback: Best Ubuntu Laptop: 9 Top picks for 2016 - Pick Notebook()

  • Corporatist

    Thanks much.

  • Pingback: Grub does not load on reboot - Gomagento2()

  • Do you know how to scale up the font size and control elements on the Ubuntu LOGIN screen?

  • Pingback: Linux 4K with HiDPI and XRANDR | Andreas' Blog()