8

I run ubuntu on my macbook pro, with nvidia proprietary driver.

I've made a little hack script http://www.coldcode.net/2010/05/nvidia-auto-display.html which detects the presence/absence of an external monitor and switches the resolution accordingly.

Does anybody know of a better way to do that?

My script also works around specific issues of the nvidia partial xrandr implementation; assuming a xrandr compliant xorg driver, is there a way to do the same thing in a less hackish way?

1
  • Not that I know of. Your script might be the best way of going about that at the moment; searching around I don't really see anything. Sep 14, 2010 at 15:56

2 Answers 2

3

Have you heard of disper ( http://willem.engen.nl/projects/disper/ ) ?

Also has a PPA under http://launchpad.net/~disper-dev/+archive/ppa

1
  • thank you, I have been years looking for this. Works from the ppa. A minor inconvenient is that the -C/--cycle action (i.e. cycle between, primary, secondary, clones, extend) does work. Also it doesn't seem to be "automatic" (change upon connection of the new monitor), but much better that the crappy nvidia-settings.
    – alfC
    Nov 2, 2011 at 10:21
1

I've found that running gnome-display-properties (on 10.04 at least) will automatically detect and configure my resolution based on the monitors I have connected at the moment. Then I can simply dismiss it (using the 'Close' button, 'Apply' works also but requires confirmation which takes another click and is unnecessary). So I've added an icon to my topbar and so far that's been so much better than resetting X like I used to do that I've been to lazy to look for a one click solution or even an automatic one such as your script.

I have a large monitor at work but usually just use my laptop alone at home so its 2 clicks when I get to work in the morning and 2 when I get home.

Update:

Should have checked first. I'm actually NOT using the proprietary driver right now and I vaguely recall that's because having compiz effects was less important to me than not restarting X twice a day to switch monitors. So my answer may be completely useless to you. I'll delete if anyone can confirm that.

1
  • anyway it's nice to know that for normal drivers which fully implement xrandr we can enjoy this feature. Don't delete the answer, might be useful for other people
    – mkm
    Oct 12, 2010 at 21:39

You must log in to answer this question.

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