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.

Ubuntu 10.04 with Nvidia restricted drivers running Nvidia 9600 GT with dual DVI monitors (22" and 23"). In the default metamode (1), both monitors are active. I've added a second metamode via nvidia-settings (version 1.0) in which only the 23" monitor is enabled. I can switch between metamodes using the nvidia-settings GUI. Is there a way to do this from the command line? I've read about Disper on this site but have not tried it as I hoped this functionality was available via nvidia-settings? I can find nothing helpful in the man page though.

Edit: After switching between the two metamodes in nvidia-settings GUI, I noticed a line in the GUI reading "Switched to MetaMode AxB.", where A and B specified the new resolution. So switching metamodes is simply a resolution change? I've read elsewhere that what I want to do can be achieved with xrandr. Would this be correct, because it seems all I need to do is change the resolution? In metamode 1, the resolution is 3600x1080; in metamode 2 it's 1920x1080.

share|improve this question

1 Answer 1

You almost gave the answer yourself. xrandr -s N switches to metamode N, so you can use xrandr -s 0 and xrandr -s 1 to turn the second monitor on and off. Works fine on my pc.

EDIT: Found one problem: I have both panels at the bottom. After swiching the Metamode, they share the same height (only one is visible, switches randomly when mousing over). I have to set one to top and back to bottom for the other to be displayed above it.

EDIT: Found solution: Use gconftool-2 --dump /apps/panel to get the current settings, move the panel, get the changed settings and find what changed with diff. Using that information I created two files, one for pannel at the top, one at the bottom. Now I can script change of the Metamode and moving the panel.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.