Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i have a macbook pro which is often connected to a monitor, twin view on gnome works pretty well, but a problem arises when i disconnect the monitor, any window that resided on that workspace is no longer available.

another issue is when i start my computer when a monitor is not present, because xorg.conf file has the monitor configuration in it, my mouse pointer often disappears in the other monitor's virtual space, as if it is currently plugged,

osx deals with this issue elegantly by refreshing the display every time a plug in/out occurs,

is there anything similar that can be done in linux ?

> xrandr --auto
xrandr: Failed to get size of gamma for output default

> xrandr
xrandr: Failed to get size of gamma for output default
Screen 0: minimum 3200 x 1080, current 3200 x 1080, maximum 3200 x 1080
default connected 3200x1080+0+0 0mm x 0mm
   3200x1080      50.0* 

my first monitor is a macbookpro 5.5 13 inch display, and the second is a 24 inch display working at 1980x1024 (1080p) resolution

share|improve this question
Would be good to know your Ubuntu version. – Octavian Damiean Apr 15 '11 at 8:56

This usually works out of the box on Ubuntu, but there could be a problem with this specific hardware. In this case executing xrandr --auto from the terminal should disable the disconnected monitor.

share|improve this answer
The problem is that with twinview nvidia doesn't actually report as 2 seperate screens. And if you do have seperate screens (read Xinerama) then randr isn't supported. – jcm May 11 '11 at 0:01

Try this answer. In short, get disper from its PPA and consider using auto-disper as explained in that answer. Quoting the instructions from there:

  • First, when the external monitor is undocked, run auto-disper --save undocked
  • Then, when the external monitor is docked and configured as you want (with Nvidia X Server Settings), run auto-disper --save docked
  • Try auto-disper --change with docked and undocked monitor. It should detect the state and change the configuration.
  • Finaly make a keyboard shortcut with auto-disper --change

Thanks, Vinços and belacqua!

share|improve this answer

On ubuntu 10.10

  • Open gconf-editor
  • Navigate to apps -> gnome_settings_daemon -> Plugins -> xrandr (/apps/gnome_settings_daemon/plugins/xrandr)
  • Untick active
share|improve this answer

You could try to disable xrandr by doing the following:

open dconf-editor

navigate to /org/gnome/settings-daemon/plugins/xrandr

untick active

Good luck to you!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.