Setting monitor scaling to 200% with xrandr

8,855

Solution 1

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 2

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 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
Share:
8,855
nachtigall
Author by

nachtigall

Updated on September 18, 2022

Comments

  • nachtigall
    nachtigall over 1 year

    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).

  • nachtigall
    nachtigall over 4 years
    Does this work for you? My desktop goes crazy when I enter this command. Everything is very small and I have to restart/kill X, see these two screenshots: imgur.com/a/MejnKwP Not sure this is just a nvidia driver issue because when entering via Ubuntu's display settings manually it works fine (Problem is just that these settings are always forgotten once entered)
  • WinEunuuchs2Unix
    WinEunuuchs2Unix over 4 years
    @nachtigall It works for others but personally I use scaling of 1.38 setup in tweak tool. As far as persistence of xrandr settings see: How to run xrandr commands at startup in Ubuntu
  • nachtigall
    nachtigall over 4 years
    yeah, running xrandr at startup is my goal if it would only be working. Thanks for the link.
  • nachtigall
    nachtigall over 4 years
    "I use scaling of 1.38 setup in tweak tool" – do you mean font scaling? This seems different from whole desktop/monitor scaling. My font scaling in the Tweaks tools is still 1,00 besides my Display settings being 200% (set manually).
  • WinEunuuchs2Unix
    WinEunuuchs2Unix over 4 years
    Yes font, scaling set to 1.38. I leave my monitor set at 3840x2160 so 4K video can be displayed and 4K wallpaper, etc. I've also made my cursor, icons and title bars larger. In Chrome and Firefox I have web pages zoomed at 110%. Then a separate app gradually adjusts brightness and gamma individually for three monitors at dawn and dusk over 1 to 2 hour period. It's perfect for me but others might not be so picky...
  • nachtigall
    nachtigall about 4 years
    Using 2x2 seems the correct answer, but either Gnome or NVIDIA drivers are buggy. So it still does not work for me.
  • JoKalliauer
    JoKalliauer almost 3 years
    --scale 0.5 is a similar result as setting Settings>Display>Scale to 200%, however using something different than --scale 1 always leads to blurry results, so use the Settings-dialog, this does not blur the result
  • JoKalliauer
    JoKalliauer almost 3 years
    If I use --scale 0.5 the result gets very blurry, how can I force that in upscaling 1pixel get rendered by 2x2 Pixel without any smoothing. So a black-white image should still not contain any gray.
  • JoKalliauer
    JoKalliauer almost 3 years
    --scale 0.5 --filter nearest Source: reddit.com/r/GPDPocket/comments/90bras/…
  • nachtigall
    nachtigall over 2 years
    Thanks, I did not know. I'd love to switch to Wayland but as far as I know performance of noveau is much poorer than the closed nvidia version. And the closed nvidia version does not (yet) support wayland. Or has this changed?
  • JoKalliauer
    JoKalliauer about 2 years
    @nachtigall Yes, Nvidia performs better than Noveau (iff no scaling), however Nvidia is also buggier than Noveau. If you do not need any scaling I would use X11 (with Nvidia) because X11 is more stable/compatible to most applications. However if you need scaling you have to switch to Wayland (with noveau), otherwise you will have drastic performance and quality-losses. (1) If you want scaling use Wayland (2) If you want stability use X11 with Noveau (3) If you don't need scaling and prefer performance over stability use Nvidia