Ubuntu

Enable Fractional Scaling on Ubuntu

When it comes to using HiDPI devices such as monitors or high-resolution laptops, displaying programs that uses default screen resolutions can lead to undesirable results. To counter this problem, a lot of operating systems use a method known as scaling, which multiplies the number of pixels displayed by a discrete numerical value. For instance, scaling by 2 would double the pixels on the screen resulting in a clearer and sharper image.

Fractional Scaling does the same thing. However, instead of using discrete numerical values, it uses fractional values to scale the program according to needs. This gives the user better control and more options to scale according to their requirements since they are not limited to integer values anymore.

Like other operating systems, Ubuntu also offers its users the luxury of enabling fractional scaling. In this guide, we will cover how you can do the same on Ubuntu 20.04 and some previous versions as well.

Enabling Fractional Scaling in Ubuntu 20.04 LTS

It should be noted that Ubuntu 20.04 does not automatically scale the display to the required value. It is something that the users must configure themselves.

Enabling fractional scaling in the latest installment of Ubuntu is fairly simple. Just follow the instructions below and you should get no trouble whatsoever.

Click on the Applications button and navigate to Settings > Display.

Click on the slider next to fractional scaling to enable it. It should look something like the image below.

There should be an option titled “Scale”. You should have a variety of options ranging from 100% (scaling by 1) to 200% (scaling by 2) or more with an increment of 25% (by 0.25) in between. Click on your preferred option and then click Apply.

If you feel like the scaling suits your display, then click on the “Keep changes” button. If you do not find it satisfactory, the “Revert Changes” button ought to take you back to what you started with. This will change your original display settings back to as they were before, so you can apply a different scaling.

Having followed all the aforementioned steps correctly and having figured out the right scaling options for your display, you now have successfully enabled Fractional Scaling on Ubuntu 20.04.

Enabling Fractional Scaling on Older Versions (18.04,19.10)

Before proceeding further, it is advised to check what kind of display server you are using. You can do this by typing the following into the terminal:

$ echo $XDG_SESSION_TYPE

There are two following methods of installation. You may opt for either one that you are comfortable with.

  • Using GUI
  • Using Command Terminal

Method 1: Using GUI

When you click on the System Display Settings, you should only have options to scale by 1x (100%) or 2x (200%). Unlike Ubuntu 20.04, the option for fractional scaling was not available for its previous builds, rather it was added as an experimental feature that could be enabled by using Dconf-Editor and console commands.

To enable fractional scaling, just follow the steps below.

Step 1. Downloading Dconf-Editor

The Dconf-Editor can be downloaded from the Ubuntu Software Store. In the store window, search for “Dconf-Editor” and click on the first result. Click Install to proceed.

Another way to install Dconf-Editor is by using the command terminal. Start the command terminal by pressing Ctrl + Alt + T on your keyboard and type in the following command:

$ sudo apt install Dconf-Editor

The installation process in the terminal should look like the image below.

Step 2. Enabling experimental features

Having finished the installation, click on launch to open the Dconf-Editor, and navigate to “org > gnome > mutter” and look for “experimental features”.

The window should look like the image below.

Deselect the “Use default value” option.

Step 3. Adding custom script.

If you are using X11, then type [‘x11-randr-fractional-scaling’] in the square brackets to change the custom value.

If you are using Wayland, then type [‘scale-monitor-framebuffer’] in the square brackets to change the custom value.

Once you are done, close the editor and open the Settings menu and go to display settings. You should now have options to configure over a wide set of values. To revert the changes, just remove the values in the Dconf-Editor.

Method 2: Using the Terminal

Those of you who are familiar with the command terminal can directly enable these features through the command terminal.

You can directly enable fractional scaling by opening the command terminal and type in the following commands in the console.

For X11 Display Server:

$ gsettings set org.gnome.mutter experimental-features “[‘x11-randr-fractional-scaling’]

For Wayland Display Server:

$ gsettings set org.gnome.mutter experimental-features “[‘scale-monitor-framebuffer’]

Having done that, go back to display settings by navigating to Settings > Display.

There should now be a variety of scales to choose from.

The following command should help you reset the changes:

$ gsettings reset org.gnome.mutter experimental features

Additional Information

You can enable commands for both X11 and Wayland by typing:

$ gsettings set org.gnome.mutter experimental-features “[‘x11-randr-fractional-scaling’ , ‘scale-monitor-framebuffer’]

Note that these settings are meant to be applied for HighDPI displays. This means that fractional scaling options will not be available if you are using low resolutions. For example, a resolution scale of 800×600.

Ubuntu does not automatically find the correct fractional scaling value for you, rather it is up to the users to find it themselves. In most cases, 125% or 1.25x gets the job done. However, in the end, it all depends on your personal preference.

Conclusion

With all steps followed correctly, you have now successfully enabled fractional scaling on Ubuntu. Make the most out of your HiDPI displays through fractional scaling, so you can enjoy the complete visual experience Ubuntu has to offer. Although this feature of fractional scaling can still be considered to be in BETA (even in the case of Ubuntu 20.04 LTS), it does not disappoint when you actually turn it on. The distro does a fine job in scaling the text, images, and programs such that they give off a clean and sharp look while at the same time making sure that they do not lose any information. This feature is definitely going to improve your overall Linux experience. So, do give it a shot!

About the author

Zeeman Memon

Hi there! I'm a Software Engineer who loves to write about tech. You can reach out to me on LinkedIn.