@amrits: I just did tests with 465.31
, 470.74
and 495.29.05
.
I can confirm that 0% fan speed is only possible if we disable GPUFanControlState: nvidia-settings -a "[gpu:0]/GPUFanControlState=0"
If we enable GPUFanControlState: nvidia-settings -a "[gpu:0]/GPUFanControlState=1"
The only values the fan(s) can have is between 30% and 100%.
Does not work:
nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUTargetFanSpeed=0" -a "[fan:1]/GPUTargetFanSpeed=0"
(Result is 30%)
nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUTargetFanSpeed=20" -a "[fan:1]/GPUTargetFanSpeed=20"
(Result is 30%)
Does work:
nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUTargetFanSpeed=30" -a "[fan:1]/GPUTargetFanSpeed=60"
(Result is 60%)
nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUTargetFanSpeed=100" -a "[fan:1]/GPUTargetFanSpeed=100"
(Result is 100%)
One important aspect: this only works if we run Xorg (X11) as root.
Example output if Xorg is not run as root
:
nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUTargetFanSpeed=60" -a "[fan:1]/GPUTargetFanSpeed=60"
Attribute 'GPUFanControlState' (zen:0[gpu:0]) assigned value 1.
ERROR: Error assigning value 60 to attribute 'GPUTargetFanSpeed' (zen:0[fan:0]) as specified in assignment '[fan:0]/GPUTargetFanSpeed=60' (Unknown Error).
ERROR: Error assigning value 60 to attribute 'GPUTargetFanSpeed' (zen:0[fan:1]) as specified in assignment '[fan:1]/GPUTargetFanSpeed=60' (Unknown Error).
Check if Xorg runs as root
:
ps -o user $(pgrep Xorg)
USER
root
I assume on your test system (Ubuntu?) the default is to run Xorg as root.
On other distros (e.g. Arch) the default is to run Xorg as user (but many display managers do not support rootless Xorg, so this would explain while it maybe was not an issue in nvidia’s testing/QA).
I had to create /etc/X11/Xwrapper.config
with the following content:
allowed_users=anybody
needs_root_rights=yes
and set sudo chmod u+s /usr/lib/Xorg.wrap
, after restarting Xorg the fan settings worked.
nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUTargetFanSpeed=60" -a "[fan:1]/GP UTargetFanSpeed=60"
Attribute 'GPUFanControlState' (zen:0[gpu:0]) assigned value 1.
Attribute 'GPUTargetFanSpeed' (zen:0[fan:0]) assigned value 60.
Attribute 'GPUTargetFanSpeed' (zen:0[fan:1]) assigned value 60.
I think the last time this worked w/o Xorg running as root
was 460.91.03
, but I can’t rollback that far (kernel seems to be to new).
Summary:
- Xorg needs to run as root user (this should be fixed by nvidia, this is a security risk).
- If fan control is enabled, the fans can never reach 0%, only values between 30-100% (bug!).
- This seems to be true on
465.31
, 470.74
and 495.29.05
. I did a lot of down/upgrading and rebooting…