4

How can you configure Ubuntu 13.10 to rotate the display globally (for LDM and all users)?

I have an Intel graphics chipset with an x64 processor. lspci shows the following for my graphics chiset, and I do not have any propietary drivers installed:

00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (primary) (rev 03)

I am using the xorg configuration file below, which worked perfectly in Ubuntu 13.04, where LDM and each user session was rotated 90 degrees.

However, this same configuration file no longer works in Ubuntu 13.10. Per other posts, I've tried placing this file in /etc/X11, I tried placing this file in /usr/share/X11/, and I also tried moving it to /usr/share/X11/xorg.conf.d/ where I renamed it to 10-xorg.conf. (I did ensure that permissions were -rw-r--r--).

Section "Monitor"
    Identifier  "Samsung SyncMaster 171N"
    Modeline    "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
    Option      "Rotate" "left"
    # Option      "PreferredMode" "1280x1024_60.00"
    # HorizSync   30.0 - 81.0 # kHz
    # VertRefresh 60.0 - 60.0 # Hz
EndSection

Section "Device"
    Identifier  "Intel"
    Driver      "intel"
    Option      "AccelMethod" "sna"
EndSection

Section "Screen"
    Identifier "Default Screen"
    Monitor     "Samsung SyncMaster 171N"
    Device      "Intel"
    Defaultdepth 24
    SubSection  "Display"
        Modes   "1280x1024_60.00"
    EndSubSection
EndSection

Section "ServerLayout"
    Identifier  "Default Layout"
    Screen      "Default Screen"
EndSection
Jacob Vlijm
  • 83,767
Enterprise
  • 12,352

1 Answers1

5

This answer is the key. You simply copy the .config/monitors.xml from your account to /var/lib/ligthdm/.config/monitors.xml and lightdm will pick up that configuration.

  • 1
    This worked. I used the Displays dialog window from System Settings to rotate my display, creating the required .config/monitors.xml file. I then copied the file to /var/lib/lightdm/.config/. One drawback to this is, although the Light DM screen was now rotated, and my user account screen was rotated, all of the other user account screens were NOT rotated. I had to copy the .config/monitors.xml file to each existing user account. Honestly, I liked the old way, where you could change the xorg.conf file for the entire system, but this approach at least allows me to use the rotated display. – Enterprise Jan 12 '14 at 00:30
  • 1
    Agreed, I liked the old way better. – GaryBishop Jan 12 '14 at 10:52
  • I just wanted to add a note for anyone experiencing this issue on 14.04... The approach of copying ~/.config/monitors.xml to /var/lib/ligthdm/.config/ works for 13.10. However, in 14.04, creating /etc/X11/xorg.conf with the desired settings works jut fine. – Enterprise Jul 03 '14 at 01:42
  • Great! Thanks. Can you share your xorg.conf settings? Perhaps as another answer? I'll upvote it for sure. – GaryBishop Jul 03 '14 at 10:18
  • I just tried it on my 14.04 system and my simple minded approach didn't work. My screens are not rotated without my monitors.xml in place. I used the nvidia configuration tool and saved the result to /etc/X11/xorg.conf. Moved my monitors.xml aside and got no rotation on login. – GaryBishop Jul 03 '14 at 13:06
  • Gary, unfortunately, I have to retract my comment above. The xorg.conf did work with a fresh install of 14.04, but after some updates, it no longer seems to work. (I had used the same xorg.conf file I posted above, in my original question). Interestingly, your monitors.xml approach is now working again in 14.04. – Enterprise Jul 04 '14 at 01:44
  • But to make things more complicated, 14.04 does not recgonize my monitor's native resolution, whereas 13.10 did. To fix this, I am able to use the xorg.conf, placed in the /etc/X11/ folder, but with the option "Rotate" "left" commented out. 13.10 simply did not recognize xorg.conf, but 14.04 seems to recognize at least some parameters in this file. – Enterprise Jul 04 '14 at 01:45
  • Even more puzzling, I noticed some peculiar behavior using "Rotate" "left" in xorg.conf in 14.04 with no monitors.xml file: When I first boot up, I do see the LightDM screen rotated for about one second, and then it quickly rotates back to normal position. When I log in, the screen remains rotated in normal position. – Enterprise Jul 04 '14 at 01:45
  • On a 14.04 machine with dual left-rotated DVI screen connected to a nvidia card I did both the xorg.conf (via nvidia-settings) and the copy-monitors.xml-trick worked for me. Obviously I have no idea what I'm doing but just for the record... Surely this year will be the year of Linux desktop... ¯_(ツ)_/¯ – Lester Cheung Nov 09 '15 at 00:18