config dual monitors with quite different resolution

7,909

if you're using Gnome on Ubuntu, you can use xrandr command to make screens different from one another. For example:

xrandr --output HDMI1 --scale 2x2 --mode 1920x1200 --fb 3840x2160 --pos 0x0
xrandr --output DVI-0 --scale 1x1 --pos 320x2160

--scale 2x2 - make everything on 4K screen twice larger

--mode XxY - explicitly set the resolution for the screen (not necessary if is already set)

--fb XxY - set the size of a virtual screen (framebuffer) (this iss very important. Without this, you will be able to use only a fourth of your screen). That maximum framebuffer size might be specified in xorg.conf - then you cannot exceed it (it is written in the first line of xrandr -q output).

--pos XxY - in my case I set the absolute positioning of the screens, so my laptop screen is directly on the bottom of the external screen.

sources: Arch Wiki Page and This post

Share:
7,909

Related videos on Youtube

YasinLi
Author by

YasinLi

Updated on September 18, 2022

Comments

  • YasinLi
    YasinLi over 1 year

    I have two monitors at work. One is a Dell 27 inch with 4K resolution and the other one is a Dell 20 inch at 1680 x 1050.

    However, due to the resolution difference between these two monitors, the system interface look so small on the 4K monitor. I tried the unity tweak tool to scale the font and system interface to make the 4K monitor looks great however, it simultaneously enlarges the font and interface of the small monitor and makes it hard to use.

    Is there a way to adjust the font and interface scaling independently for these two monitors? I'd also need one to be rotated by 270°

    I am using Nvidia GTX 980 as the display card.

    • AliReza Mosajjal
      AliReza Mosajjal almost 9 years
      what version of Ubuntu are you using? Are you using Gnome or Unity (the default desktop) ?
    • YasinLi
      YasinLi over 8 years
      I am using Ubuntu 14.04 and using Gnome
  • YasinLi
    YasinLi almost 9 years
    Thanks for your answer. I am using Gnome currently. However, since I use the Xinerama to use one rotated screen and one non-rotated screen simultaneously, it may disable the xrandr. When I type xrandr in the commend line, it shows like this: RandR extension missing
  • AliReza Mosajjal
    AliReza Mosajjal almost 9 years
    you can just rotate one screen with xrandr too. take a look at here. as for your extension missing error, you can use this command to fix it (let's say the error was created for display :22) Xvfb :22 -screen 0 1680x1050x24 -extension RANDR &
  • AliReza Mosajjal
    AliReza Mosajjal almost 9 years
    when you run xrandr and shows you the virtual display created by Xinerama, you can pretty much do whatever you want. you can even create two virtual displays with Xinerama and use xrandr to cast them into your displays.
  • AliReza Mosajjal
    AliReza Mosajjal almost 9 years
    take a look at this post
  • YasinLi
    YasinLi over 8 years
    Hello. After using xrandr setting everything fine, why everything go back to normal after I unlocking my screen? How to get xrandr effective after unlocking the screen ? Thanks
  • AliReza Mosajjal
    AliReza Mosajjal over 8 years
    @YasinLi Hi! It's apparently a bug now but there are workarounds for it.You can take a look at here to see how re-run your xrandr after screen lock/suspension.
  • YasinLi
    YasinLi over 8 years
    Thanks a lot. I will try to write a script and put it into the sleep.d folder. One other question is still about xrandr. When I try to use --scale 2x2, it makes everything smaller and if I use 0.5x0.5 it will make everything bigger but the screen resolution is also half of native resolution. Is this normally or do I made any mistakes when using xrandr ? Thanks for you quick reply
  • AliReza Mosajjal
    AliReza Mosajjal over 8 years
    How did you configure your --mode ? you can tinker with that as well. Maybe you can configure it for the bigger resolution, then scale it down by 2 by using --scale 2x2 ?!
  • YasinLi
    YasinLi over 8 years
    --mode 3840x2160
  • Karl Morrison
    Karl Morrison about 5 years
    xrandr: unrecognized option 'output'