90

I have a Dell monitor set to a scale of 200%:

enter image description here

I then set the laptop built-in display to 100%:

enter image description here

However, if I then switch back to the Dell monitor settings, the scale there has reverted to 100%.

Is there a way to have 200% scale on the Dell monitor and 100% scale on the laptop monitor?

Thanks!

dharmatech
  • 2,553

5 Answers5

39

On Gnome 3.32 (default for Ubuntu 19.04) is possible to set up fractional scaling even for X. The command is:

gsettings set org.gnome.mutter experimental-features "['x11-randr-fractional-scaling']"

After that you can go to Display Settings and sets different scaling ratio for each monitor you have, even in 25% increments.

If, for any reason, you need to reset fractional scaling, the command is:

gsettings reset org.gnome.mutter experimental-features
  • 4
    This works. On my machine, however, it degrades performance a ton. I have significant lag when resizing windows, scrolling, etc (I have Intel Integrated Graphics) – Aurélien Gasser Dec 16 '19 at 22:15
  • This works perfectly for me, however I am using an external graphics card. – Dan Apr 06 '20 at 23:13
  • 2
    This worked perfectly for me, not sure why it's not possible by default. However, (and I haven't rebooted yet to see if it fixes), my cursor now flickers on my 4K screen. Also worth noting that this seems to to generate significant heat on my graphics card, and issue that didn't occur for me on the same machine on Windows. (Dell XPS) – Caboose Jul 28 '20 at 13:10
  • 1
    I also get the same flickering (also on a dell XPS). Restarting didn't fix it. – T. Kiley Aug 24 '20 at 14:43
  • 4
    Note that the features is available directly from the Displays menu. It is named "Fractional Scaling". I stopped using it because the performance was terrible using a 200% for one and 100% for two others. The cursor was flickering a lot on the 4K display, not a good user experience. – AxelH Feb 21 '21 at 09:22
  • 1
    (Mouse pointer also disappears at times. But overall much better than 4K/2K or 4K/1.5K etc.) – nsandersen Feb 24 '22 at 17:18
20

There is an easy workaround.
Instead of changing the scale: change the resolution of the monitor.
With a lower resolution on a 4K screen, you should be able to match the additional monitor.

Hope this helps.

zx485
  • 2,426
bc473
  • 273
  • 1
    I can see the different resolutions but can't change to it on ubuntu 18.10 :( – roundcrisis Nov 26 '18 at 11:54
  • 1
    It's strange, sometimes the "apply" button disappears... And most resolutions don't match the screen ratio, which means I don't have the options I need to get a good scaling. – Christian Feb 11 '19 at 09:36
  • Have you seen this news : https://www.omgubuntu.co.uk/2019/03/best-gnome-3-32-features ?
    GNOME 3.32 -> Fractional Scaling in GNOME Shell So we may have it in 19.xx
    – Christ-OFF Mar 15 '19 at 06:13
  • 43
    This is a terrible work-around. If you do this, you won't get any of the benefits of the 4K display (that you presumably paid quite a lot for). Everything will simply be magnified x2 instead of showing the finer detail that the display is capable of. The whole point of a 4K display is to be able to display finer detail, with sharper, clearer images. You should always run an LCD at its native resolution. – hackel Dec 22 '19 at 21:44
  • Previously my fancy 4K display on my work laptop was unusably tiny, so I think this is quite a good workaround – CharlieB Sep 27 '22 at 07:46
17

Lower the resolution of monitor could solve the problem, but that's not a good solution because it sacrifice the 4k resolution.

Assume you are using x-window and ubuntu 18.04. A better but more sophisticated approach is: keep resolution of monitor to 4k, raise your laptop monitor resolution double and scale up all windows 200%. Detail step as follows:

  1. Go to setting > displays > set scale to 200%
  2. Connect to dell monitor, type xrandr to check for id of two monitors. Here I assume you have monitor 'HDMI-0' of 3840x2160, monitor 'HDMI-1' of 1600x900. Now I want to place 'HDMI-1' to left, 'HDMI-0' to right.
  3. Run the following

xrandr --dpi 276 --fb 7040x2160 --output HDMI-0 --mode 3840x2160 --pos 3200x0 --output HDMI-1 --scale 2x2 --panning 3200x1800+0+0

(Note: 7040 = 3840+1600x2, 3200=1600x2, 1800=900x2)

  • This one is the correct answer for me though requires a bit calculation of screen sizes. But the display is flickering do you have any suggestions? – Dipendra Gurung Aug 18 '19 at 02:55
  • 5
    Could you go more into detail about what the values of the parameters dpi, fb, pos, mode and panning are doing exactly and how to calculate them? I have difficulties when I try to get my Dell XPS 13 (4k monitor with 3200x1800( and an external monitor placed physically above with 1920x1080. the scale for my dell monitor should be 200%, the one for the external should be 100% and it should virtually also be placed "upside" the dell monitor. I am not anyhow getting working settings (however somehow misplaced at least). Thanks! – ElectRocnic Nov 05 '19 at 13:03
  • This should be the chosen answer. – James Hirschorn Nov 08 '20 at 13:01
  • In case of Dell laptop (like it was for ElectRocnic), what helped me is xrandr --fb 8960x2880 --output DP-1-4 --scale 2x2 --mode 2560x1440 --pos 3840x0 --output eDP-1-1 --mode 3840x2400 --pos 0x0 (I have external monitor DP-1-4 with 2560x1440 with scale 100% and laptop monitor eDP-1-1 3840x2400 with scale 200% after running this xrandr command). – dmytroy Oct 28 '22 at 14:32
12

If you have NVIDIA cards, you can use NVIDIA X Server Settings. I tried @travis-wayland 's solution with different settings but always messed up the screens. Here is my settings for both displays (works on Ubuntu 18.04 and Ubuntu 20.04):

Left Screen and Right Screen

Notice that ViewPortIn and Panning must match while ViewPortOut is set to the maximum screen resolution (1680x1050). Also notice that I'm using my screen vertical, so XxY is flipped in ViewPortIn and Panning.

If you don't see NVIDIA X Server Settings among your applications, you may need to install/update your drivers. Btw, my computer uses NVIDIA drivers, not the built in X.Org (Nouveau driver). So make sure you are using NVIDIA driver in Software & Updates under Additional Drivers menu.

bkakilli
  • 355
  • 1
    thank you so much – gmm Mar 26 '20 at 17:15
  • Thanks, fantastic. That works fine. – r.bitter Dec 11 '20 at 14:05
  • Have a setup with Dell UP2715k 5k display combined with 2520x1440 secondary display. Was struggling for years with getting both displays running with the right scaling under Ubuntu, your solution finally worked for me. Thanks so much! – r.bitter Dec 28 '20 at 22:14
  • I'm curious, where did you find the information on how to setup NVIDID X Server Settings for different DPIs with a multi screen setup? – r.bitter Dec 28 '20 at 22:24
  • Hey, I'm glad it worked for you. It's been a while so I don't really remember where, but it was probably just trial and error. – bkakilli Dec 29 '20 at 04:02
  • This is a great answer. – developer_hatch May 03 '22 at 18:19
  • @bkakilli so basically what you did, you set in ViewPortOut native resolution decreased by factor of two? – Hayate Mar 14 '23 at 09:13
  • @Hayate no, the native resolution of the monitor was 1680x1050 as indicated in my post. You need to decide ViewPortIn, which can be anything (i.e., not necessarily factor of two). Also Panning should match ViewPortIn as far as I remember (wow it's been 4 years :) ). – bkakilli Mar 15 '23 at 16:03
  • hey, sorry if it seems like reviving dead thread but...i want to say that this is working, but it is not persisted (as in it'll back to as it were after next boot up/session)...and whenever i clicked save to x configuration file, always failed error cannot write the file bla2 on /etc/X11/xorg.conf ... any help? – Johnsons Jan 20 '24 at 15:34
10

You can have two different scales using Wayland
Wayland was the default in 17.04. X11 is the default in 18.04
To switch to wayland :
1. logout
2. On the login screen click on the little cog
3. and choose "Ubuntu on wayland"

  • 2
    What if I don't have a "Ubuntu on wayland" option? How do I install or enable it? – DiDebru May 30 '18 at 13:29
  • You are on 18.04 LTS ? Fresh install ? Upgrade from 16.xx ? – Christ-OFF May 31 '18 at 07:42
  • Upgrade from 16.04 . – DiDebru Jun 01 '18 at 21:31
  • 2
    I was able to select "Ubuntu on wayland" and configure the scaling. Very few applications like the terminal & Ubuntu Software scale correctly. However, the majority of my applications such as my web browser and IDE do not scale, and remain at the scaling of the main monitor. How do I go about resolving this? – Tsume Jul 05 '18 at 14:05
  • 1
    @Tsume Did you ever fix it? – caffeineFiend Nov 07 '18 at 12:13
  • 3
    @ljden Yes, I did fix it. I think I used this fractional scaling to do it https://www.maketecheasier.com/enable-fractional-scaling-gnome/ – Tsume Nov 09 '18 at 13:39
  • VSCode crashes in Wayland, so this solution is a no-go for me. – Guillochon Jan 14 '19 at 15:28
  • Using Wayland and the latest VSCode (and previously older versions) No problem for me ... any log ? – Christ-OFF Jan 15 '19 at 14:17
  • 2
    Next - dual monitor setup with different DPI's? – Melroy van den Berg Mar 14 '19 at 23:14
  • Wayland had multiple issues for me. Icons not showing, and whatnot. Further more, since I'm restricted to either 100% or 200% scaling, I found it a better solution to just change that screen's resolution – dǝɥɔS ʇoıןןƎ May 08 '19 at 07:33
  • In 18.04 when chosing Wayland, there is no per monitor setting, it gets applied to all. – Vincent Gerris Jan 16 '20 at 09:12
  • Wayland in 20.04 allows separate scaling in display settings, but so far only the system apps are scaled appropriately (ie files, system monitor, terminal). Chrome, Firefox, Libreoffice all follow the scaling of the primary monitor. – gorav Dec 01 '21 at 21:43
  • Found an answer re wayland on another post : "Unfortunately not all applications are Wayland native yet. Applications not yet ported will not resize on different monitors." – gorav Dec 01 '21 at 21:45