- Saved searches
- Use saved searches to filter your results more quickly
- License
- WieWaldi/amdgpu-fancontrol
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- About
- AMD GPU fan control for Linux
- Why this package?
- Disclaimer
- Warning
- Installing this software
- License
- How to control AMD GPU fan speed
- 2 Answers 2
- AmdFan
- Why fork?
- Amdgpu_fan abandoned
- Security Fixes
- Basic functionality
- Documentation
- Usage
- Daemon
- Monitor
- Manual
- Configuration
- Service
- Recommended settings
- Starting the systemd service
- Checking the status
- Building Arch AUR package
- Installing from PyPi
- Building Python package
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Simple bash script based systemd service to easily set fan mode and control fan speed.
License
WieWaldi/amdgpu-fancontrol
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
Simple bash script based systemd service to easily set fan mode and control fan speed.
As many others I got annoyed by the fan of my AMD R9 270X spinning up and down all the time. This bash script was inspired by amdgpu-fancontrol. However, I’ve rewritten the whole thing and using a json file as conifg file. In addition you may enable the export of temperature and pwm values to sample file and feed it to gnuplot.
You may use exp-curve to generate values to meet your needs.
Please take care of the hwmon files. You have to set them correctly in order to get this script running.
cp amdgpu-fancontrol.conf /usr/local/etc cp amdgpu-fancontrol /usr/local/sbin cp amdgpu-fancontrol.service /usr/lib/systemd/system systemctl enable amdgpu-fancontrol
Please don’t run this script without knowing what you’re doing. I’m not responsible for your burned up graphics card.
About
Simple bash script based systemd service to easily set fan mode and control fan speed.
AMD GPU fan control for Linux
This software has been developed and tested on Debian 10 Buster with the 4.19.0-6-amd64 Linux kernel and a Radeon™ RX 590 GPU. It requires the amdgpu kernel module to be loaded.
Why this package?
- automatic fan control provided by the GPU hardware keeps the fans of my RX 590 running all the time (albeit at a very low speed)
- after some years of continued use, even at low speeds, fans develop irritanting noises
- most of the time I use my computer in a way that requires minimal GPU usage (writing code, browsing the web, etc)
- without fans, the temperature of my RX 590 rarely raises above 50°C when doing non-GPU intensive activities, even during the hottest summer days
Disclaimer
USE OF THIS SOFTWARE IS ENTIRELY OF YOUR RESPONSABILITY. HARDWARE DAMAGE MAY RESULT FROM HIGH TEMPERATURES AS A RESULT OF USING THIS SOFTWARE.
Warning
This software puts your GPU into manual fan control (manual means not controlled directly by hardware). If you stop this software you should reboot your computer or manually reset your GPU fan control to automatic mode.
Installing this software
If you want to run the software manually or develop your own software making use of functions from the amdgpu_fan_ctrl Python module, you may install it with pip3 or simply copy the file into some directory of your choice.
The most common use case will be to run this software as a systemd service, started at boot. To install this service, run the script ./install-systemd-service.sh as root.
License
This software is licensed under the MIT license.
How to control AMD GPU fan speed
There may be some similar threads, but they are rather old. I’ve recently been having a nightmare with Nvidia and Ubuntu with my specific motherboard. I ended up going for a new motherboard and AMD GPU instead. My old GPU was the EVGA GTX1650. After asking around, there was some pretty good software called GreenWithEnvy that allowed me to set extremely specific profiles for fan speed and GPU temperature. I don’t want to mess around trying to overclock memory — my main priority is to try and get the fans to be quieter. My new card is the AMD MSI RX6500XT. The cooling is actually pretty impressive compared to my old card. However, the default profile is too loud for me to tolerate. In windows, there is AMD radion software that more or less lets me do what i want, although doesn’t allow you to be as specific as GreenWithEnvy did. From the tests that I did with the software on windows, this cards GPU temperature stays well under 70 degrees even when gaming and I had set the fan speed to 34% (and interestingly 30% is the lowest they can go). 50% and over sounds ridiculous to me. My whole aluminium case starts resonating like an engine when they run this high unless i stand it on foam. I would rather they stayed at the same RPM when gaming until it gets closer to running a little to hot. For me, low noise is more important than overclocking to get the best visual performance. From what I can tell, there isn’t much in the way of programs for Open source cards and overclocking them, and I don’t have much understanding of doing things by the command line. I will mainly be gaming in windows, but I would like the ability to set more or less the same profile for the GPU fans in Linux too as the default is just too loud. Thanks.
2 Answers 2
Seems like you need to be able to create a custom fan curve. Try Corectrl, rather simple and has gui.
sudo add-apt-repository ppa:ernstp/mesarc
sudo apt install -y corectrl
If you want to remove the package and the repository
sudo apt remove corectrl sudo add-apt-repository —-remove ppa:ernstp/mesarc
I can also recommend Radeon Profile, but I don’t think it has custom fan curve.
sudo add-apt-repository ppa:radeon-profile/stable
sudo apt install -y radeon-profile
If you want to remove package and repository
sudo apt remove radeon-profile sudo add-apt-repository —-remove ppa:radeon-profile/stable
edit: You can get gnome tweaks which is an extended settings package essentailly. In it you will be able to set programs to launch at startup easily.
And yeah you should also be able to set the fan curve to exactly the same as in windows if you want. I don’t know if you can copy directly with a file or anything but just try to set the same fan curve and it will be fine.
AmdFan
Is a fork of amdgpu-fan, with security updates and added functionality. This is intended for stand-alone GPU’s and not integrated APU’s.
Why fork?
- alternatives abandoned
- lacking required features
- security fixes not addressed
- basic functionality not working
Amdgpu_fan abandoned
As of a couple years ago, and is no longer applying any security fixes to their project or improvements. There were also some bugs that bothered me with the project when I tried to get it up and running. Features missing
There are a number of features that I wanted, but were not available.
- Thresholds allow temperature range before changing fan speed
- Frequency setting to allow better control
- Monitoring to be able to see real-time fan speeds and temperature
Security Fixes
There are some un-addressed pull requests for some recent YAML vulnerabilities that are still present in the old amdgpu_fan project, that I’ve addressed in this fork.
Basic functionality
Setting the card to system managed using the amdgpu_fan pegs your GPU fan at 100%, instead of allowing the system to manage the fan settings. I fixed that bug as well in this release.
These are all addressed in Amdfan, and as long as I’ve still got some AMD cards I intend to at least maintain this for myself. And anyone’s able to help out since this is open source. I would have liked to just contribute these fixes to the main project, but it’s now inactive.
Documentation
Usage
Usage: amdfan.py --daemon Run as daemon applying the fan curve --monitor Run as a monitor showing temp and fan speed --manual Manually the fan speed value of a card --configuration Prints out the default configuration you to use --service Prints out the amdfan.service file to use with systemd --help Show this message and exit.
Daemon
Amdfan is also runnable as a systemd service, with the provided amdfan.service .
Monitor
You can use Amdfan to monitor your AMD video cards using the —monitor flag.
Manual
Alternatively if you don’t want to set a fan curve, you can just apply a fan setting manually. Also allows you to revert the fan control to the systems default behavior by using the «auto» parameter.
Configuration
This will dump out the default configuration that would get generated for /etc/amdfan.yml when you first run it as a service. This allows you to configure the settings prior to running it as a daemon if you wish.
Running amdfan —configuration will output the following block to STDOUT.
You can use this to generate your configuration by doing amdfan —configuration > amdfan.yml , you can then modify the settings and place it in /etc/amdfan.yml for when you would like to run it as a service.
Service
This is just a convenience method for dumping out the amdfan.service that would get installed if you used a package manager to install amdfan. Useful if you installed the module via pip , pipenv or poetry .
Running amdfan —service will output the following block to STDOUT.
controller --daemon Monitoring fan speeds and temperatures can run with regular user permissions. root permissions are required for changing the settings / running as a daemon.
Recommended settings
Below is the settings that I use on my machines to control the fan curve without too much fuss, but you should find a frequency and threshold setting that works for your workloads.
If you installed via the AUR, the service is already installed, and you just need to start/enable it. If you installed via pip/pipenv or poetry, you can generate your systemd service file with the following command.
amdfan --service > amdfan.service sudo mv amdfan.service /usr/lib/systemd/system/
Starting the systemd service
To run the service, you can run the following commands to start/enable the service.
sudo systemctl start amdfan sudo systemctl amdfan
After you’ve started it, you may want to edit the settings found in /etc/amdfan.yml . Once your happy with those, you can restart amdfan with the following command.
sudo systemctl restart amdfan
Checking the status
You can check the systemd service status with the following command:
Building Arch AUR package
Building the Arch package assumes you already have a chroot env setup to build packages.
git clone https://aur.archlinux.org/amdfan.git amdfan/ makechrootpkg -c -r
sudo pacman -U --asdeps amdfan-*-any.pkg.tar.zst
Installing from PyPi
You can also install amdfan from pypi using something like poetry.
poetry init poetry add amdfan poetry run amdfan --help
Building Python package
Requires poetry to be installed
git clone git@github.com:mcgillij/amdfan.git amdfan/ poetry build