I have two 4k monitors one called DP-4, the other DP-2 (plus the Laptop's internal display). Using xrandr (or another command line tool) I would like to arrange them as in the following and also set the scaling to 200%:

screenshot showing monitors as I want them

This almost works with this command:

xrandr \
  --output "DP-4" --primary --pos "0x0"  \
  --output "DP-2" --pos "3840x0" \
  --output eDP-1-1 --off

The only thing not working is setting the scaling of both DP-4 and DP-2 to 200% with xrandr. How can I do this?

PS: I am on Ubuntu 19.10 with Gnome and X (not Wayland, because I use an NVIDIA card).


Solution 1:

Why you should use Wayland (with noveau) instead of x11 on Nvidia Graphics cards

I personally recommend to use wayland (with noveau) instead of x11 (with nvidia), because on wayland you do not have any quality-losses as with xranxr --scale, see https://gitlab.freedesktop.org/xorg/app/xrandr/-/issues/56 .

Why --scale of xrandr leads to a blurry results

If you are using "--scale 0.5" you send one frame-buffer-pixel to four real pixels, and it adds a bilinear filter making it blurry. If you are using "--scale 2" you render 4 frame-buffer-pixels for one physical pixel, leading to (1) an useless overload the graphics card and (2) because of the bilinear filtering it is blurry and worsens the result. With --filter nearest you can avoid the blurriness, however the result is much better, but still unacceptable for reading fonts or graphics design.

Further advantages of Wayland

Wayland (with nouveau) has many advantages such as (a) factural scaling 100%,125%,150%,175%,200% (b) screenwise scaling (c) a lossless-scaling, see https://unix.stackexchange.com/a/660345/241592 for details.

Solution 2:

You are just missing the --scale 2x2 argument. So use:

xrandr \
  --output DP-4 --primary --pos 0x0 --scale 2x2 \
  --output DP-2 --pos 3840x0 --scale 2x2 \
  --output eDP-1-1 --off

Note: Double quoting the monitor and position is unnecessary so I removed the ".

Solution 3:

Adding on @WinEunuuchs2Unix's answer, use --scale 0.5x0.5 command

Like this:

xrandr \
  --output "DP-4" --primary --pos "0x0" --scale 0.5x0.5 \
  --output "DP-2" --pos "3840x0" \
  --output eDP-1-1 --off