Tuning nvidia-settings over SSH error

Ok, you’re using GDM/Gnome, so when you start your system GDM spawns its own Xserver. You’ll need the right XAUTHORITY set, as mentioned in the link you gave but that was for lightdm.
Run

ps a |grep X

should return something like

4104 tty7     Sl+    0:00 /usr/bin/X vt7 -displayfd 3 -auth /run/user/111/gdm/Xauthority -background none -noreset -keeptty -verbose 3

Note the path that comes after -auth, that’s what XAUTHORITY has to be set to.
Then you’ll need to run nvidia-settings as root:

sudo -s
DISPLAY=:0 XAUTHORITY=/run/user/111/gdm/Xauthority nvidia-settings [youroptions]
2 Likes