Page 1 of 2
[SOLVED] How do I "sticky" nvidia-settings?
Posted: 14. Apr 2013, 16:26
by knome
I've built a new computer, installed Salix64 Xfce 14.0 and also installed a proprietary nvidia driver. Everything works fine apart from a problem getting any local nvidia-settings configuration to stick across sessions.
The nvidia-settings GUI writes nvidia-settings-rc to user's Home directory and applies any configuration to the display. In order to load the nvidia-settings-rc configuration without opening the GUI you should be able to run the command
nvidia-settings --load-config-only but this doesn't work - here is the output from running the command...
Code: Select all
anthony[~]$ nvidia-settings --load-config-only --verbose
ERROR: Cannot open display 'darkstar:0'.
ERROR: Unable to assign attribute RedGamma specified on line 47 of
configuration file '/home/anthony/.nvidia-settings-rc' (no Display
connection).
ERROR: Unable to assign attribute GreenGamma specified on line 48 of
configuration file '/home/anthony/.nvidia-settings-rc' (no Display
connection).
ERROR: Unable to assign attribute BlueGamma specified on line 49 of
configuration file '/home/anthony/.nvidia-settings-rc' (no Display
connection).
I'm baffled as to why the GUI appears to "open display 'darkstar:0'." but the command line doesn't. Any ideas?
Re: How do I "sticky" nvidia-settings?
Posted: 14. Apr 2013, 19:02
by laprjns
Read through the nvidia-setting man page. It suggest that you create a ~/.xinitrc or add to it the following:
Code: Select all
nvidia-settings --load-config-only & . /etc/X11/xinit/xinitrc
Re: How do I "sticky" nvidia-settings?
Posted: 15. Apr 2013, 09:02
by knome
laprjns wrote:Read through the nvidia-setting man page. It suggest that you create a ~/.xinitrc or add to it the following:
Code: Select all
nvidia-settings --load-config-only & . /etc/X11/xinit/xinitrc
That doesn't work. I have three relevant .xinitrc files (~/.xinitrc, /etc/X11/xinit/xinitrc and /etc/X11/xinit/xinitrc.xfce) and it doesn't work in any of them. I've also tried an xfce session autostart entry but that doesn't work either. A plain
nvidia-settings autostart entry does work but that means the GUI also opens at the session start.
I'm taking a wild guess here, but would it have anything to do with the way Xauthority is set up in Salix? I have no idea what to look for regarding Xauthority so any tips or information would be appreciated.
Re: How do I "sticky" nvidia-settings?
Posted: 15. Apr 2013, 21:15
by Tim CowChip
select
X Server Display Configuration |
Save to X Configuration File |
Browse to /etc/X11/xorg.conf.d/ | create a file "20-nvidia.conf" |
OK
Re: How do I "sticky" nvidia-settings?
Posted: 16. Apr 2013, 08:10
by knome
Tim CowChip wrote:
select
X Server Display Configuration |
Save to X Configuration File |
Browse to /etc/X11/xorg.conf.d/ | create a file "20-nvidia.conf" |
OK
Thanks, but the xorg.conf set up is fine. The problem is with the user
nvidia-settings-rc configuration which won't load when using the command
nvidia-settings --load-config-only either from a Terminal, a console, or one of the start-up scripts. What is strange is that if you just issue the command
nvidia-settings (or start the application from the menu) then nvidia's GUI starts and loads the configuration. The aim is to load the configuration without opening the GUI.
Re: How do I "sticky" nvidia-settings?
Posted: 16. Apr 2013, 10:10
by hakerdefo
Hello knome! It's a known bug! It happens because of the presence of X Display Name in '~/.nvidia-settings-rc'. In your case it is 'darkstar:0' as you can see from error output you got,
Code: Select all
ERROR: Cannot open display 'darkstar:0'.
To solve this problem first remove the current config file
Now run the nvidia-settings GUI and uncheck "Include X Display Names in the Config File" in the 'nvidia-settings Configuration' submenu. Reboot and check. I hope this solves your problem.
Cheers!!!
Re: How do I "sticky" nvidia-settings?
Posted: 16. Apr 2013, 10:34
by knome
@ hakerdefo

Thanks. That's one of the other things I've already tried but there is one section of the file that refuses to exclude the XDisplay Name...
Code: Select all
darkstar:0[dpy:0]/RedBrightness=0.000000
darkstar:0[dpy:0]/GreenBrightness=0.000000
darkstar:0[dpy:0]/BlueBrightness=0.000000
darkstar:0[dpy:0]/RedContrast=0.000000
darkstar:0[dpy:0]/GreenContrast=0.000000
darkstar:0[dpy:0]/BlueContrast=0.000000
darkstar:0[dpy:0]/RedGamma=1.000000
darkstar:0[dpy:0]/GreenGamma=1.000000
darkstar:0[dpy:0]/BlueGamma=1.000000
I've tried manually editing it but it gives a "bad handle" error and still refuses to work!
Gaaah! I think I'll give up on this and just use the settings available directly on the monitor. I knew I shouldn't have gone with an nvidia chipsetted m/board but it was such a bloody bargain! Bugger!

Re: How do I "sticky" nvidia-settings?
Posted: 16. Apr 2013, 11:53
by hakerdefo
As a last try just delete the following entries from ´nvidia-settings-rc´
Code: Select all
darkstar:0[dpy:0]/RedBrightness=0.000000
darkstar:0[dpy:0]/GreenBrightness=0.000000
darkstar:0[dpy:0]/BlueBrightness=0.000000
darkstar:0[dpy:0]/RedContrast=0.000000
darkstar:0[dpy:0]/GreenContrast=0.000000
darkstar:0[dpy:0]/BlueContrast=0.000000
darkstar:0[dpy:0]/RedGamma=1.000000
darkstar:0[dpy:0]/GreenGamma=1.000000
darkstar:0[dpy:0]/BlueGamma=1.000000
And see what happens? My guess is that you should be fine without them! Try it!
Re: How do I "sticky" nvidia-settings?
Posted: 16. Apr 2013, 14:19
by knome
@ hakerdefo...

This'll amuse you... those were the settings I wanted to tweak. I'm currently wearing polaroids to cut down the glare from white backgrounds

Re: [SOLVED] How do I "sticky" nvidia-settings?
Posted: 16. Apr 2013, 15:34
by knome
In the nvidia-settings-rc file change...
Code: Select all
darkstar:0[dpy:0]/RedBrightness=0.000000
darkstar:0[dpy:0]/GreenBrightness=0.000000
darkstar:0[dpy:0]/BlueBrightness=0.000000
darkstar:0[dpy:0]/RedContrast=0.000000
darkstar:0[dpy:0]/GreenContrast=0.000000
darkstar:0[dpy:0]/BlueContrast=0.000000
darkstar:0[dpy:0]/RedGamma=0.604000
darkstar:0[dpy:0]/GreenGamma=0.604000
darkstar:0[dpy:0]/BlueGamma=0.604000
to read...
Code: Select all
:0[dpy:0]/RedBrightness=0.000000
:0[dpy:0]/GreenBrightness=0.000000
:0[dpy:0]/BlueBrightness=0.000000
:0[dpy:0]/RedContrast=0.000000
:0[dpy:0]/GreenContrast=0.000000
:0[dpy:0]/BlueContrast=0.000000
:0[dpy:0]/RedGamma=0.604000
:0[dpy:0]/GreenGamma=0.604000
:0[dpy:0]/BlueGamma=0.604000
The relevant part is changing the format of the X display name.
It now works!! Hooray!