On Fri, Jan 22, 2010 at 08:59:43AM +0930, Iain Buchanan wrote: > On Sat, 2010-01-16 at 12:52 +0000, Neil Bothwick wrote: > > On Fri, 15 Jan 2010 16:55:33 +0930, Iain Buchanan wrote: > > > > > Whenever I dock / undock I have to run nvidia-settings to change the > > > resolution from the virtual 3840x1200 to 1920x1200 or vice versa. Also > > > since two screens is the "Default" I have to do this when I log in with > > > only the laptop. > > > > > > I am looking for a way to use the command line nvidia-settings (as much > > > as I've studied the help I can't find out how to do it - all attributes > > > seem read-only to the command line nvidia-settings) > > > > Can you do this with the --config and --load-settings options? > > OK, I finally got around to trying this, but no it doesn't work. When > trying to switch from laptop-only to laptop and LCD I just get: > > ERROR: Invalid display device DFP-2 specified on line 40 of configuration file > '.nvidia-settings-rc-twin' (the currently enabled display devices are > DFP-0 on orpheus:0.0). > > ERROR: Invalid display device DFP-2 specified on line 42 of configuration file > '.nvidia-settings-rc-twin' (the currently enabled display devices are > DFP-0 on orpheus:0.0). > > And this is when using the config file I saved with two screens working. > I have to run nvidia-settings by hand and select "detect displays" > before DFP-2 appears. > > ideas? thanks,
from time to time I tried to use the commandline options of nvidia-settings to change between two sets of outputs (main+tv and main+second monitor) but it seems, that nvidia-settings just can't enable/disable outputs from commandline ... it wasn't very important for me, so I didn't ask on any more nvidia specific forums... but your mail made me look at the sorces of nvidia-settings, and there's a "samples" directory with some examples, and it seems that nv-control-dpy can do that... you should be able to enable the correct outputs with --set-associated-dpys and then load your configs as you tried... (I didn't try that, just checked in the gui that the output changed to "off" insteadd of "disabled") maybe it is even enough to run the --probe-dpys according to what you say about selecting "detect displays" in the gui... yoyo btw, to get the program, just run (change the version/dirs...): ebuild /usr/portage/media-video/nvidia-settings/nvidia-settings-190.53.ebuild unpack cd /var/tmp/portage/media-video/nvidia-settings-190.53/work/nvidia-settings-1.0/samples/ make y...@julka samples $ ./nv-control-dpy --probe-dpys Using NV-CONTROL extension 1.18 on :0.0 Connected Display Devices: CRT-1 (0x00000002): Philips 200WS DFP-0 (0x00010000): Philips 200WS Display Device Probed Information: number of GPUs: 1 display devices on GPU-0 (GeForce 8600 GT): CRT-1 (0x00000002): Philips 200WS DFP-0 (0x00010000): Philips 200WS y...@julka samples $ ./nv-control-dpy --get-associated-dpys Using NV-CONTROL extension 1.18 on :0.0 Connected Display Devices: CRT-1 (0x00000002): Philips 200WS DFP-0 (0x00010000): Philips 200WS associated display device mask: 0x00010000 y...@julka samples $ ./nv-control-dpy --set-associated-dpys 0x10002 Using NV-CONTROL extension 1.18 on :0.0 Connected Display Devices: CRT-1 (0x00000002): Philips 200WS DFP-0 (0x00010000): Philips 200WS set the associated display device mask to 0x00010002 y...@julka samples $ ./nv-control-dpy --get-associated-dpys Using NV-CONTROL extension 1.18 on :0.0 Connected Display Devices: CRT-1 (0x00000002): Philips 200WS DFP-0 (0x00010000): Philips 200WS associated display device mask: 0x00010002 y...@julka samples $ ./nv-control-dpy --set-associated-dpys 0x10000 Using NV-CONTROL extension 1.18 on :0.0 Connected Display Devices: CRT-1 (0x00000002): Philips 200WS DFP-0 (0x00010000): Philips 200WS set the associated display device mask to 0x00010000