[SOLVED] How do I "sticky" nvidia-settings?

You have a problem with Salix? Post here and we'll do what we can to help.
User avatar
knome
Donor
Posts: 163
Joined: 20. Dec 2012, 19:36
Location: UK

[SOLVED] How do I "sticky" nvidia-settings?

Post 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?
Last edited by knome on 16. Apr 2013, 15:26, edited 1 time in total.
Image
User avatar
laprjns
Salix Warrior
Posts: 1113
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: How do I "sticky" nvidia-settings?

Post 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
“The past was erased, the erasure was forgotten, the lie became the truth.”
― George Orwell, 1984
User avatar
knome
Donor
Posts: 163
Joined: 20. Dec 2012, 19:36
Location: UK

Re: How do I "sticky" nvidia-settings?

Post 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.
Image
User avatar
Tim CowChip
Posts: 304
Joined: 27. May 2011, 03:35
Location: Cascade Locks, OR

Re: How do I "sticky" nvidia-settings?

Post by Tim CowChip »

Code: Select all

sudo nvidia-settings
select X Server Display Configuration | Save to X Configuration File | Browse to /etc/X11/xorg.conf.d/ | create a file "20-nvidia.conf" | OK
ImageImage
User avatar
knome
Donor
Posts: 163
Joined: 20. Dec 2012, 19:36
Location: UK

Re: How do I "sticky" nvidia-settings?

Post by knome »

Tim CowChip wrote:

Code: Select all

sudo nvidia-settings
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.
Image
User avatar
hakerdefo
Posts: 91
Joined: 9. Dec 2012, 08:12
Contact:

Re: How do I "sticky" nvidia-settings?

Post 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

Code: Select all

sudo rm ~/.nvidia-settings-rc
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!!!
User avatar
knome
Donor
Posts: 163
Joined: 20. Dec 2012, 19:36
Location: UK

Re: How do I "sticky" nvidia-settings?

Post by knome »

@ hakerdefo

:D 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!

:D
Image
User avatar
hakerdefo
Posts: 91
Joined: 9. Dec 2012, 08:12
Contact:

Re: How do I "sticky" nvidia-settings?

Post 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!
User avatar
knome
Donor
Posts: 163
Joined: 20. Dec 2012, 19:36
Location: UK

Re: How do I "sticky" nvidia-settings?

Post by knome »

@ hakerdefo...

:D 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 ;)
Image
User avatar
knome
Donor
Posts: 163
Joined: 20. Dec 2012, 19:36
Location: UK

Re: [SOLVED] How do I "sticky" nvidia-settings?

Post 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!
Image
Post Reply