Nvidia Fan controls aren't working

Hi everyone,

I’ve finally decided to start using Linux as my latest driver after using it way back when Ubuntu came out.

After initial set-up, everything looked great and worked out of the box, installing non-free drivers, recognizing monitor- I was really impressed. Even gaming with Steam and Lutris with Proton- they install and play super.

However, I’m using Nvidia Geforce 2070 SUPER from Gigabyte, which, in Windows, I’ve successfully underclocked and set-up custom Fan Curve in MSI Afterburner.

In Manjaro, it doesn’t look my custom Curve set-up in GreenWithEnvy (aka GWE) do anything. Here is the required information:

Current Status

inxi -Gazy

    /etc/X11/mhwd.d  inxi -Gazy                                         ✔ 
Graphics:
  Device-1: NVIDIA TU104 [GeForce RTX 2070 SUPER] vendor: Gigabyte
    driver: nvidia v: 550.90.07 alternate: nouveau,nvidia_drm non-free: 550.xx+
    status: current (as of 2024-06; EOL~2026-12-xx) arch: Turing code: TUxxx
    process: TSMC 12nm FF built: 2018-2022 pcie: gen: 3 speed: 8 GT/s lanes: 16
    ports: active: none off: DP-2 empty: DP-1,DP-3,HDMI-A-1 bus-ID: 07:00.0
    chip-ID: 10de:1e84 class-ID: 0300
  Display: x11 server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.0
    compositor: gnome-shell v: 46.2 driver: X: loaded: N/A failed: nvidia
    gpu: nvidia,nvidia-nvswitch note: X driver n/a, try sudo/root
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3440x1440 s-size: <missing: xdpyinfo>
  Monitor-1: DP-2 res: 3440x1440 dpi: 109 size: 800x340mm (31.5x13.39")
    diag: 869mm (34.22") modes: N/A
  API: EGL v: 1.5 hw: drv: nvidia platforms: device: 0 drv: nvidia device: 2
    drv: swrast gbm: drv: kms_swrast surfaceless: drv: nvidia x11: drv: nvidia
    inactive: wayland,device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 550.90.07
    glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce RTX 2070
    SUPER/PCIe/SSE2 memory: 7.81 GiB
  API: Vulkan v: 1.3.279 layers: 10 device: 0 type: discrete-gpu name: NVIDIA
    GeForce RTX 2070 SUPER driver: nvidia v: 550.90.07 device-ID: 10de:1e84
    surfaces: xcb,xlib

mwhd -li -l

   ~  mhwd -li -l                                                                                   INT ✘ 
> Installed PCI configs:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
          video-nvidia            2024.05.03               false            PCI


Warning: No installed USB configs!
> 0000:07:00.0 (0300:10de:1e84) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
          video-nvidia            2024.05.03               false            PCI
    video-nvidia-470xx            2023.03.23               false            PCI
           video-linux            2024.05.06                true            PCI
     video-modesetting            2020.01.13                true            PCI
            video-vesa            2017.03.12                true            PCI


> 0000:05:00.0 (0200:10ec:8168) Network controller Realtek Semiconductor Co., Ltd.:
--------------------------------------------------------------------------------
                  NAME               VERSION          FREEDRIVER           TYPE
--------------------------------------------------------------------------------
         network-r8168            2023.09.12                true            PCI

x11 dir structure

    /etc/X11  find .                                                                                     ✔ 
.
./xinit
./xinit/xinitrc.d
./xinit/xinitrc.d/50-systemd-user.sh
./xinit/xinitrc.d/40-libcanberra-gtk-module.sh
./xinit/xinitrc.d/80xapp-gtk3-module.sh
./xorg.conf.d
./xorg.conf.d/00-keyboard.conf
./xorg.conf.d/90-mhwd.conf (symlinked to mhwd.d/nvidia.conf)
./mhwd.d
./mhwd.d/nvidia.conf

nvidia.conf

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

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
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      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option         "Coolbits" "4"
	Option "NoLogo" "1"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Extensions"
    Option         "COMPOSITE" "Enable"
EndSection

 
Section "InputClass"
    Identifier          "Keyboard Defaults"
    MatchIsKeyboard        "yes"
    Option              "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

~/.nvidia-settings-rc

   ~  cat .nvidia-settings-rc                                                                           ✔ 
#
# /home/gregor/.nvidia-settings-rc
#
# Configuration file for nvidia-settings - the NVIDIA Settings utility
# Generated on Thu Jun 20 06:50:52 2024
#

# ConfigProperties:

RcFileLocale = C
DisplayStatusBar = Yes
SliderTextEntries = Yes
IncludeDisplayNameInConfigFile = No
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
[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: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-2]/RedBrightness=0.000000
[DPY:DP-2]/GreenBrightness=0.000000
[DPY:DP-2]/BlueBrightness=0.000000
[DPY:DP-2]/RedContrast=0.000000
[DPY:DP-2]/GreenContrast=0.000000
[DPY:DP-2]/BlueContrast=0.000000
[DPY:DP-2]/RedGamma=1.000000
[DPY:DP-2]/GreenGamma=1.000000
[DPY:DP-2]/BlueGamma=1.000000
[DPY:DP-2]/Dithering=0
[DPY:DP-2]/DitheringMode=0
[DPY:DP-2]/DitheringDepth=0
[DPY:DP-2]/DigitalVibrance=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
[GPU:0]/GPUPowerMizerMode=2

nvidia-settings -q screens

nvidia-settings -q fans

   ~/Pr/P/nfancurve    master !1  nvidia-settings -q screens                                 ✔  10s  

1 X Screen on azeroth:0

    [0] azeroth:0.0 (NVIDIA GeForce RTX 2070 SUPER)

      Has the following name:
        SCREEN-0

    ~/Pr/Private/nfancurve    master !1  nvidia-settings -q fans                                      ✔ 

1 Fan on azeroth:0

    [0] azeroth:0[fan:0] (Fan 0)

      Has the following name:
        FAN-0

fan curve in GWE (installed through AUR, 0.15.9)

nvidia Settings

What I have tried so far

  1. Setting Coolbits to 4, 8 and even 12
  2. Trying completely different Curve
  3. Trying blank config with sudo nvidia-xconfig --cool-bits 4, then replacing the symlinked file
  4. Also, in nvidia app, when I tick the “Enable GPU Fan Settings”, it immediatelly gets disabled again.
    image
  5. When I tried the nfancurve bash script (GitHub - nan0s7/nfancurve: A small and lightweight POSIX script for using a custom fan curve in Linux for those with an Nvidia GPU.), I get the errors:
################################################################################
#          nan0s7's script for automatically managing GPU fan speed            #
################################################################################

Configuration file: /home/gregor/Projects/Private/nfancurve/config
Number of Fans detected: 
1
Number of GPUs detected: 
1


ERROR: The current user does not have permission for operation

  Attribute 'GPUFanControlState' (azeroth:0[gpu:0]) assigned value 1.

Started process for 1 GPU and 1 Fan


ERROR: The current user does not have permission for operation


ERROR: Error assigning value 40 to attribute 'GPUTargetFanSpeed' (azeroth:0[fan:0]) as specified in assignment
       '[fan:0]/GPUTargetFanSpeed=40' (Unknown Error).


^C

ERROR: The current user does not have permission for operation

  Attribute 'GPUFanControlState' (azeroth:0[gpu:0]) assigned value 0.

Fan control set back to auto mode

I am really not sure what else to do, any help would be fantastic!

Thank you very much.

Well, thankfully, nfancurve gave a correct output with “The current user does not have permission for operation”.

If I executed the script as sudo, then everything works.

Which makes me think that this is probably also the case why I cant set anything in GWE or nvidia Settings in the first place.

Any ideas how can I get that to work?

My current option is to just move the temp.sh to system service otherwise