4

I have two monitors, one is DELL P2411H 24” and the other is BenQ FP91G+ 19". All the times when I restart the PC I have to reconfigure the absolute position. How can I fix that?

4 Answers 4

8

I fixed this by editing the monitors.xml file in your .config folder. You can see a more detailed description with example here...Ubuntu 11.10 dual monitor set up instructions

But briefly you can try this:

  1. Open up a terminal (ctrl+alt+t)
  2. Go to your config folder (cd ~/.config)
  3. Open up your file for editing (gedit monitors.xml)
  4. Your 2 monitors will be listed here, find the monitor on the left, it will have the values of <x>0<x> and <y>0<y>.
  5. These values are measured in pixels, position the other monitor in relation to this using the x and y values. The current values you see here will be values that represent the incorrect set up when you log in - you can use them as a reference point.

This will hopefully fix it for you too.

2
  • thank you for making me discover the existence of file ~/.config/monitors.xml It helped me to solve my problem askubuntu.com/questions/80763/…
    – Boris
    Nov 20, 2011 at 14:18
  • this was a huge headache for me until I read this solution.
    – deanresin
    May 17, 2016 at 21:45
4

I have a solution that works in my case:

  1. I configure with ATI driver application
    amd
    amd settings
  2. boot
  3. and configure it again but with Screen display default application and of course click on button to keep the new setting
    aff
    aff setting

It is only after doing it twice, with AMD app. and default app. that my settings stay.

Note that I add the pictures of icon because I m not sure of the name of the application in english, most of the time a good picture is better than a good explication.

AND you better check the content of your ~/.config/monitors.xml file after that to avoid to get several configurations saved in this file.

1
  • I have nvidia and my case,but I edited the monitors.xml, and now it's working ;)
    – Mokus
    Nov 21, 2011 at 12:23
2

See instructions for how to configure lightdm to run a script before the login screen appears and/or desktop session starts here and here.

One improvement that you could do over the previously mentioned instructions is to change the script so that the xrandr command is executed only when your external monitor is connected (in case you have an external monitor attached to a laptop). Mine looks something like this:

#!/bin/sh

xrandr -q | grep "HDMI1 connected" && xrandr --output LVDS1 --auto --pos 1920x0 --output HDMI1 --auto --pos 0x0 --primary

The command after the && is executed only if the HDMI cable is plugged in.

0

xrandr does the trick perfeclty !

sudo apt-get install xrandr

xrandr

How to change monitor position/navigation?

You must log in to answer this question.

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