You are not logged in.

#1 2022-02-07 22:37:07

difri84
Member
Registered: 2021-12-09
Posts: 78

how to make nvidia-settings changes persistent?

Hi guys! Im on Arch since few months and i have to say it's amazing. Best wiki ever and amazing community!
I just installed Arch on my Desktop after happily using it on my laptop and i encounter a problem that i dont know how to deal with:

- if i set mirror monitors on gnome settings, my first monitor flickers a lot
- if i set mirror monitors on nvidia-settings everything is perfect. The problem is i cannot save this and make it persistent.

i made the xorg.conf file with the nvidia settings tool and copied to the following path (one try every reboot, not all at same time):

/etc/X11
/usr/share/X11
/usr/share/X11/xorg.conf.d/

in every attempt, after reboot i was in single monitor mode.

some (i think) relevant info:

- i have a gtx 960, nothing cutting edge.
- the second monitor is an HDMI TV.
- extend monitor works flawlessy.

- i tried to move from nvidia-lts to nvidia-470xx-dkms. This solves the problem but gnome doesn't run very fluid.
- in single monitor mode, in gnome settings i have 2 voices "60hz". if i pick the second one the monitor flickers. So i'm able to replicate the problem and it's about frequency (don't know why two 60hz voices gives different results).

what can i try to do?
if you need any output of any command just ask me and i will copy it.

Thank you everyone!!!!

Last edited by difri84 (2022-02-08 19:16:43)

Offline

#2 2022-02-08 19:16:02

difri84
Member
Registered: 2021-12-09
Posts: 78

Re: how to make nvidia-settings changes persistent?

I've spent a lot of time wrapping my head around this. I detailed followed the nvidia wiki and the nvidia trubleshooting wiki and i dont seem able to make the nvidia-settings changes persistent.

- i saved the 20-nvidia.conf instead of xorg.conf as the wiki suggested
- i tried to put this file in every single location the wiki mention

and the result is always the same: nvidia-settings starts in a fresh state setting sad

please help!

(this started as hardware problem, i don't know if this is the appropriate section anymore)

Last edited by difri84 (2022-02-08 19:19:28)

Offline

#3 2022-02-08 19:40:16

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,104

Re: how to make nvidia-settings changes persistent?

Which exact file are you copying around where exactly? Post the content, general approach to this is to find the nvidia-settings CLI invocation and just running that in a relevant autostart script or so. The problem with static xorg.confs is that whatever they set might get overriden by the desktop environment again.

Offline

#4 2022-02-08 20:25:53

difri84
Member
Registered: 2021-12-09
Posts: 78

Re: how to make nvidia-settings changes persistent?

xorg.conf produced by nvidia-settings after making the change that i want persistent

tried in these positions and names:

/etc/X11/xorg.conf
/etc/X11/xorg.conf.d/20-nvidia.conf
/usr/share/X11/xorg.conf
/usr/share/X11/xorg.conf.d/20-nvidia.conf

i tried the *X11/xorg.conf.d/20-nvidia.conf because the wiki says it's a better way compared to */X11/xorg.conf
anyway i tried all the combination above


# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 510.47.03

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

Section "Files"
EndSection

Section "Module"
    Load           "dbe"
    Load           "extmod"
    Load           "type1"
    Load           "freetype"
    Load           "glx"
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"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Samsung SMBX2231"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 75.0
    Option         "DPMS"
EndSection

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

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "DVI-I-1: 1920x1080 +0+0 {ForceCompositionPipeline=On}, HDMI-0: 1920x1080 +0+0 {ForceCompositionPipeline=On}; DVI-I-1: nvidia-auto-select +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 1920x1080_60_0 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 1920x1080_50 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 1920x1080_60i +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 1920x1080_60i_0 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 1920x1080_50i +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 1680x1050 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 1600x1200 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 1440x900 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 1440x900_60 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 1280x1024 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 1280x1024_60 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 1280x960 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 1280x800 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 1280x720 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 1280x720_60_0 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 1280x720_50 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 1152x864 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 1024x768 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 1024x768_70 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 1024x768_60 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 800x600 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 800x600_72 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 800x600_60 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 800x600_56 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 720x576 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 720x480 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 640x480 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 640x480_72 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: 640x480_60 +0+0, HDMI-0: nvidia-auto-select +0+0; DVI-I-1: nvidia-auto-select +0+0 {viewportin=1366x768, viewportout=1920x1079+0+0}, HDMI-0: nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

.nvidia-settings-rc produced by nvidia settings (folder home)

#
# /home/dario/.nvidia-settings-rc
#
# Configuration file for nvidia-settings - the NVIDIA Settings utility
# Generated on Tue Feb  8 21:21:10 2022
#

# ConfigProperties:

RcFileLocale = C
DisplayStatusBar = Yes
SliderTextEntries = Yes
IncludeDisplayNameInConfigFile = No
ShowQuitDialog = Yes
UpdateRulesOnProfileNameChange = Yes
Timer = Memory_Used_(GPU_0),Yes,3000
Timer = Thermal_Monitor_(GPU_0),Yes,1000
Timer = PowerMizer_Monitor_(GPU_0),Yes,1000

# Attributes:

0/SyncToVBlank=1
0/LogAniso=0
0/FSAA=0
0/TextureClamping=1
0/FXAA=0
0/AllowFlipping=1
0/FSAAAppControlled=1
0/LogAnisoAppControlled=1
0/OpenGLImageSettings=1
0/FSAAAppEnhanced=0
0/ShowGraphicsVisualIndicator=0
0/XVideoSyncToDisplayID=DVI-I-1
[DPY:DVI-I-0]/Dithering=0
[DPY:DVI-I-0]/DitheringMode=0
[DPY:DVI-I-0]/DitheringDepth=0
[DPY:DVI-I-0]/SynchronousPaletteUpdates=0
[DPY:DVI-I-1]/RedBrightness=0.000000
[DPY:DVI-I-1]/GreenBrightness=0.000000
[DPY:DVI-I-1]/BlueBrightness=0.000000
[DPY:DVI-I-1]/RedContrast=0.000000
[DPY:DVI-I-1]/GreenContrast=0.000000
[DPY:DVI-I-1]/BlueContrast=0.000000
[DPY:DVI-I-1]/RedGamma=1.000000
[DPY:DVI-I-1]/GreenGamma=1.000000
[DPY:DVI-I-1]/BlueGamma=1.000000
[DPY:DVI-I-1]/Dithering=0
[DPY:DVI-I-1]/DitheringMode=0
[DPY:DVI-I-1]/DitheringDepth=0
[DPY:DVI-I-1]/DigitalVibrance=0
[DPY:DVI-I-1]/ColorSpace=0
[DPY:DVI-I-1]/ColorRange=0
[DPY:DVI-I-1]/SynchronousPaletteUpdates=0
[DPY:HDMI-0]/Dithering=0
[DPY:HDMI-0]/DitheringMode=0
[DPY:HDMI-0]/DitheringDepth=0
[DPY:HDMI-0]/ColorSpace=0
[DPY:HDMI-0]/ColorRange=0
[DPY:HDMI-0]/SynchronousPaletteUpdates=0
[DPY:DP-0]/Dithering=0
[DPY:DP-0]/DitheringMode=0
[DPY:DP-0]/DitheringDepth=0
[DPY:DP-0]/ColorSpace=0
[DPY:DP-0]/ColorRange=0
[DPY:DP-0]/SynchronousPaletteUpdates=0
[DPY:DP-1]/Dithering=0
[DPY:DP-1]/DitheringMode=0
[DPY:DP-1]/DitheringDepth=0
[DPY:DP-1]/ColorSpace=0
[DPY:DP-1]/ColorRange=0
[DPY:DP-1]/SynchronousPaletteUpdates=0
[DPY:DP-2]/Dithering=0
[DPY:DP-2]/DitheringMode=0
[DPY:DP-2]/DitheringDepth=0
[DPY:DP-2]/ColorSpace=0
[DPY:DP-2]/ColorRange=0
[DPY:DP-2]/SynchronousPaletteUpdates=0
[DPY:DP-3]/Dithering=0
[DPY:DP-3]/DitheringMode=0
[DPY:DP-3]/DitheringDepth=0
[DPY:DP-3]/ColorSpace=0
[DPY:DP-3]/ColorRange=0
[DPY:DP-3]/SynchronousPaletteUpdates=0
[DPY:DP-4]/Dithering=0
[DPY:DP-4]/DitheringMode=0
[DPY:DP-4]/DitheringDepth=0
[DPY:DP-4]/ColorSpace=0
[DPY:DP-4]/ColorRange=0
[DPY:DP-4]/SynchronousPaletteUpdates=0
[DPY:DP-5]/Dithering=0
[DPY:DP-5]/DitheringMode=0
[DPY:DP-5]/DitheringDepth=0
[DPY:DP-5]/ColorSpace=0
[DPY:DP-5]/ColorRange=0
[DPY:DP-5]/SynchronousPaletteUpdates=0

this is the line that is supposed to load the .nvidia-settings-rc but it doesnt work:

nvidia-settings --load-config-only

another relevant info:
even in the session where i make the working changes, if i touch the display in gnome settings the problem comes back

Last edited by difri84 (2022-02-08 20:41:54)

Offline

#5 2022-02-08 22:47:07

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,311

Re: how to make nvidia-settings changes persistent?

I'm gonna say the original config and loading the nvidia settings rc works fine, but  gnome steamrolls over that during the session start.
Abandon the idea to pit nvidia-settings against gnome and focus on the problem.
What's the output of "xrandr -q" before and after "fixing" the problem w/ nvidia-settings?

Online

#6 2022-02-08 22:58:28

difri84
Member
Registered: 2021-12-09
Posts: 78

Re: how to make nvidia-settings changes persistent?

Before:

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080     60.00*+  59.94    50.00    60.05    60.00    50.04  
   1680x1050     59.95  
   1600x1200     60.00  
   1440x900      74.98    59.89  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94  
HDMI-0 connected (normal left inverted right x axis y axis)
   1920x1080     60.00 +  59.94    50.00    29.97    25.00    23.98    60.05    60.00    50.04  
   1680x1050     59.95  
   1600x1200     60.00  
   1440x900      74.98    59.89  
   1360x768      60.02  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94  
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)

After:

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080     60.00*+  59.94    50.00    60.05    60.00    50.04  
   1680x1050     59.95  
   1600x1200     60.00  
   1440x900      74.98    59.89  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94  
HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 160mm x 90mm
   1920x1080     60.00*+  59.94    50.00    29.97    25.00    23.98    60.05    60.00    50.04  
   1680x1050     59.95  
   1600x1200     60.00  
   1440x900      74.98    59.89  
   1360x768      60.02  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94  
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)

edit:
after pointing me out xrandr (wich i didn't know existed) i, i went to the wiki and test

xrandr --output DVI-I-1 --auto --output HDMI-0 --auto

witch worked! But as soon i switch the display in gnome settings, it's lost again
i'll try to follow the wiki around a xrandr persistent configuration, let's hope it will work!

Last edited by difri84 (2022-02-08 23:14:14)

Offline

#7 2022-02-08 23:31:13

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,311

Re: how to make nvidia-settings changes persistent?

The hdmi output in the first xrandr call isn't active at all?
What's the output after setting the mirror mode in gnome-settings?

Online

#8 2022-02-09 01:41:50

difri84
Member
Registered: 2021-12-09
Posts: 78

Re: how to make nvidia-settings changes persistent?

this is the xrandr when it acts broken, set up by gnome settings:

Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 480mm x 270mm
   1920x1080     60.00 +  59.94    50.00    60.05    60.00    50.04* 
   1680x1050     59.95  
   1600x1200     60.00  
   1440x900      74.98    59.89  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32    56.25  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94  
HDMI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 160mm x 90mm
   1920x1080     60.00 +  59.94    50.00    29.97    25.00    23.98    60.05    60.00    50.04* 
   1680x1050     59.95  
   1600x1200     60.00  
   1440x900      74.98    59.89  
   1360x768      60.02  
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      75.00  
   1024x768      75.03    70.07    60.00  
   800x600       75.00    72.19    60.32  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    72.81    59.94  
DP-0 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)
DP-4 disconnected (normal left inverted right x axis y axis)
DP-5 disconnected (normal left inverted right x axis y axis)

i'm really grateful about you sharing your experience and helping me!

Last edited by difri84 (2022-02-09 01:44:51)

Offline

#9 2022-02-09 06:23:16

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,311

Re: how to make nvidia-settings changes persistent?

I assume you've noticed that gnome for whatever reason chooses the non-default 50 Hz?
Can you configure that?

Online

#10 2022-02-09 07:33:55

difri84
Member
Registered: 2021-12-09
Posts: 78

Re: how to make nvidia-settings changes persistent?

Yes i noticed, but I have no idea how to fix that!
I don't expect you to tell me how to solve it, but if you could at least tell me what to read in the wiki I'll fix it wink

Is it about making an explicit xorg.conf?
Is it the driver?

In gome settings the frequency box disappears when I set mirror monitors.


In the past, the Nvidia 470 driver worked very well. Now I tried to use it but it's not working great.

In which direction should I move? Thank you a lot for your time!

Last edited by difri84 (2022-02-09 07:54:11)

Offline

#11 2022-02-09 07:59:19

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,311

Re: how to make nvidia-settings changes persistent?

This has nothing to do w/ nvidia or the server config - gnome-settings behaves nonsensical in selecting a non-preferred refresh rate. You'll have to fix it there and while maybe a bug in gnome-settings, i assume you somewhere there configured the 50hz for that output.
In doubt, log out and outside gnome (console session) delete ~/.config/monitors.xml

Online

#12 2022-02-09 09:27:56

difri84
Member
Registered: 2021-12-09
Posts: 78

Re: how to make nvidia-settings changes persistent?

i removed monitors.xml and the problem is still there.
in case you are wondering if i did it correctly, to be sure to be out of gnome:
-disabled gdm
-reboot
-removed the file
-enabled gdm
-reebot

i never set 50hz anywhere, the only thing i can think of is that at the beginning of the installation i installed the package nvidia instead of nvidia-lts. i dont know if this could have create some config issues. (using lts kernel and i immediatly noticed and changed for nvidia-lts)

any idea about what to try next?
thank you

Last edited by difri84 (2022-02-09 11:49:15)

Offline

#13 2022-02-09 13:14:34

difri84
Member
Registered: 2021-12-09
Posts: 78

Re: how to make nvidia-settings changes persistent?

UPDATE!!

i tried making a manjaro-gnome live USB, booted with propretary driver and the problem is there too!!
no problem at all with manjaro-xfce live USB though.

at this point i believe it's a gnome bug.

can i get around it in some way or do i have to change DE??

ty

Last edited by difri84 (2022-02-09 13:15:36)

Offline

#14 2022-02-09 21:31:45

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,311

Re: how to make nvidia-settings changes persistent?

difri84 wrote:

at this point i believe it's a gnome bug.

This has nothing to do w/ nvidia or the server config - gnome-settings behaves nonsensical in selecting a non-preferred refresh rate.

And if it's not for your configuration, it's a bug in gnome, yes.
If this is predominantly an issue w/ starting the system, you could https://wiki.archlinux.org/title/GNOME#Autostart a desktop service that runs (sleep 1; xrandr ....) to revert gnomes misbehavior (sleep to wait out gnomes error)
It's the same workaround you're using right now, just more convenient. Ultimately you need to file a bug upstream to get the bug fixed in gnome - or not use gnome.

Online

#15 2022-02-10 15:59:26

difri84
Member
Registered: 2021-12-09
Posts: 78

Re: how to make nvidia-settings changes persistent?

Thank you for your time smile

Offline

Board footer

Powered by FluxBB