2

Problem

I'm transitioning the configuration of my multihead monitors from using some rather ugly scripts to /etc/X11/xorg.conf.d/10-monitor.conf. My layout has two monitors of 1920x1200, one rotated left. The scripts were able to configure this just fine using the following command:

xrandr \
    --output "DP-1" \
        --mode 1920x1200 \
        --pos 1200x360 \
        --rotate normal \
        --primary \
    --output "DP-2" \
        --mode 1920x1200 \
        --pos 0x0 \
        --rotate left

I've tried to translate this to configuration:

Section "Monitor"
    Identifier "DP-1"
    Option "Primary" "true"
    Option "Position" "1200 360"
EndSection

Section "Monitor"
    Identifier "DP-2"
    Option "Rotate" "left"
EndSection

This unfortunately has the side effect of setting the resolution of the rotated screen to 1600×1200, even though the preferred mode is still 1920×1200:

$ xrandr
[…]
DP-2 connected 1200x1600+0+0 left (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200     59.95 +
   1920x1080     60.00  
   1600x1200     60.00* 
[…]

How can I write configuration which will use the rotated monitor's preferred resolution of 1920x1200?

Non-solutions

  • Explicitly setting the screen size to fit both monitors:

    Section "Screen"
        Driver "radeon"
        SubSection "Display"
            Virtual 3120 1920
        EndSubSection
    EndSection
    
  • Explicitly setting the preferred mode for DP-2 (Option "PreferredMode" "1920x1200") caused the other screen to be reduced to 1600×1200, so that's probably a clue.

Workaround

Force the resolution by using xrandr --output DP-2 --mode 1920x1200.

  • 1
    If setting the mode via xrandr works, did you try setting the mode(line) of DP-2 in xorg.conf? Also, use /var/log/Xorg.0.log to debug what the X server actually does. – dirkt Nov 15 '18 at 7:15
1

What worked in the end was to explicitly set the virtual screen size and the preferred mode for both of the screens:

Section "Monitor"
    Identifier "DP-1"
    Option "Primary" "true"
    Option "Position" "1200 360"
    Option "PreferredMode" "1920x1200"
EndSection

Section "Monitor"
    Identifier "DP-2"
    Option "Rotate" "left"
    Option "PreferredMode" "1920x1200"
EndSection

Section "Screen"
    Driver "radeon"
    SubSection "Display"
        Virtual 3120 1920
    EndSubSection
EndSection

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.