Skip to main content

How to force hiDPI scaling mode on boot in Pop!_OS/Gnome [Resolved]

I asked a similar question about hiDPI scaling here. This question regards a universal hiDPI mode, the other question is about fixing scaling on a specific application.

I am using a 4k monitor in Pop!_OS 19.04 running Gnome.

The OS automatically detects this and changes into hiDPI mode, but only after I log in after boot.

This means the log in screen when I boot is far too small. Additionally, when I log in, the screen flickers and I get a notification Displays Set to HiDPI mode every time. The problem does not arise when suspending the computer.

The command to change to hidpi mode manually is

gsettings set com.system76.hidpi enable true

but this does not seem to permanently change to hidpi mode. Running this command in Startup Applications does not work either.

Is there a way to permanently change to hiDPI mode so the OS doesn't have to change it every time I boot? Or change the default setting to hiDPI somehow?

Question Credit: Hans J
Question Reference
Asked July 20, 2019
Posted Under: Unix Linux
2 Answers

Since your are using gdm, this should work for you system-wide:

1) Open the configuration file:

sudo nano /usr/share/glib-2.0/schemas/org.gnome.desktop.interface.gschema.xml

2) Change the default value to the scaling factor you want (e.g. 2):

<key name="scaling-factor" type="u">

3) Apply the changes:

sudo glib-compile-schemas /usr/share/glib-2.0/schemas

It works with gdm using x11, not sure about Wayland.

credit: Paradox
Answered July 20, 2019

You could add to set per boot some other way (I'm not entirely sure how 'Startup Applications' works). There are a couple ways to do this:

  1. You could do it with cron. To edit your crontab run crontab -e and it will open up the crontab file with your preferred editor (or it might prompt you to choose an editor). Then adding an entry at the bottom would allow you to run a command at boot. For example, to run an echo command that runs every time I reboot my machine I'd add @reboot echo "Hello" > ~/hello.txt (Please note that if you wish this to be ran as root you'll have to run crontab -e as root).
  2. You could add it to a /etc/rc.local file. This might not exist on your system, but it'd normally be the last thing to run before your login manager. To add something you could run sudo nano /etc/rc.local and paste in something like this:
gsettings set com.system76.hidpi enable true
exit 0

Hope this helps, I sadly don't have a way to test either of these methods and don't know a way of setting to hiDPI permanently (without setting it per boot).


credit: Maniyar
Answered July 20, 2019
Your Answer