Ubuntu – How do you change the preferred resolution with xrandr

displaydisplay-resolutionhdmimultiple-monitorsxrandr

I am cloning my 1920×1080 monitor display to a TV (1366×768) using a splitter device. It works fine except rebooting moves all my icons up on the desktop, forcing them into a space of the lower resolution. With the TV HDMI unplugged, the icons stay in the desired locations, and xrandr shows the chosen (marked with the asterisk *) and preferred (marked with the plus +) resolution of 1920×1080.

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
HDMI-A-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 598mm x 336mm
   1920x1080     60.00*+  50.00    59.94  
   1680x1050     59.88  
<snipped>

But with the TV plugged in, xrandr shows

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
HDMI-A-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 853mm x 480mm
   1366x768      59.81 +
   1920x1080     60.00*   50.00    59.94  
   1280x720      60.00    50.00    59.94  
   1024x768      60.00  
   800x600       60.32  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       60.00    59.94  
   720x400       70.08 

Is there a way to set the preferred '+' down to the 1920×1080 line?

Best Answer

  • To change the preferred mode you would need to add

    Option "PreferredMode" "1920x1080_60.00"
    

    under section "Monitor" in an entry in /etc/X11/xorg.conf.d (e.g., /etc/X11/xorg.conf.d/10-monitor.conf is suggested). See also here. I am not sure adding this to (and creating if needed) /etc/X11/xorg.conf instead also works for a "static" setup.

    Related:

    1. https://unix.stackexchange.com/questions/94734/how-to-modify-the-default-setting-adopted-by-xrandr-when-connecting-an-external
    2. How to change the preferred mode on xrandr?
    3. https://linux.die.net/man/1/cvt
    4. https://linux.die.net/man/1/gtf
    5. https://linux.die.net/man/1/xrandr
  • Related Question