HiDPI support in Manjaro

Linux HiDPI support is in an evolving state with some applications and environments providing seamless support while others provide close to none. I wanted to share both my findings about the state of HiDPI in each DE and some tips for how to improve usability in each environment on a high resolution screen.

The instructions for Gnome, KDE/Plasma and XFCE assume an up to date environment installed from the official ISOs. For all the other Desktop Environments installation instructions are included for each. The instructions were tested coming from the XFCE edition but it should be the same regardless of where you start.

When it comes to scaling there are a few things to consider:

  1. The ability automatically scale meet the desktop to different resolutions
  2. The uniformity of the scaling. For example does it scale all aspects of the DE or just certain ones.
  3. The scaling increment. Some desktops only scale in whole increments such as 2x or 3x while others support fractional increments such as 1.25x. This can be important, especially at lower resolutions such as 1440p where 1x might be too small but 2x is too large.

A few notes:

  • Everything below assumes your system is up to date. You can ensure it is up to date by running sudo pacman -Syu
  • Specific settings for DPI, pixel counts and scale factors are not specified because it is a matter of personal preference. As a rule of thumb, if you want a 4K screen to have normal size elements for a 1080p screen then you should use a scale factor of 2 and double the DPI and pixel amounts
  • An attempt has been made to make this as beginner friendly as possible so you will find things like “Open the file .Xresources in your home folder” as opposed to “edit ~/.Xresources”

Budgie
Budgie is a simple and intuitive desktop. It is currently a derivative of Gnome and as a result Budgie’s scaling is very good. Budgie scales in 1x increments up to 3x.

  • To install Budgie reference the appropriate Wiki page
  • Budgie autoscales the interface by default. If it doesn’t you can run the run the “dconf Editor” and go under org->gnome->desktop->interface->scaling-factor and change it manually
  • To change the cursor size run the “dconf Editor” and go under org->gnome->desktop->interface->cursor-size

Cinnamon
Cinnamon has top notch support for HiDPI. It autoscales everything by default and pretty much “just works”. Cinnamon scales in 1x increments up to 3x.

  • To install Cinnamon reference the appropriate Wiki page
  • The interface autoscales but if you want to change it manually you can in System Settings->General
  • If you want to change the cursor size you can use dconf-editor
    • If dconf-editor is not installed, you can install it with: sudo pacman -S dconf-editor
    • Then run dconf-editor and browse to org->cinnamon->desktop->interface->cursor-size

Deepin
Deepin has added support for hidpi displays in recent versions. The scaling is manual but it is simple to use. Deepin scales in .25x increments up to 2x.

  • To enable scaling adjust the slider in display settings

Enlightenment
HiDPI support in Enlightenment is usable but there are some definite issues. The window borders are very difficult to target and some UI elements do not scale.

  • To install Enlightenment reference the appropriate Wiki page
  • Open the file .Xresources in your home folder. Find the line that reads “Xft.dpi=” and change it to something suitable. This will adjust the font sizes in applications
  • Logout and login to Enlightenment
  • Enlightenment walks you through an initial setup process and one of the steps is to select the scaling factor. If you miss it you can find it later in the “Settings Panel” on the “Look” tab under “Scaling”
  • Open the “Settings Panel”. Under the “Input” tab, select the “Mouse” item and adjust the cursor size

Gnome
HiDPI Support in Gnome is excellent. It auto-scales by default and is completely usable out of the box

  • To install gnome reference the appropriate Wiki page
  • Gnome autoscales the interface by default. If it doesn’t you can run the run the “dconf Editor” and go under org->gnome->desktop->interface->scaling-factor and change it manually
  • To change the cursor size run the “dconf Editor” and go under org->gnome->desktop->interface->cursor-size

KDE/Plasma
Support for HiDPI in plasma is very good after a few adjustments. Sometimes gtk application will not scale quite as well on plasma as they do on other DEs but that is relatively rare.

  • To install kde/plasma reference the appropriate Wiki page
  • Go into “System Settings”. Under “Display and Monitor” click “Scale Display”. Drag the “Scale” slider to an appropriate amount. Log out and then back in
  • If your cursor needs resizing you can do so in “System Settings”. Under “Workspace Theme”, select “Cursor Theme” and then adjust the size on the bottom right hand side
  • Right click on the panel and go to panel options and then unlock widgets. Click on the handle for the panel and drag the “Height” box until the panel is an appropriate size
  • If you would like to resize the items in the systray you do so by following these steps:
    • In your “Home” directory there is a hidden directory called “.config”
    • Edit the file “plasma-org.kde.plasma.desktop-appletsrc”
    • Search the file for “SystrayContainmentId” there will be a number after the “=” sign
    • Scroll down to “[Containments][8][General]” replacing “8” with your number from the previous step
    • If iconSize is not already in that section add a line that reads “iconSize=2”. Replace 2 with your desired scale factor
    • Logout for the changes to take effect

LXDE
HiDPI support in LXDE is usable after some tweaking.

  • To install LXDE reference the appropriate Wiki page
  • Open the file .Xresources in your home folder. Find the line that reads “Xft.dpi=” and change it to something suitable. This will adjust the font sizes
  • Logout and login to LXDE
  • Right click on the panel and select “Panel Preferences”
    • In the “Geometry” tab, adjust the “Height” and “Icon Size” to your liking
    • In the “Panel Applets” tab select “Task Bar” and click “Preferences” to adjust the width of the task buttons
  • Open the “PCManFM File Manager”. Open the Edit->Preferences menu item. Under “Display” set all the sizes appropriately
  • Openbox, the default LXDE window manager in Manjaro does not support HiDPI very well so you will need to download a specific HiDPI theme or use something else. Manjaro includes HiDPI themes for the xfce window manager or you could install kwin
  • Option 1 - Install an Opnbox HiDPI theme. This is the easiest solution but Openbox themes are fixed pixels so you need to find one with your dimensions in mind
    • If the theme is packages as an Openbox Theme Archive(obt) then open the “LXQT Configuration Center”, go into “Openbox Settings” and select “Install a new theme”
    • If not, you will need to uncompress it and then place it in the “.themes” folder in your Home folder. If that folder does not exist then you need to create it. mkdir ~/.themes Then open the “LXQT Configuration Center”, go into “Openbox Settings” and select the theme from the list
  • Option 2 - Install xfwm4, the window manager from XFCE. Manjaro includes some HiDPI themes for XFCE and these themes are often a good match for the default LXDE theme
    • Install the following packages:
      • xfwm4 - The window manager
      • xfwm4-themes - Themes for xfwm
      • xfce4-settings-manager - The settings manager so you can adjust the themes and other window manager settings
      • To install these all at once you can use: sudo pacman -S xfwm4 xfwm4-themes xfce4-settings-manager
    • Open the “Desktop Session Settings” application. On the “Advanced Options” tab, change the “Window Manager” to be xfwm4
    • Logout and back in again to activate xfwm4 as the window manager
    • Run xfce4-settings-manager from a terminal or the “Run” box. Select “Window Manager” and choose a HiDPI theme from the list
  • Option 3 - Install kwin, the window manager from KDE
    • Use sudo pacman -S kwin systemsettings to install kwin and the “KDE System Settings” application used to configure it
    • Open the “Desktop Session Settings” application. On the “Advanced Options” tab, change the “Window Manager” to be kwin_x11
    • Logout and back in again to activate kwin as the window manager

LXQT
LXQT is the next generation of LXDE and in its current state is actually capable of decent support for HiDPI but it takes some work to get there.

  • To install LXQT you need the following packages/groups:
    • lxqt - The lxqt install lxqt
    • menda-lxqt-panel - This installs a Manjaro LXQT theme and it is important because it is one of the few themes that handles font scaling without overlapping the icons and text in the application menu
    • To install both of the above from a terminal use: sudo pacman -S lxqt menda-lxqt-panel
  • Open the file .Xresources in your home folder. Find the line that reads “Xft.dpi=” and change it to something suitable. This will adjust the font sizes Logout and login to LXQT
  • After installation, LXQT has no icon theme selected by default so first we should fix that. Open the “LXQT Configuration Center”. Open “Appearance” and select an “Icon Theme”. While you are in there choose the Menda LXQT theme
  • Right-click on the panel and select “Configure Panel”. Change “Size” and “Icon Size” appropriately
  • Open the “PCManFM File Manager”. Under the Edit->Preferences menu item. Select “Display” and set all the sizes appropriately
  • Openbox, the default LXQT window manager does not support HiDPI very well so you will need to download a specific HiDPI theme or use something else. kwin is a good alternative for LXQT.
  • Option 1 - Install an Opnbox HiDPI theme. This is the easier solution but Openbox themes are fixed pixels so you need to find one with your dimensions in mind
    • If the theme is packages as an Openbox Theme Archive(obt) then open the “LXQT Configuration Center”, go into “Openbox Settings” and select “Install a new theme”
    • If not, you will need to uncompress it and then place it in the “.themes” folder in your Home folder. If that folder does not exist then you need to create it. mkdir ~/.themes Then open the “LXQT Configuration Center”, go into “Openbox Settings” and select the theme from the list
  • Option 2 - Install kwin, the window manager from KDE
    • Use sudo pacman -S kwin systemsettings to install kwin and the “KDE System Settings” application used to configure it
    • Open the “LXQT Configuration Center” again and this time look under “Session Settings”. Change the “Window Manager” to be kwin_x11
    • Logout and back in again to activate kwin as the window manager

MATE
MATE has added some support for hidpi displays. Scaling is automatic. hidpi is basically an on/off switch where it doesn’t scale or scales at 2x. Application scaling works pretty well but I noticed a lot of layout issues with MATE panels and widgets when scaling was enabled.

  • To enable scaling go into the “MATE Tweak” settings under “Window” set the “HIDPI” setting as desired.
  • If 2x is too big or too small for your application some fine tuning can be achieved by changing the font resolution. In “Appearance Preferences” select the “Fonts” tab and then click “Details”. You can then adjust the DPI to suit your preference.

XFCE
With a decent amount of tweaking XFCE is usable on HiDPI screens. A few elements won’t be scaled properly and some things don’t layout ideally such as the settings menu but overall it is workable

  • To install XFCE reference the appropriate Wiki page
  • Under “Settings”, open “Appearance”. Select the “Fonts” tab and set an appropriate DPI setting
  • Under “Settings”, open “Window Manager”. Select the “Style” tab and choose a HiDPI style. There is one called “Default-hidpi” if you are having trouble finding one
  • Open “File Manager”(Thunar) and change the zoom to an appropriate level in the “View” menu
  • Under “Settings”, open “Panel”
    • On the “Display” tab, drag the “Row Size” slider to an appropriate value
    • On the “Items” tab select “Whisker Menu” and then click on the edit button. Set the icon sizes on the “Appearance” tab to your liking
    • Stay on the “Items” tab and select “Notifications Area” and then click on the edit button. Change “Maximum Icon Size” to an appropriate value
    • If you end up with two rows of window buttons and you find them too difficult to see or target there are two different workarounds
      1. You can reduce the “Row Size” until it falls to a single row
      2. Alternatively, on the “Items” tab select “Window Buttons” and then click on the edit button. Uncheck “Show Button Labels”. This will give you full size icons
  • Under “Settings”, open “Desktop” and select the “Icons” tab. Change the “Icon Size” to something suitable

Window Managers

SDDM
SDDM has support for hidpi via manual or automatic scaling

To set SDDM to auto scale:

  • Check for the presence of the file /etc/sddm.conf
  • If you have an sddm.conf file then edit both the [X11] section and the [Wayland] section to include the following line:
    EnableHiDPI=true
  • If not, add a config file to /etc/sddm.conf.d with the following contents(create the directory if it does not exist):
    [Wayland]
    EnableHiDPI=true

    [X11]
    EnableHiDPI=true

To set SDDM to use a manual DPI setting:

  • Check for the presence of the file /etc/sddm.conf
  • If you have an sddm.conf file then look in the[X11] for the line that starts ServerArguments=and add -dpi X to the end of that line where X is your target DPI. For example, mine looks like this: ServerArguments=-nolisten tcp -dpi 192
  • If you don’t have sddm.conf then check the directory /etc/sddm.conf.d for any files that have the line starts ServerArguments=and add -dpi X to the end of that line where X is your target DPI. For example, mine looks like this: ServerArguments=-nolisten tcp -dpi 192
  • If the /etc/sddm.conf.d doesn’t exist or doesn’t contain a file with the ServerArguments line then create it and add a file with the following contents:
    [X11]
    ServerArguments=-nolisten tcp -dpi 192
    Replace ‘192’ with an appropriate target DPI for your configuration

It is worth noting that in my testing enable auto-scaling scaled a 15.6" 4K display by a very small amount and I was forced to use the manual configuration to get good results.

GDM
Like Gnome, GDM auto-scales by default


Out of date information below this point
Budgie
* To install Budgie you need the following packages/groups:
* budgie-desktop - This is the main Budgie package and the only one that is truly required
* manjaro-budgie-settings, manjaro-budgie-settings-extra - These are Manjaro specifics settings and theming
* gnome-terminal - The terminal from gnome is typically packaged with Budgie. If you have a preferred terminal already installed you can skip this
* gnome-control-center - While not essential Budgie relies on the gnome control center for easy access to settings and the settings buttons in the UI will not work if this is not installed
* dconf-editor - This is needed if you want to tweak Budgie settings. As it relates to this topic it is the easiest way to change the cursor size
* To install all of the above from a terminal use sudo pacman -S budgie-desktop manjaro-budgie-settings manjaro-budgie-settings-extra gnome-terminal gnome-control-center dconf-editor You will probably get a message that manjaro-budgie-settings conflicts with your current Manjaro settings package. Just press ‘Y’ to remove the existing package.
* Logout and login to Budgie

Cinnamon
* To install Cinnamon you need the following packages/groups:
* cinnamon - This is the main Cinnamon package and the only one that is truly required
*manjaro-cinnamon-settings - These are Manjaro specifics settings and theming
* gnome-terminal - The terminal from gnome is typically packaged with Budgie. If you have a preferred terminal already installed you can skip this
* To install all of the above from a terminal use - sudo pacman -S cinnamon manjaro-cinnamon-settings gnome-terminal You will probably get a message that manjaro-cinnamon-settings conflicts with your current Manjaro settings package. Just press ‘Y’ to remove the existing package
* Logout and login to Cinnamon

Deepin
Currently, Deepin has very little support for HiDPI. You can set Xft.dpi in ~/.Xresources which will make fonts bigger and will correct many applications but the overall interface doesn’t scale and is not configurable. An alternative solution until Deepin receives HiDPI support is to lower the resolution in the settings which is not ideal.

LXDE
* To install LXDE you need the following packages/groups:
* lxde - This is the main LXDE package and the only one that is truly required
* manjaro-lxde-settings - These are Manjaro specifics settings and theming
* To install both of the above from a terminal use: sudo pacman -S lxde manjaro-lxde-settings You will probably get a message that manjaro-cinnamon-settings conflicts with your current Manjaro settings package. Just press ‘Y’ to remove the existing package.

MATE
As of Manjaro 17.0.2 MATE has no meaningful support for HiDPI. As an alternative, you can adjust your display resolution.

20 Likes

Great info.
Needs to be a tutorial.

Yup, I will moved this to #technical-issues-and-assistance:tutorials category and adding some tags…

Updated 8/8/2018

  • Added SDDM
  • Added GDM
  • Changed the instructions on installing the DEs to point to the wiki
  • Updated Deepin to reflect the current state
  • Updated MATE to reflect the current state
  • Added some general notes and cleanup
1 Like

Plasma is still better served by dpi than by scaling, in my opinion.

I don't really know. On my system using dpi create strange artifacts, instead scaling cause no problem. Probably is heavily hardware-depending.

Really? I've literally never heard that. Quite the opposite.
(aside from this one post .. which seems rather odd .. but still isnt artifacts and might be some other issue...)

As far as I know scaling works OK for exactly 1x and 2x ... anything else will be garbage. They are working on it.... but it isnt there yet.

If you would like - please see
https://wiki.manjaro.org/index.php?title=KDE#HiDPI
and/or my script (for KDE only!)
https://gitlab.com/cscs/hidpify

and let me know (dont forget to restart everything .. or just reboot the system)

I'll gladly try and let you know. Thanks a lot!
Btw really, and absurdley enough I've no problem with a 1.2x scaling.

There have been updates since .. I am happy to hear it sometimes works for some. :slight_smile:

Your script works very well! I've tried it and everything scales better now. Don't know what changed from when I was using dpi but probably I've done something wrong. Thanks a lot.

@cscs
Can hidpify
Be packaged same as autorandr
https://aur.archlinux.org/packages/autorandr-git/
So that it can also start with systemd service and automatically adjust scaling on startup

Can you upload it to aur.

It is a single script intended to run once .. there really isnt a need for a package or service.
If you, for example, want to add it to an iso or something to automate configuration upon first login or similar then that is possible .. but should not require a package.

adding it to .config/autostart-scripts
in my iso
edit
its a bad idea to add in autostart
as it needs root access may be a systemd service is appropriet
changing some parts may require to automate it

may be automatically getting dpi
of screen
e.g
xdpyinfo | grep -B 0 resolution

The problem being its hard to 'automate' because resolution isnt the only factor .. its resolution vs size of screen .. I honestly do not know how to magic that..

The above command gets the DPI
xdpyinfo | grep -B 0 resolution

resolution:     92x91 dots per inch

in my PC

But it also gives unnecessary things
Is it possible to truncate the out put to only 92

That gives current - not intended.

So does DPI change ?

It does if you set it to something different.
Mine is set to 120, so it reports 120.
As far as I know .. there really isnt a magic way to get 'what DPI I should use on this machine'.

For CHROME simply use standalone ~/.config/chrome-flags.conf additional flags sample content:

--flag-switches-begin --high-dpi-support=1 --force-device-scale-factor=1.2 --flag-switches-end

1.2 value is recommended for FHD display.

you're 1 dot short :grinning:

Forum kindly sponsored by Bytemark