Skip to content

Setting NVIDIA fan speed without logging in graphically

Hi,

I'm try to set my fans to 30% speed when my machine boots

I've been using nvidia-settings to do it via CLI and even set up a small script to do a fan profile for me every changing every ~5C (before I discovered GreenWithEnvy )

I'm using SDDM with Plasma. I tried adding the below to my /usr/share/sddm/scripts/Xsession

nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUTargetFanSpeed=30" -a "[fan:1]/GPUTargetFanSpeed=30"

It doesn't seem to activate when SDDM starts. It seems like nvidia-settings doesn't run at all unless a user is logged in graphically. To confirm this, I logged in to tty2 after SDDM started and was sitting at the user login screen. I ran nvidia-settings and it failed, however after adding DISPLAY=:0, it failes with a different error about MIT-MAGIC-COOKIE missing.

Both of those are kind of beside the problem though. If this was a headless server that wasn't running X, how would I go about using nvidia-settings to set the fanspeed?

2 points8 comments
Open on Reddit
About this post
Posted
Archived
Score
2 · 100% up
Kind
Text
ID
ubwslt

Author

11
posts
97
comments
0
media
View profile
No comments archived yet. Reddit counts 8.

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.