Gentoo Archives: gentoo-user

From: YoYo siska <yoyo@××××××.sk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] changing nvidia settings dynamically
Date: Fri, 22 Jan 2010 12:12:03
Message-Id: 20100122121127.GA24902@ksp.sk
In Reply to: Re: [gentoo-user] changing nvidia settings dynamically by Iain Buchanan
1 On Fri, Jan 22, 2010 at 08:59:43AM +0930, Iain Buchanan wrote:
2 > On Sat, 2010-01-16 at 12:52 +0000, Neil Bothwick wrote:
3 > > On Fri, 15 Jan 2010 16:55:33 +0930, Iain Buchanan wrote:
4 > >
5 > > > Whenever I dock / undock I have to run nvidia-settings to change the
6 > > > resolution from the virtual 3840x1200 to 1920x1200 or vice versa. Also
7 > > > since two screens is the "Default" I have to do this when I log in with
8 > > > only the laptop.
9 > > >
10 > > > I am looking for a way to use the command line nvidia-settings (as much
11 > > > as I've studied the help I can't find out how to do it - all attributes
12 > > > seem read-only to the command line nvidia-settings)
13 > >
14 > > Can you do this with the --config and --load-settings options?
15 >
16 > OK, I finally got around to trying this, but no it doesn't work. When
17 > trying to switch from laptop-only to laptop and LCD I just get:
18 >
19 > ERROR: Invalid display device DFP-2 specified on line 40 of configuration file
20 > '.nvidia-settings-rc-twin' (the currently enabled display devices are
21 > DFP-0 on orpheus:0.0).
22 >
23 > ERROR: Invalid display device DFP-2 specified on line 42 of configuration file
24 > '.nvidia-settings-rc-twin' (the currently enabled display devices are
25 > DFP-0 on orpheus:0.0).
26 >
27 > And this is when using the config file I saved with two screens working.
28 > I have to run nvidia-settings by hand and select "detect displays"
29 > before DFP-2 appears.
30 >
31 > ideas? thanks,
32
33 from time to time I tried to use the commandline options of
34 nvidia-settings to change between two sets of outputs (main+tv and
35 main+second monitor) but it seems, that nvidia-settings just can't
36 enable/disable outputs from commandline ... it wasn't very important for
37 me, so I didn't ask on any more nvidia specific forums...
38
39 but your mail made me look at the sorces of nvidia-settings, and there's
40 a "samples" directory with some examples, and it seems that nv-control-dpy can do that...
41 you should be able to enable the correct outputs with --set-associated-dpys and then
42 load your configs as you tried... (I didn't try that, just checked in
43 the gui that the output changed to "off" insteadd of "disabled")
44
45 maybe it is even enough to run the --probe-dpys according to what you say about selecting
46 "detect displays" in the gui...
47
48 yoyo
49
50
51 btw, to get the program, just run (change the version/dirs...):
52
53 ebuild /usr/portage/media-video/nvidia-settings/nvidia-settings-190.53.ebuild unpack
54 cd /var/tmp/portage/media-video/nvidia-settings-190.53/work/nvidia-settings-1.0/samples/
55 make
56
57
58 yoyo@julka samples $ ./nv-control-dpy --probe-dpys
59
60 Using NV-CONTROL extension 1.18 on :0.0
61 Connected Display Devices:
62 CRT-1 (0x00000002): Philips 200WS
63 DFP-0 (0x00010000): Philips 200WS
64
65 Display Device Probed Information:
66
67 number of GPUs: 1
68 display devices on GPU-0 (GeForce 8600 GT):
69 CRT-1 (0x00000002): Philips 200WS
70 DFP-0 (0x00010000): Philips 200WS
71
72
73 yoyo@julka samples $ ./nv-control-dpy --get-associated-dpys
74
75 Using NV-CONTROL extension 1.18 on :0.0
76 Connected Display Devices:
77 CRT-1 (0x00000002): Philips 200WS
78 DFP-0 (0x00010000): Philips 200WS
79
80 associated display device mask: 0x00010000
81
82 yoyo@julka samples $ ./nv-control-dpy --set-associated-dpys 0x10002
83
84 Using NV-CONTROL extension 1.18 on :0.0
85 Connected Display Devices:
86 CRT-1 (0x00000002): Philips 200WS
87 DFP-0 (0x00010000): Philips 200WS
88
89 set the associated display device mask to 0x00010002
90
91 yoyo@julka samples $ ./nv-control-dpy --get-associated-dpys
92
93 Using NV-CONTROL extension 1.18 on :0.0
94 Connected Display Devices:
95 CRT-1 (0x00000002): Philips 200WS
96 DFP-0 (0x00010000): Philips 200WS
97
98 associated display device mask: 0x00010002
99
100 yoyo@julka samples $ ./nv-control-dpy --set-associated-dpys 0x10000
101
102 Using NV-CONTROL extension 1.18 on :0.0
103 Connected Display Devices:
104 CRT-1 (0x00000002): Philips 200WS
105 DFP-0 (0x00010000): Philips 200WS
106
107 set the associated display device mask to 0x00010000

Replies

Subject Author
Re: [gentoo-user] changing nvidia settings dynamically Iain Buchanan <iaindb@××××××××××××.au>