0

I'm running fedora on virtualbox (xmonad).

I have the following in /usr/share/X11/xorg.conf.d/10-monitor.conf

Section "Monitor"
    Identifier   "VBOX0"
    Modeline "1920x1080_60.00"  172.80  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync
    Option  "PreferredMode"  "1920x1080_60.00"
    Option "Primary" "true"
EndSection

Section "Monitor"
    Identifier   "VBOX1"
    Option  "PreferredMode"  "1440x1050"
    Option  "RightOf" "VBOX0"
EndSection

Section "Screen"
    Identifier      "screen"
    Monitor         "VBOX0"
    DefaultDepth    24
    SubSection "Display"
        Depth 24
        Virtual 3360 1080
    EndSubSection
EndSection

Upon startup, the resolution of the screens seems to be set correctly (at least my mouse cannot escape the actual screen, but this could be because the host OS is stopping it). However the positioning seems to be wrong, as shown from the running arandr

enter image description here

Is there some settings I'm missing? I tried the Position option as well but I get the same result.

For reference, I do have a working configuration for xrandr (see below. Last line is the important one I think) which sets up everything correctly.

#!/bin/bash
xrandr --newmode "1920x1080_60.00" 172.80  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync
xrandr --addmode VBOX0 1920x1080_60.00
xrandr --newmode "1440x1050_60.00"  126.27  1440 1536 1688 1936  1050 1051 1054 1087  -HSync +Vsync
xrandr --addmode VBOX1 1440x1050_60.00
xrandr --output VBOX0 --mode 1920x1080_60.00 --pos 0x0 --output VBOX1 --mode 1440x1050_60.00 --right-of VBOX0

What am I missing in 10-monitor.conf?

1 Answers1

0

Hi I am not sure if this will work,

Try to split up that last line

xrandr --output VBOX0 --mode 1920x1080_60.00 --pos 0x0 --output VBOX1 --mode 1440x1050_60.00 --right-of VBOX0

xrandr --output VBOX0 --mode 1920x1080_60.00 --pos 0x0
xarndr --output VBOX1 --mode 1440x1050_60.00 --right-of VBOX0

If that does not work you can always set the position for the second output. 1920+1=1921 to start the next monitors top corner

xarndr --output VBOX1 --mode 1440x1050_60.00 --right-of VBOX0 --pos 1921x0

If that does not work it might be that your virtual display accross both monitors is not set correctly. You need to create enough space for both. 1920+1440=3360

xrandr --newmode "1920x1080_60.00"

should be

xrandr --newmode "3360x1080_60.00"

On the version I use I can do this as follows

xrandr -v
xrandr program version       1.4.1
xrandr --size 1366x768 # for single monitor
xrandr --size 3286x1080  # for both

xrandr
Screen 0: minimum 8 x 8, current 3286 x 1080, maximum 32767 x 32767
LVDS1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
   1366x768       60.0*+
   1360x768       59.8     60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
DP1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 1920x1080+1366+0 (normal left inverted right x axis y axis) 510mm x 287mm
   1920x1080      60.0*+   50.0     59.9  
   1680x1050      59.9  
   1600x900       60.0  
   1280x1024      75.0     60.0  
   1440x900       59.9  
   1280x800       59.9  
   1152x864       75.0  
   1280x720       60.0     50.0     59.9  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   720x576        50.0  
   720x480        60.0     59.9  
   640x480        75.0     72.8     66.7     60.0     59.9  
   720x400        70.1  
VGA1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
nelaaro
  • 14,139
  • 30
  • 88
  • 115