.nvidia-settings-rc isn't run on wake or reboot

Hi,

Am on a new installation of the Cinnamon edition and the latest proprietary nvidia drivers.
I’ve followed Configure NVIDIA (non-free) settings and load them on Startup - Manjaro in order to persist changes in nvidia-settings (although there’s line about it/ some part of it not working with Cinnamon. Please tell me if that’s why I’m having this issue).

The /etc/X11/xorg.conf.d/90-mhwd.conf part, with the resolution and whether G-sync and refresh rate persists across reboots and wakeups.

The things in ~/.nvidia-settings-rc however do not. (in my case changes to brightness and gamma I changed under GPU-0 DP-0 in nvidia-settings)

I added

nvidia-settings --load-config-only
exec $(get_session)

to ~/.xinitrc as the wiki suggests however it doesn’t appear to ever run. I tried adding a line to that file for writing something to a file in ~/ and that doesn’t happen either. If I run nvidia-settings --load-config-only or just nvidia-settings, manually, the gamma and brightess changes immediately.

I tried running nvidia-settings as sudo however then the .nvidia-settings-rc wishes to be saved in /home/root of course and I’m logging in as me when starting the machine. But if I set a different gamma as sudo that change is applied as well when I run nvidia-settings as sudi next time. It doesn’t run automatically after a reboot or wake either.

Is there a way to persist the nvidia-settings Config of .nvidia-settings-rc?
Can I verify that .xinitrc actually executes on login?

-rw-r--r--  1 eld  eld     1963  5 dec 16.51 .nvidia-settings-rc
-rwxr-xr-x  1 eld  eld     1618  5 dec 16.19 .xinitrc

Thanks for any replies.

My machine has 1 gpu and 1 display, no built in graphics and no secondary monitor.

Config:

inxi -Fzzzx
System:    Kernel: 5.9.11-3-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 Desktop: Cinnamon 4.8.0 Distro: Manjaro Linux 
Machine:   Type: Desktop Mobo: Gigabyte model: B550I AORUS PRO AX v: x.x serial: <filter> UEFI: American Megatrends v: F10 
           date: 09/18/2020 
CPU:       Info: 6-Core model: AMD Ryzen 5 3600 bits: 64 type: MT MCP arch: Zen 2 L2 cache: 3072 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 86279 
           Speed: 3591 MHz min/max: 2200/3600 MHz boost: enabled Core speeds (MHz): 1: 3592 2: 2073 3: 2195 4: 2196 5: 2071 
           6: 2194 7: 2193 8: 2190 9: 3599 10: 2071 11: 2071 12: 2195 
Graphics:  Device-1: NVIDIA TU106 [GeForce RTX 2060 Rev. A] vendor: ASUSTeK driver: nvidia v: 455.45.01 bus ID: 07:00.0 
           Display: x11 server: X.Org 1.20.10 driver: nvidia resolution: 2560x1440 
           OpenGL: renderer: GeForce RTX 2060/PCIe/SSE2 v: 4.6.0 NVIDIA 455.45.01 direct render: Yes 
Audio:     Device-1: NVIDIA TU106 High Definition Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel bus ID: 07:00.1 
           Device-2: Advanced Micro Devices [AMD] Starship/Matisse HD Audio vendor: Gigabyte driver: snd_hda_intel v: kernel 
           bus ID: 09:00.4 
           Sound Server: ALSA v: k5.9.11-3-MANJARO 
Network:   Device-1: Realtek RTL8125 2.5GbE vendor: Gigabyte driver: r8169 v: kernel port: f000 bus ID: 05:00.0 
           IF: eno1 state: up speed: 100 Mbps duplex: full mac: <filter> 
           Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel port: f000 bus ID: 06:00.0 
           IF: wlp6s0 state: down mac: <filter> 
Drives:    Local Storage: total: 1.36 TiB used: 211.93 GiB (15.2%) 
           ID-1: /dev/sda vendor: Samsung model: SSD 850 EVO 500GB size: 465.76 GiB 
           ID-2: /dev/sdb vendor: Western Digital model: WD5000AACS-00G8B0 size: 465.76 GiB 
           ID-3: /dev/sdc vendor: Samsung model: SSD 850 EVO 500GB size: 465.76 GiB 
Partition: ID-1: / size: 440.22 GiB used: 211.89 GiB (48.1%) fs: ext4 dev: /dev/sda2 
Swap:      ID-1: swap-1 type: partition size: 17.21 GiB used: 0 KiB (0.0%) dev: /dev/sda3 
Sensors:   System Temperatures: cpu: 43.1 C mobo: N/A gpu: nvidia temp: 49 C 
           Fan Speeds (RPM): N/A gpu: nvidia fan: 0% 
Info:      Processes: 313 Uptime: 24m Memory: 15.64 GiB used: 2.02 GiB (12.9%) Init: systemd Compilers: gcc: 10.2.0 
           Packages: 1256 Shell: Bash v: 5.0.18 inxi: 3.1.08

Well, then you should have seen:

Warning: The method provided does not currently work for the Cinnamon Edition. As soon as a solution is found, then this article will be updated.

Well, then you should have seen:

Indeed, as noted at the start of my post. To me it’s not entirely clear if nothing of the below works on Cinnamon or parts and if parts what parts , hence why I asked for clarification : )

If that warning means precisely this - that parts of the nvidia settings will not stick if following this guide, is there another way or is it currently not known how to make all the nvidia-settings stick with Cinnamon?

Edit. I added the

nvidia-settings --load-config-only

command to the list of autostarting applications/commands in Cinnamon and it accomplishes what I was seeking. Maybe that would be useful for that wiki page? Not sure as I’m as mentioned not sure what the warning is about, precisely.

depending on where you add it - e.g. as you mention .xinitrc - you will need to append an ampersand (&) to the command otherwise the script stops - but you may already know that.

Hi Linux-aarhus

I added it as a separate command rather than to any other script or app in the Autostart list.

I did not know things in .xinitrc needed an ampersand (there’s no ampersand in the mentioned wiki page where .xinitrc is edited)