4

I set desktop scaling to 200%, reboot, and it resets back to 100%.
It's a VirtualBox VM with video type set to VMSVGA.
Any ideas how to fix this problem?
Config info as requested:

user@ubuntuvm:~$ xrandr
Screen 0: minimum 16 x 16, current 3840 x 1968, maximum 32767 x 32767
XWAYLAND0 connected primary 3840x1968+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   3840x1968     59.96*+
   2048x1536     59.95  
   1920x1440     59.97  
   1600x1200     59.87  
   1440x1080     59.99  
   1400x1050     59.98  
   1280x1024     59.89  
   1280x960      59.94  
   1152x864      59.96  
   1024x768      59.92  
   800x600       59.86  
   640x480       59.38  
   320x240       59.52  
   2560x1600     59.99  
   1920x1200     59.88  
   1680x1050     59.95  
   1440x900      59.89  
   1280x800      59.81  
   720x480       59.71  
   640x400       59.95  
   320x200       58.96  
   3200x1800     59.96  
   2880x1620     59.96  
   2560x1440     59.96  
   2048x1152     59.90  
   1920x1080     59.96  
   1600x900      59.95  
   1368x768      59.88  
   1280x720      59.86  
   1024x576      59.90  
   864x486       59.92  
   720x400       59.55  
   640x350       59.77  
user@ubuntuvm:~$ gsettings get org.gnome.desktop.interface scaling-factor
uint32 0
user@ubuntuvm:~$ gsettings get org.gnome.desktop.interface text-scaling-factor
1.0
user@ubuntuvm:~$ gsettings get org.gnome.settings-daemon.plugins.xsettings overrides
@a{sv} {}
  • Not normal behavior. Please add information about your system and your configuration. – vanadium Apr 22 '22 at 18:47
  • @vanadium pretty much all-default installation. The only thing that might be unusual is that it's a VirtualBox machine. I don't know what extra info is needed. – user626528 Apr 22 '22 at 19:46
  • 1
    Add that information to your question so everybody knows this is relating to a virtual machine. Again, it is not supposed to be so and for many people on real hardware, the setting is remembered. – vanadium Apr 23 '22 at 06:23

1 Answers1

3

This is an initial answer, waiting for your feedback. Please post in the OP the output of the following commands, both when you have 100% and 200% scaling:

$ xrandr
$ gsettings get org.gnome.desktop.interface scaling-factor
$ gsettings get org.gnome.desktop.interface text-scaling-factor
$ gsettings get org.gnome.settings-daemon.plugins.xsettings overrides

Until you do that, here is a suggestion. You could try a combination of actions to arrive at your final result, all applicable via command line/configuration, so they could/should be applied at every reboot, eventually by adding to a suitable login script.

  1. Set scaling via xrandr (--scale, and other adjustments if needed). Whatever xrandr command you use, that can be applied automatically during login. See ref, ref.

  2. Set a suitable Modeline via Xorg. For instance, I have in my /etc/X11/xorg.conf.d/10-monitor.conf

    Section "Monitor"
        Identifier "LVDS-1"
        Modeline "1344x744_60.00" 80.75  1344 1408 1544 1744  744 747 757 773 -hsync +vsync
        Option "PreferredMode" "1344x744_60.00"
    EndSection
    
  3. Use gsettings, like

    $ gsettings set org.gnome.desktop.interface scaling-factor 2
    $ gsettings set org.gnome.desktop.interface text-scaling-factor 1.2
    $ gsettings set org.gnome.settings-daemon.plugins.xsettings overrides "{'Gdk/WindowScalingFactor': <2>}"
    

    Note that you may need a trick like this.

  4. A combination thereof, like here.

Related

  1. How to increase display scaling above 200% in ubuntu 20.04?
  2. Monitor scaling does not work properly
  3. How to set the scaling of the display through command line?
  4. Change the display scaling on the fly
  5. https://forums.developer.nvidia.com/t/persisting-scaled-modeline-to-xorg-conf/50592
  6. https://superuser.com/questions/347437/xorg-how-to-specify-a-non-standard-display-resolution
  7. https://arachnoid.com/modelines/