21

I've installed Ubuntu (tried 17.10 and 18.04 pre-release), since I have a 4k monitor I went to Settings - Devices - Displays and set Scale to 200%.

Everything looks fine until I resize a VM's window (including opening it fullscreen): Ubuntu resets the scale to 100% and everything becomes small.

How can I avoid this and "lock" the scale at 200%?

I tried this with VirtualBox and VMWare Player with the same results. I know there is a "scale factor" in VirtualBox's settings but it is not the same and it makes pictures blurry.

Fabby
  • 34,341
  • 38
  • 97
  • 191
Pavel
  • 373
  • 1
  • 3
  • 10

2 Answers2

25

Fire up your terminal and type:

gsettings set org.gnome.desktop.interface scaling-factor 2

In virtualbox i tested it, and i can resize vm window without losing scaling. This applies to wayland, so 17.10 is best to test this.

Pasi Suominen
  • 974
  • 7
  • 11
  • I tried with xorg, working on there too. Tested with virtualbox running on ubuntu 17.10 – Pasi Suominen Apr 10 '18 at 16:16
  • Tested on Ubuntu 20.04 and worked. Just note after executing the command, **you need to resize the VM's window to see the effect**. – Emadpres Apr 28 '22 at 07:57
  • What about fractional scaling? `$ gsettings set org.gnome.desktop.interface scaling-factor 1.25 =>invalid character in number: 1.25` – Anton Duzenko Jan 06 '23 at 07:24
1

I'm using VMWare and Ubuntu 18.04 LTS; and later 20.04 LTS. I never got gsettings to work right. Maybe that's because I have Wayland turned off, as it is broken on my all my VMWare VMs.

Instead, I use this command: xrandr --output Virtual1 --scale 1.75x1.75, which seems to work well enough. It doesn't resize until after I log in. The command is persistent, so I haven't added it to any startup scripts or anything.

I don't have any problems with a blurry display, and I definitely have to use a factor greater than zero -- otherwise, the text and user interface elements are very large. It's counter-intuitive, but that's what's working for me! Maybe two different things are fighting to scale correctly?

MikeB
  • 198
  • 13
  • 2
    I found that for my 192dpi display that I needed to go the 'opposite' direction and set a scaling value of less than 1: `xrandr --output Virtual1 --scale 0.5x0.5`. – 0x574F4F54 Aug 07 '19 at 15:41
  • 1
    It does make things larger, but unfortunately it only seems to up-scale the framebuffer resulting in blurry icons and fonts, this setting does not enable high-dpi rendering. – Violet Giraffe Nov 09 '19 at 10:13