nvidia-settings lost after login

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
mamoel
Level 1
Level 1
Posts: 3
Joined: Tue May 28, 2019 12:47 pm

nvidia-settings lost after login

Post by mamoel »

I'm quite unexperienced in Linux and totally new in Linux Mint.
I have a fresh install of Linux Mint 19.1 Tessa (with Cinnamon as DE) with all available updates.

To get the correct refresh rates and layout for my multi monitor setting (display 1: LG32GK850G, display 2: Asus VN297QLB, both connected to a Geforce GTX1080), I installed the latest Nvidia drivers the following way:

Code: Select all

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
Then I installed nvidia-driver-430 using the driver manager and rebooted. Then I called:

Code: Select all

sudo nvidia-xconfig
to let the system generate a xorg.conf.

Then I opened the nvidia-settings with

Code: Select all

sudo nvidia-settings
and did the setup as wanted:

Code: Select all

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 430.14

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "LG Electronics 32GK850G"
    HorizSync       88.0 - 222.0
    VertRefresh     30.0 - 144.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GTX 1080"
EndSection

Section "Screen"

# Removed Option "metamodes" "DP-0: nvidia-auto-select +2560+180 {AllowGSYNC=Off}, DP-4: 2560x1440_144 +0+0"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-6"
    Option         "metamodes" "DP-4: 2560x1440_144 +0+0 {AllowGSYNC=Off}, DP-0: nvidia-auto-select +2560+180 {AllowGSYNC=Off}"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
and saved the file to xorg.conf overwriting the previous generated file.

Time for a reboot. The control for the logon is shown at the correct display (LG, left) and my monitor menu shows the correct refresh rate: 144Hz.
I enter my password an hit <enter>.
Now the refresh rate falls back to 60Hz and my primary display is the Asus to the left. :?

What am I doing wrong? Any suggestions?

Code: Select all

$ inxi -Fxz
System:    Host: mint-cinnamon Kernel: 4.15.0-50-generic x86_64 bits: 64 compiler: gcc v: 7.3.0 Desktop: Cinnamon 4.0.10 
           Distro: Linux Mint 19.1 Tessa base: Ubuntu 18.04 bionic 
Machine:   Type: Desktop Mobo: MSI model: X99A GAMING PRO CARBON (MS-7A20) v: 1.0 serial: <filter> UEFI: American Megatrends 
           v: 1.40 date: 06/15/2018 
CPU:       Topology: 6-Core model: Intel Core i7-6850K bits: 64 type: MT MCP arch: Broadwell rev: 1 L2 cache: 15.0 MiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 86407 
           Speed: 1200 MHz min/max: 1200/4000 MHz Core speeds (MHz): 1: 1201 2: 1201 3: 1200 4: 1200 5: 1455 6: 1200 7: 1203 
           8: 1200 9: 1200 10: 1200 11: 1368 12: 1200 
Graphics:  Device-1: NVIDIA GP104 [GeForce GTX 1080] driver: nvidia v: 430.14 bus ID: 02:00.0 
           Display: x11 server: X.Org 1.19.6 driver: nvidia resolution: 1920x1080~60Hz, 2560x1440~60Hz 
           OpenGL: renderer: GeForce GTX 1080/PCIe/SSE2 v: 4.6.0 NVIDIA 430.14 direct render: Yes 
Audio:     Device-1: Intel C610/X99 series HD Audio vendor: Micro-Star MSI driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
           Device-2: NVIDIA GP104 High Definition Audio driver: snd_hda_intel v: kernel bus ID: 02:00.1 
           Device-3: Creative type: USB driver: hid-generic,snd-usb-audio,usbhid bus ID: 3-13.1:10 
           Sound Server: ALSA v: k4.15.0-50-generic 
Network:   Device-1: Intel Ethernet I218-V vendor: Micro-Star MSI driver: e1000e v: 3.2.6-k port: f020 bus ID: 00:19.0 
           IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter> 
Drives:    Local Storage: total: 11.38 TiB used: 122.41 GiB (1.1%) 
           ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 960 PRO 512GB size: 476.94 GiB 
           ID-2: /dev/sda type: USB vendor: Samsung model: HD204UI size: 1.82 TiB 
           ID-3: /dev/sdb type: USB vendor: Samsung model: Portable SSD T3 size: 232.89 GiB 
           ID-4: /dev/sdc vendor: Crucial model: CT750MX300SSD1 size: 698.64 GiB temp: 25 C 
           ID-5: /dev/sdd vendor: Seagate model: ST6000DM004-2EH11C size: 5.46 TiB 
           ID-6: /dev/sde vendor: Toshiba model: DT01ACA300 size: 2.73 TiB temp: 31 C 
Partition: ID-1: / size: 227.72 GiB used: 9.76 GiB (4.3%) fs: ext4 dev: /dev/sdb2 
Sensors:   System Temperatures: cpu: 22.0 C mobo: N/A gpu: nvidia temp: 41 C 
           Fan Speeds (RPM): N/A gpu: nvidia fan: 8% 
Info:      Processes: 313 Uptime: 8m Memory: 31.31 GiB used: 1.22 GiB (3.9%) Init: systemd runlevel: 5 Compilers: gcc: 7.4.0 
           Shell: bash v: 4.4.19 inxi: 3.0.27 
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: nvidia-settings lost after login

Post by roblm »

The settings in the Display program will override some settings made in Nvidia Settings, even when saved to a file.

First make the changes to the monitors in Nvidia Settings. Then open the Display program and click the Apply button.
mamoel
Level 1
Level 1
Posts: 3
Joined: Tue May 28, 2019 12:47 pm

Re: nvidia-settings lost after login

Post by mamoel »

Thank you very much, this solves indeed the problems with the refresh rate and primary display setup.
But what about the other settings like brightness, contrast, gamma, ...?

I set them in nvidia xserver settings, then confirm, reopen the settings again and get the warning: 'Warning: The color settings have been changed outside of nvidia-settings so the current slider values may be incorrect'.

If I do the Display program trick, then the brightness is immediately reset to default after clicking Apply.
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: nvidia-settings lost after login

Post by roblm »

mamoel wrote: But what about the other settings like brightness, contrast, gamma, ...?
These can be changed in Nvidia Settings and are saved when you click the Confirm and Quit buttons, to the
.nvidia-settings-rc file, a hidden file in your Home directory. The setting for any attribute listed in that file, such as SyncToVBlank, can be changed and saved in Nvidia Settings. You don’t need to click Apply in the Display program.

mamoel wrote: I set them in nvidia xserver settings, then confirm, reopen the settings again and get the warning: 'Warning: The color settings have been changed outside of nvidia-settings so the current slider values may be incorrect'.
I don’t see that message after making changes to brightness, contrast or gamma. I tested that on 2 PCs and used the 430.14 driver on one. Do you have another program installed that can also do that? If the settings are correct, then I would ignore that message.
mamoel
Level 1
Level 1
Posts: 3
Joined: Tue May 28, 2019 12:47 pm

Re: nvidia-settings lost after login

Post by mamoel »

The problem is, as soon as I open the nvidia-settings UI, the brightness setting is reset and I don't know why.

But it doesn't matter anymore. As I said, I'm quite new to Linux and I've tried most of the major distros over the last couple days and I'm quite happy with Manjaro KDE at the moment.
User avatar
roblm
Level 15
Level 15
Posts: 5939
Joined: Sun Feb 24, 2013 2:41 pm

Re: nvidia-settings lost after login

Post by roblm »

mamoel wrote: The problem is, as soon as I open the nvidia-settings UI, the brightness setting is reset and I don't know why.
Are you experiencing the same with Manjora KDE?

The only way I was able to duplicate your problem one time was when the .nvidia-settings-rc file was open, then I opened Nvidia Settings and closed it. Then I saw a message about reloading the file because the settings had changed. When I did that, then the brightness was reset to default.

Here’s a workaround to test. Make the brightness change in Nvidia Settings. Open the File Manager, right click in the empty space and select Create New Document > Empty Document. Name it brightness. Open the document and add these lines:

Code: Select all

#!/bin/sh 
nvidia-settings --load-config-only
sleep 1
killall nvidia-settings
Save and close the document. Right click on it and select Properties > Permissions. Mark the checkbox next to Allow executing file as program.

Open System Settings > Startup Applications. Click the + sign and select Custom Command. Type a name, such as brightness. For the Command, use: sh /home/your-user-name/brightness

Change your-user-name to your actual user name.
JackLeEmmerdeur
Level 1
Level 1
Posts: 1
Joined: Tue Nov 30, 2021 12:07 pm

Re: nvidia-settings lost after login

Post by JackLeEmmerdeur »

Thanks a lot.
This is first guide that worked for me on KDE.
Now the color-profiles are restored at last on reboot.

I additionally had to activate the desktop-startup-script being started as a terminal-application.
Hope non-german users can decipher what to do according to my screenshot.

Image
Last edited by karlchen on Tue Nov 30, 2021 12:27 pm, edited 1 time in total.
Reason: Corrected incorrect [img] tag by correct [rimg] tag, which enables downsized image preview as well
Locked

Return to “Graphics Cards & Monitors”