185

I recently installed Ubuntu 18.04 and discovered that the fractional scaling option that was in 16.04 is no longer there. 200% is too big for my display, and this answer didn't work for me (the options didn't change after running the command).

Is there another way to get fractional scaling?

7
  • 16
    This seems to be a problem especially for laptop users. Just downloaded 18.04 on a desktop and laptop. Laptop has a hi-res lcd screen which means 100% is far too small or 200% far too big. If dynamic scaling is out of the question 150% option would be an okay palliative.
    – Andrew
    Apr 29, 2018 at 17:17
  • 1
    This isn't a proper answer to your question, but I tried Ubuntu MATE today and I've been astonished by how good the HiDPI support is. It literally Just Worked for me.
    – N3dst4
    Apr 29, 2018 at 18:18
  • 6
    16.04 just had this. Upgrade to the next LTS and it feels like one big downgrade :( WTF
    – Sentient
    May 23, 2018 at 20:18
  • 3
    Be aware that snap apps, which Canonical seem to think are the future, do not respect your theme. Which includes font scaling (I don't know about display scaling). They need to realize the theme is not just about looking pretty, it can be about usability. Most snap apps are unusable on my Dell XPS 13 due to this. Same problem with wine.
    – B.Tanner
    Aug 23, 2018 at 5:58
  • 1
    We have to wait for the issues in gnome-shell and mutter to be resolved and for the changes to be merged.
    – caw
    Dec 6, 2018 at 17:23

12 Answers 12

75

Install Tweaks by running:

sudo apt install gnome-tweaks

Then go to TweaksFontsScaling Factor and change the scaling value.

Gnome Tweaks font settings

At least this option helps to make text bigger.

Actually I like this approach, since it keeps other things at scaling 1, because I only need the text to be bigger.

4
  • 2
    Worked great for me. I can see the difference between scaling 1.00 and 1.01.
    – Gene Olson
    Sep 23, 2018 at 2:32
  • 7
    The only problem with this approach is that it scales both monitors and you can't do them separately. I have a laptop with a 4K 13" monitor that is tiny and a much bigger 4K external monitor that sits beside it. I now have the 13" looking great, but the external has HUGE text. With Wayland I can scale them independently.
    – Peter Nunn
    Feb 17, 2019 at 23:54
  • 1
    This is font scaling not display scaling the OP is asking about Jun 19, 2020 at 9:59
  • I was trying to increase the IDE font size and it didn't work. But the thing is IDE has it's own scale settings) May 17, 2023 at 13:55
60

XOrg solution

The Archwiki proposes a solution (or rather a hack) with xrandr (if you use standard Ubuntu 18.04 with xorg):

ArchWiki - HiDPI - fractional scaling

Fractional Scaling

A setting of 2, 3, etc., which is all you can do with scaling-factor, may not be ideal for certain HiDPI displays and smaller screens (e.g. small tablets).

xorg

You can achieve any non-integer scale factor by using a combination of GNOME's scaling-factor and xrandr. This combination keeps the TTF fonts properly scaled so that they do not become blurry if using xrandr alone. You specify zoom-in factor with gsettings and zoom-out factor with xrandr.

First scale GNOME up to the minimum size which is too big. Usually "2" is already too big, otherwise try "3" etc. Then start scaling down by setting zoom-out factor with xrandr. First get the relevant output name, the examples below use eDP1. Start e.g. with zoom-out 1.25 times. If the UI is still too big, increase the scale factor; if it's too small decrease the scale factor.

xrandr --output eDP1 --scale 1.25x1.25

Wayland solution

Since Ubuntu 18.04, Wayland is the default display protocol.
To enable scaling:

  • Enable fractional Scaling experimental-feature:

     gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"
    
  • Restart the computer.

  • Open Settings -> Devices -> Displays

  • Now you should see 25 % step scales, like 125 %, 150 %, 175 %. Click on one of them and see if it works.

9
  • You have to use the panning option, see ArchWiki HiDPI Side display
    – spinxz
    May 14, 2018 at 20:04
  • 4
    You could find relevant output from xrandr -q, output wich is 'connected'. For the mouse 'invisible boundaries', you should add --panning 1920x1080 option (with you resolution)
    – ada
    Sep 17, 2018 at 18:21
  • 2
    Both proposed methods cause text to be blurred and some things to look unnatural. Mar 15, 2019 at 22:53
  • The second solution almost works great, except at the fractional values, the pointer is extremely laggy. Edit: seems to be a known issue: gitlab.gnome.org/GNOME/mutter/issues/478
    – KevinOrr
    May 23, 2019 at 15:13
  • 3
    XORG solution does not work. It doesn't scale text and applications, it instead creates a larger framebuffer and shtinks it with a crappy algorithm. If the framebuffer is large (in my case 6240x3510 for 3840x2160 screen) everything slows down. Dec 1, 2019 at 12:45
17

I run a shell script on login (using Startup Applications control panel) to set my desired scaling.

Determine your output device (mine is DP-1) by running xrandr on its own.

Then put an executable script somewhere (I have it in my home directory) containing the following:

#!/bin/bash

gsettings set org.gnome.desktop.interface scaling-factor 2
gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "{'Gdk/WindowScalingFactor': <2>}"
xrandr --output DP-1 --scale 1.5x1.5
xrandr --output DP-1 --panning 3840x2160
10

Tried to play with expermential features and some other "tips" found online but nothing helped or seemed like "solution" will introduce another pallet of issues. What i eventually did is - i installed unity desktop manager which was used with Ubuntu 16. So now I have running latest 18 LTS with a bit different desktop manager which does have fractional scaling without any hacks.

sudo apt install ubuntu-unity-desktop

enter image description here

5
  • Only menu and title bars are scaled fractionally. Applications are scaled by round(scale factor), in my case factor 2 for a scale factor of 1.5 Dec 1, 2019 at 12:48
  • 1
    -1 If you have Ubuntu 18.04 or any other version that uses gnome3 DO NOT follow the steps above if you are not sure what you are doing. After rebooting, the look of my distro and all the preferences were gone. Fortunately, I was able to revert to gnome by following some steps from: youtube.com/watch?v=jpgXth6I80A. The irony is that this answer is worse than the "hacks" it tried to disregard...
    – bruno
    Mar 28, 2020 at 2:27
  • @bruno you should understand that gnome and unity are 2 different programs and they have their own settings. It's like saying I changed my password on Facebook but my password on Twitter is still the same as it was. Of course, your gnome settings are not at unity. That's the point, to get new options to change the scale. It's not a hack, it's different software. Mar 30, 2020 at 14:02
  • 2
    @LukasLiesis For newbies like myself in Linux the statement "without any hacks" was not adequate, considering new distributions do not come with unity. So I ran the command thinking it was a simple program. You are literally suggesting to install a new desktop environment just to change the zoom. At least the other "hacks" are easy to revert
    – bruno
    Mar 30, 2020 at 18:24
  • @bruno Using application that does not require any hacks seems a more solid solution to me and it worked perfectly fine from the first try without anything breaking down for me. Yet if you use more hacks or some special tooling which does not support unity, to modify your desktop env, very possible that such fundamental app change broke things for you yet in my situation switching to the different app was the smoothest and easiest way to get the scaling. Mar 30, 2020 at 22:54
7

I used Unity Tweak Tool in Ubuntu 16.04. I'm running now a test environment where 16.04 was upgraded to Ubuntu 18.04 LTS. I just checked and Unity Tweak Tool is still there and scaling my High DPI screens properly. The settings I'm using for scaling on a 1920x1080 monitor are:

Tweak fonts.png

The Text scaling factor scales both fonts and UI elements like title bars, buttons, etc.


Icon size is preset but the text size under it increases giving the illusion the icon size changed:

UbuntuTweakFonts.gif

In the .gif above scaling starts at 1.38 on a 1920x1080 monitor. Then it is changed to 1 and everything gets tiny, which is normal. Then it is changed to 2 which is ideal for the visually challenged. Once again the icons have fixed pixel size and the font shrinking or expanding under the icon gives the illusion their size is changing.


To install Unity Tweak Tool use:

sudo apt install unity-tweak-tool

Others may be interested in the full suite of tools available in 18.04 LTS:

$ apt list | grep tweak
gajim-rostertweaks/bionic,bionic 1.0.0-3 all
gnome-tweak-tool/bionic,bionic 3.28.1-1 all
gnome-tweaks/bionic,bionic 3.28.1-1 all
mate-tweak/bionic,bionic 18.04.16-1 all
mousetweaks/bionic,bionic,now 3.12.0-4 amd64 [installed]
tweak/bionic 3.02-2 amd64
unity-tweak-tool/bionic,bionic,now 0.0.7ubuntu4 all [installed]
4
  • 1
    Is there a general scale setting, not just a setting for fonts?
    – Mitch
    Apr 29, 2018 at 19:05
  • @Mitch The text scaling factor scales the icons at the same time. I clarified that in the answer. Apr 29, 2018 at 19:10
  • Sorry, should have been more specific: I meant does it also apply for the size of other UI elements like title bars, buttons, etc.
    – Mitch
    Apr 29, 2018 at 19:54
  • 1
    @Mitch My humble apologies Icons are prepackaged for pixel size and do not scale. I've updated the answer with a .gif that shows the illusion icons were changing size but it was the text below the icon shrinking/expanding in size that gave the illusion the icon was changing. May 7, 2018 at 23:30
5

You can't, because Ubuntu switched back to Xorg as the default display server. A lot of people are searching for a solution, and this thread is the top result on Google. Unfortunately there is still no fractional scaling in Xorg.

5
  • 2
    I don't understand this answer. Ubuntu 16.04 ran on Xorg and yet it had support for fractional scaling.
    – Beevik
    Jul 1, 2018 at 16:12
  • 1
    It’s that Ubuntu has switched from Unity (which had it) to GNOME (which doesn’t have it yet).
    – caw
    Sep 19, 2018 at 5:42
  • @caw Ubuntu talked about ditching Unity but did a 180 and still supports it in Ubuntu 18.04. It's unclear when they will abandon Unity. I assume it will be when Gnome is the undisputed champion but no one can say when that will be. Dec 22, 2018 at 1:43
  • @WinEunuuchs2Unix No, Unity support will probably end with the EOL (End of Life) of Ubuntu 16.04 (which uses it), and that’s April 2021.
    – caw
    Dec 22, 2018 at 2:55
  • @caw You might be right but I currently use Unity on Ubuntu 18.04 as well. Dec 22, 2018 at 14:18
4

You can use 1600x900 (16:9) from dropdown to increase scaling. enter image description here

4
  • 6
    it will destroy the quality. With resolution change, you just change how many pixels are displayed, which directly corresponds to how sharp everything looks on screen. askubuntu.com/a/1104530/498433 worked for me just perfectly and w/o any hacks. Jan 19, 2019 at 7:52
  • 3
    @Lukas same here. The text becomes huge on Dell XPS 9370
    – JP Ventura
    Sep 14, 2019 at 22:44
  • 1
    If anyone has a high-dpi display I'd advise them to try this solution out before dismissing it. I have a Dell XPS 13 (native resolution 3200x1800) and it looks fine with 100% scaling at 2560x1440 or 2048x1152
    – Andy
    Apr 20, 2020 at 15:01
  • Frankly this is the only thing that worked for me.
    – neuronet
    Oct 11, 2020 at 12:42
3

I am currently experimenting with a fix for this (still using Ubuntu 16.04 admittedly, but I'm pretty sure the same options are available in 18.04) which keeps the scaling at 1, but uses the resolution selector in the "Screen Display" part of System Settings to drop the resolution of the panel. You would think this would make everything blurry, but it seems to be doing a fine job for me. YMMV.

My screen (X1 Carbon 4th Gen) is 2560x1440, a 16:9 ratio. 2x zoom would make it effectively 1280x720, which is too small. Instead, I pick 2048x1152 (also a 16:9 ratio) from the selector. For me at least, it also offers 1920x1080, 1600x900 and 1368x768 as options depending on how much downscaling you want.

I might end up going with 1920x1080 as 2048x1152 still has a few things a little bit small.

3

The solution with the Gnome Tweak Tool works well for me with Ubuntu 18.04 with a 3840 x 2160 resolution display. After setting only the scale factor to 1.5 and leaving the font sizes unchanged the screen display was great for me. Additionally I had to adjust the size of the dock symbol size in the gnome settings. That seems to me the least intrusive solution.

1
  • This is the best solution for most people. Thanks, mgorriz.
    – Gene Olson
    Sep 23, 2018 at 2:29
2

The 18.04 desktop is fitting wallpaper images according to width, so if you resize your images for the width of the screen (regardless the absolute size of the image) your wallpapers will fit. To fit the tall images I go into "alter image/change canvass size" and add wide borders on either side using Pinta. (or Gimp or whatever you've got)

1
  • 3
    how has this anything to do with the question asked?
    – ruuter
    Aug 5, 2019 at 9:38
1

This issue has been around for a long time. My answer to an older version of the same question may help: Gnome 3.16 HiDPI scaling only accepts integers

1

Ubuntu 20.04 LTS will apparently enable fractional scaling by default in Settings > Devices > Screen Display.

According to one article*, it is possible to enable the same GUI setting in 19.04... I tried the same instructions in 18.04 LTS (running Gnome 3.28.2) and it seems to work just fine.

On Wayland, run:

gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"

On Xorg run:

gsettings set org.gnome.mutter experimental-features "['x11-randr-fractional-scaling']"

Once set, you can open Settings > Devices > Screen Display to access additional fractional scaling values, including 125% and 150%.

The article notes that some users may experience increased system load when enabling fractional scaling. I did not experience this; I run Ubuntu on a 15" Macbook pro from 2015.

*Article for reference: https://www.omgubuntu.co.uk/2019/06/enable-fractional-scaling-ubuntu-19-04

3
  • Thanks for the info! I look forward to switching in that case. However, I saw no extra options when trying the command for x11 on 18.04.3. It's probably also worth mentioning that the article says: "Some users report that the Xorg process load is higher when these options are turned on and in use."
    – Mitch
    Jun 24, 2020 at 7:43
  • Thanks @Mitch, I updated the answer.
    – Johan
    Jun 25, 2020 at 8:42
  • This should be the solution for multiple screen use case in 20.04 and after. The gnome-tweaks answer will apply the font change to all screens.
    – Jacob
    Jan 19, 2022 at 3:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .