Currently, any settings changed through the nvidia-settings control panel (like digital vibrance, Xv Sync to VBlank, anti-aliasing, etc.) are not restored on login. For that to happen, "nvidia-settings --load-config-only" needs to run. Gentoo does not currently install an X session script (/etc/X11/xinit/xinitrc.d/) for this. I am attaching an X session script for nvidia-settings, as well as a patch against nvidia-drivers-295.49.ebuild that installs it.
Created attachment 310869 [details] X session script for executing nvidia-settings
Created attachment 310871 [details, diff] Patch against nvidia-drivers-295.49.ebuild for installing the X session script
I'm not sure if this will result in a double run since GNOME and KDE both appear to do this on startup when using the nvidia-driver.
(In reply to comment #3) > I'm not sure if this will result in a double run since GNOME and KDE both > appear to do this on startup when using the nvidia-driver. I'm on KDE. It's not executed. I'm not sure how other distros do this. Might be worth looking how Ubuntu solves this issue.
OK, I took a look at nvidia-current_295.40-0ubuntu1_i386.deb. It installs "nvidia-autostart.desktop" to /etc/xdg/autostart with an exec line of: Exec=sh -c '/usr/bin/nvidia-settings --load-config-only' Should we do the same instead of using xinitrc? I'm not sure what the difference would be.
Ask the X11 maintainers. I'm not really sure.
xdg is freedesktop stuff. Unless it makes sense to launch nvidia-settings before login, nothing that X11 maintains is involved.
(In reply to comment #7) > xdg is freedesktop stuff. > Unless it makes sense to launch nvidia-settings before login, nothing that > X11 maintains is involved. It's per-user. "nvidia-settings -l" applies driver settings stored in ~/.nvidia-settings-rc. Putting a script in /etc/X11/xinit/xinitrc.d/ does exactly this though, at least here (using KDM); it runs it *after* login. Which seems to be the same result as when using XDG's autostart.
(In reply to comment #8) > (In reply to comment #7) > > xdg is freedesktop stuff. > > Unless it makes sense to launch nvidia-settings before login, nothing that > > X11 maintains is involved. > > It's per-user. "nvidia-settings -l" applies driver settings stored in > ~/.nvidia-settings-rc. > > Putting a script in /etc/X11/xinit/xinitrc.d/ does exactly this though, at > least here (using KDM); it runs it *after* login. Which seems to be the same > result as when using XDG's autostart. The only difference here would propably be that /etc/X11/xinit/xinitrc.d/ doesn't need the XDG support from the desktop, as in, /etc/xdg/autostart/ will only work for desktops supporting it, such as, GNOME, KDE, Xfce, LXDE and ROX. In my opinion, if people want to run minimalistic window managers without proper freedesktop.org support(s) they need to run these type of things own their own as they already are doing for a lot of other things. So I guess +1 from me for installing the file in /etc/xdg/autostart/
And the file /usr/bin/nvidia-settings is owned by media-video/nvidia-settings instead of x11-drivers/nvidia-drivers. Which one to run? Both can't be installing the .desktop file. $ qfile -v nvidia-settings media-video/nvidia-settings-295.40 (/usr/bin/nvidia-settings) x11-drivers/nvidia-drivers-295.49 (/opt/bin/nvidia-settings)
(In reply to comment #10) > And the file /usr/bin/nvidia-settings is owned by > media-video/nvidia-settings instead of x11-drivers/nvidia-drivers. Which one > to run? Both can't be installing the .desktop file. > > $ qfile -v nvidia-settings > media-video/nvidia-settings-295.40 (/usr/bin/nvidia-settings) > x11-drivers/nvidia-drivers-295.49 (/opt/bin/nvidia-settings) Actually, I lied, both just can't be installing the same named .desktop file, but both could install the .desktop file. This would only lead to a double load of the file. I guess this bug is pending on nvidia-drivers and nvidia-settings maintainers finally sorting out the mess in between the two packages.
(In reply to comment #11) > (In reply to comment #10) > > And the file /usr/bin/nvidia-settings is owned by > > media-video/nvidia-settings instead of x11-drivers/nvidia-drivers. Which one > > to run? Both can't be installing the .desktop file. > > > > $ qfile -v nvidia-settings > > media-video/nvidia-settings-295.40 (/usr/bin/nvidia-settings) > > x11-drivers/nvidia-drivers-295.49 (/opt/bin/nvidia-settings) > > Actually, I lied, both just can't be installing the same named .desktop > file, but both could install the .desktop file. This would only lead to a > double load of the file. > > I guess this bug is pending on nvidia-drivers and nvidia-settings > maintainers finally sorting out the mess in between the two packages. That is the solution. The officially supported version is installed in /opt/bin/nvidia-settings, while the Gentoo customized version is installed in /usr/bin/nvidia-settings.
I've added this exactly how Ubuntu does it to 304.22 and newer.
I noticed a big problem with this. The .desktop file is executed too late in the startup process (with KDE at least.) The new driver (302 and later) have GL VSync enabled by default. This results in much stuttering in KDE's animations (like minimizing/maximizing windows.) Disabling GL VSync in nvidia-settings and restarting KDE doesn't solve the stuttering problem. This is because KDE is fully up and running when XDG autostart files are started. Using /etc/X11/xinit/xinitrc.d/ solves it and the desktop is smooth once again. In the end, xinit is the only real solution; nvidia-settings needs to run before the window manager, or else the WM will initialize itself using the default driver settings rather than user settings.
PS: That means Ubuntu's way of doing it is buggy.
Well I'll let the Freedesktop guys decide how this should be done then.
I agree with using /etc/X11/xinit/xinitrc.d/ for this (I remember to manually add a similar script there long time ago to load some gamma settings for an old monitor that finally died)
Can we add that now? I think enough time passed and no one seems to have anything against it. At this point, it's not just a "stylistic" issue, it's a real bug. So the sooner this is changed, the better :-)
Fixed in 304.48.
Its not fixed, my settings are not restored on relogging.
(In reply to C.J. Wijtmans from comment #20) > Its not fixed, my settings are not restored on relogging. Don't comment on a 4 year old closed bug. Open a new one. Your issue might be entirely unrelated.