Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
1  
Would be good to know your Ubuntu version. –  Octavian Damiean Apr 15 '11 at 8:56
add comment

4 Answers 4

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
add comment

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
add comment

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
add comment

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
add comment

Your Answer

 
discard

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