How to handle hi res screens

Things to do with a Hi-dpi screen on XFCE

To begin - here is screenshot of the Settings app for XFCE

First off, there is a possibility that you would be happy with a simple scaling change, that changes the effective resolution to half of what you actually have. If you would be happy with such a change, there are two ways to achieve it. One is to use the Settings/Display application,


gabon:
and select the resolution you consider correct for your use. If you have, for example, a 3840x2160 monitor, you could choose 1920x1080 as your resolution - giving you half the screen real-estate. Another choice might be (depending on your hardware) 2560x1440, which would give you about 75% of the original resolution - or an increase in size of 150% of the features (and fonts!) on your screen.

This works well, and the system will remember your settings and fire up graphic sessions in that mode thereafter.

However - if you want to keep your full resolution, but still be able to see the features of the User Interface (UI) and the text on the screen, there are other ways. Take a look here at the Settings/Appearance/Settings screen:

Again, there is a Scaling option in gabon: Settings/Appearance/Settings/Window Scaling. This enables a scaling factor for the system to apply, but it only takes whole numbers (1 or 2 or 3 etc.) which keeps your choices limited. This may be made more flexible in the future, but for now...

If that doesn't appeal to you, there are a number of steps you can take which will give you more flexibility, keeping your full resolution while still allowing you to see the UI and the text clearly.


The Steps to a more nuanced setting for HI-DPI screens

  1. In Settings/Appearance/Fonts/DPI there is an opportunity to make a change. Most come up with 96 dpi as standard. One of the most useful settings is 120 dpi - which is a substantial step up without trying to double everything. Just above this, on the same screen, is the rendering setting where I would recommend you check the "Enable anti-aliasing" box, and select Slight for the font hinting.

  2. Now that you can see better, you can choose a font size that works for you in the Default Font and Default Monospace Font categories. Increase these until you are reading comfortably. 12 might do it, 13 is probably OK, but I'm a bit older so I choose 14 on both as a workable and non-tiring option.

  3. Now, in the Window Manager app, under the Style tab, there are a couple of more changes worth doing. The Window Manager handles the Titlebars and their text, and the 'outside envelope' of the window. Again, you can set the font appropriately, probably to the same size (12, 13, 14) as you opted for in the previous section. This leaves on the size of such things as toolbars (play. pause and stop buttons in a music player for example) to be set up. There are many themes that can be downloaded, and some of them specify the size on pixels of the toolbar. I run with an assortment of XFCE-38px options, which, again, are comfortable - and allow sufficient room for the upsized font you chose in the step before. By the way - this is also where you can choose which window control buttons you wish to use, and where they are located on the titlebar. As you see, I move them left, and hide the menu button.

  1. The final 'tweak' is a global setting to inform those applications that check for such things that you wish a size increase of UI elements. This involves adding 2 statements entered in a file that will be executed when you start up - such as .bashrc - or from a file that .bashrc calls (perhaps .bashrc-personal or .bash_aliases) These statements are:

export GDK_SCALE=2
export GDK_DPI_SCALE=0.5

and can be added to the .bashrc file using any text-capable editor. (nano, micro, leafpad, mousepad, featherpad, gedit - whatever you have or like for the task)

These effectively cause a doubling of UI elements, but take the same size step back down for fonts - to the level and size you set before. A few applications may need their own settings to fit in properly (Chromium-based browsers come to mind - they need an entry with their startup command - probably in the .desktop file. The addition of

--force-device-scale-factor=1.5

to the Exec= entry of the .desktop file will cause the browser to grow all elements by the specified factor, greatly increasing readability.

Enjoy your new Hi-dpi screen - and the familiarity with the possible settings you can use to make it yours - and to change it as you need to suit your wishes.

freebird54

EDIT:
I have tracked down the problem with being able to see applications that use the QT5 libraries to display on the screen. An good example of this is the Garuda Welcome app - which abounds with useful tools and capabilities - but is really hard to see on a 4K screen.

There is a script setting an environment variable in the /etc/profile.d directory, named QT_AUTO_SCREEN_SCALE_FACTOR.sh. Logically enough, it sets the env variable of that name to 1. Unfortunately, although it should act to match the GTK scaling you use, it doesn't. So - the following is one way to 'fix' it.

Open a terminal. Enter:
sudo mv /etc/profile.d/QT_AUTO_SCREEN_SCALE_FACTOR.sh QT_SCALE_FACTOR.sh

This just tidies up the name to match what it's doing. Use your favourite editor

(example: sudo micro /etc/profile.d/QT_SCALE_FACTOR.sh)

and edit the contents to match this:

#!/bin/bash
#export QT_AUTO_SCREEN_SCALE_FACTOR=1
export QT_SCALE_FACTOR=1.5

I just commented out the old setting, in case you ever want to return to it. The next time you login, you will be greeted by a Welcome you can see!

9 Likes

how about this can anyone test this
/etc/profile.d/autohidpi.sh

#!/bin/bash
RV=$(xdpyinfo | grep dots | grep -o -P '.{0,4}x' | sed 's/x//g')
# to get only number 
DPI=$(bc <<< "scale = 0;  $RV / 1")
# Generate a "fractional value" (FV) from a 96dpi default (ie: 120 = 1.25)
FV=$(bc <<< "scale = 2;  $DPI / 96")

# Apply GTK scaling using the FV
export GDK_SCALE=$FV

# Apply Automatic QT scaling which *should* force screen DPI
export QT_SCALE_FACTOR=$FV

@freebird54 can you test if this works

2 Likes

I will get to it a bit later this evening.

2 Likes

We are thinking of adding an toggle button to enable and disable hidpi to garuda welcome app

If any one wants to they can contribute scripts to toggle hidpi on/off

4 Likes
1 Like