8

For a while now, I have run a two monitor setup on my desktop. I originally set up an /etc/X11/xorg.conf file to define these monitors. Recently my 17in monitor failed (running alongside a 24in one) and as the replacement was 27in, I wanted to make the new 27in one the main screen and move the other to secondary screen. I created a new /etc/X11/xorg.conf file as shown below.

Section "Device"
    Identifier "H67 Integrated Graphics"
    Driver "intel"
    Option "Monitor-HDMI2" "Iiyama 27in"
    Option "Monitor-HDMI1" "Iiyama 24in"
EndSection

Section "Monitor"
    Identifier "Iiyama 27in"
    Option "DPMS"
    Option "Primary"
    Option "Position" "0 0"
    Option "PreferredMode" "1920x1080"
EndSection

Section "Monitor"
    Identifier "Iiyama 24in"
    Option "DPMS"
    Option "PreferredMode" "1920x1080"
    Option "Position" "1920 0"
EndSection

Section "Screen"
    Identifier "Default Screen"
    Device "H67 Integrated Graphics"
    Monitor "Iiyama 27in"
    DefaultDepth 24
    Subsection "Display"
           Depth 24
           Modes "1920x1080" "1024x768" "640x480"
    EndSubSection          
EndSection

The problem is gdm starts up with the login screen on the secondary monitor. Also when I then go into monitor layout in gnome itself it labels the secondary monitor as 1 and the primary as 2 (although it does call monitor 2 the primary and monitor 1 the secondary).

I have seen suggestions that I should use the monitor.xml file from my home directory (under .config), and I took this and altered it so the correct monitor was defined as primary thus:-

<monitors version="1">
  <configuration>
    <clone>no</clone>
    <output name="HDMI1">
      <vendor>IVM</vendor>
      <product>PLE2472HD</product>
      <serial>1108511312415</serial>
      <width>1920</width>
      <height>1080</height>
      <rate>60</rate>
      <x>1920</x>
      <y>0</y>
      <rotation>normal</rotation>
      <reflect_x>no</reflect_x>
      <reflect_y>no</reflect_y>
      <primary>no</primary>
      <presentation>no</presentation>
      <underscanning>no</underscanning>
    </output>
    <output name="HDMI2">
      <vendor>IVM</vendor>
      <product>PLX2783H</product>
      <serial>1128153703037</serial>
      <width>1920</width>
      <height>1080</height>
      <rate>60</rate>
      <x>0</x>
      <y>0</y>
      <rotation>normal</rotation>
      <reflect_x>no</reflect_x>
      <reflect_y>no</reflect_y>
      <primary>yes</primary>
      <presentation>no</presentation>
      <underscanning>no</underscanning>
    </output>
  </configuration>
</monitors> 

I tried taking this and putting it in a few places such as /var/lib/gdm3/.config and /etc/gdm3/, but nothing I did has changed (including the numbers on the screen in the gnome settings/display panel)

So how can change this so that gdm displays itself on my primary screen - and also (ideally, but not essentially) can I change the monitor numbering so that the primary is 1 and the secondary is 2.

2
  • This really isn't about "Wayland knowing" but rather GDM knowing. With Gnome 3 using Wayland, you'd have to dig into how Gnome uses config files. Or, did you try getting what you wanted out of the Settings -> Display options? You can select which display is primary by dragging the black bar to the primary display.
    – ybakos
    Commented Mar 27, 2016 at 17:24
  • 1
    The comments above shows that I dug into the config files. Gnome 3, when running on the desktop works fine - because of what you said, but that's not the issue. The issue is that gdm3 comes up with the login greeter on the wrong monitor and I can't make it come up on the correct one.
    – akc42
    Commented Mar 30, 2016 at 8:21

1 Answer 1

0

Well some years later, as people are still occasionally concerned by this issue, I attempt to summarise an answer.

For this I draw on ask.fedoraproject.org and wiki.archlinux.org.

The safe side is first to delete your own user's monitor.xml file ("If you use GDM under Wayland, you must also use a monitors.xml that was created under Wayland", archlinux tells us). Then generate a new one with your preferred display configuration tool (I use gnome settings).

Subsequently for me it worked to basically follow

# cp ~/.config/monitors.xml /var/lib/gdm/.config/
# chown gdm:gdm /var/lib/gdm/.config/monitors.xml

I make sure that each monitor entry includes a line with either <primary>yes</primary> or <primary>false</primary>.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .