Introduction
Are you using Ubuntu in combination with a HiDPI 4K display? Then you are definitely familiar with your windows and text being too small after logging in into your Gnome session; a typical result of wrong scaling settings indeed.
This guide will demonstrate how to permanently set your Ubuntu scaling factor to 200%.
The Commands
To start off, open up a new file in which the user-desired scaling factor is defined:
sudo nano /usr/share/glib-2.0/schemas/90_hidpi.gschema.override
Set the scaling factor to the value of 2 (meaning 200%):
[org.gnome.desktop.interface]
scaling-factor=2
Now save your configuration file and exit from your editor.
Apply the changes with the following command:
sudo glib-compile-schemas /usr/share/glib-2.0/schemas
That’s it. Now reboot your computer and enjoy your applied 200% scaling factor.
6 comments
Hello, thank you for the heads-up.
I’ve looked into the issue but couldn’t reproduce it, unfortunately. I’ve tested everything again with
glib-compile-schemas
version2.72.4
under Ubuntu 22.04. However, the described methodology in this article worked out without returning any errors.I was able to locate the error message in
glib
‘s source code, but couldn’t trace it back to any potential issue you could be having.Perhaps you are running a different desktop environment or version of
glib-compile-schemas
?glib-compile-schemas complains there are no schema files. And, given glib-compile-schemas says “Schema files are required to have the extension .gschema.xml”, I’m not surprised.
Presumably as a result of this, I do not see any change.
Hello Eero,
Thanks for the post, this worked well.
Br. Kanwar
Thank you! I was finally able to get this working!
Hey Raz, thank you for your heads-up!
It’s indeed more appropriate to define a custom user defined config file, instead of messing around in Gnomes native
/usr/share/glib-2.0/schemas/org.gnome.desktop.interface.gschema.xml
config file. I’ve since updated this guide to cover for that “best-practice”; Not least because this is also the way I’m scaling Gnome these days.Unfortunately, scaling with decimal point numbers is not supported by
gschema
. But a solution is in the works since I’m also working with virtual machines and need proper fractional scaling for them. Thanks for your input and stay tuned!Hi, really good post!
I was finally able to change default scaling on my virtual machine.
Eero, some people mention to make a “local” copy instead and leave defaults untouched. What’s your recommendation?
The other thing is that I tried a value of 1.5 instead of 2 and gdm refused to start. I was able to SSH though and fix it.
I recommend that you make sure that you can connect via SSH in case you have a typo. You can also do CTRL-ALT-F2 to get a text-based login prompt.