Set fractional display scaling on Ubuntu 18.10 (XORG)

I am using an LG 5K monitor, and the display scaling options are very limited in gnome-shell, only increments of 100%.

To have fractional scaling, I tried this script:


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 $1x$1

I added that in a script inside /usr/bin/ and make it executable:

sudo chmod +x /usr/bin/

Now, whenever I am at work and need to scale it, I just run: 1.4

Just perfect!

Update: This change has introduced some screen tearing for me on Intel graphics. The solution was to add the following:

Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "TearFree" "true"

To /etc/X11/xorg.conf.d/20-intel.conf

For some reason, this changed my display from DP-1 to DP1, so I modified my script replacing the former with the latter.



About SoCRaT

Systems Engineer, OSS & Linux Geek
This entry was posted in Ubuntu and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s