Contents
(click on the respective sections to jump to them)
Intro
- The State Of Folding In Linux
- Why Would You Want To Fold In Linux?
Guides
- Installing Ubuntu
- Installing Drivers
- AMD Drivers
- Optional: AMD Overclocking & Monitoring
- NVIDIA Drivers
- Optional: NVIDIA Overvoltage, Overclocking & Fan Control
- Installing The Folding Client
- Optional: Manual F@H Client Install
- Optional: Installing CPU Temperature Monitoring Software
Intro
The State Of Folding In Linux
It has been possible for a couple of years to be able to fold on CPUs in Linux but since the launch of Core ZETA (0x17) units last year, GPUs can also fold natively on Linux operating systems. Driver support however was not quite up there yet. nVidia GPUs were only really supported in Linux a couple of weeks after Core ZETA went public on Windows and AMD GPUs became capable of folding natively in Linux just a couple of months ago with the release of Catalyst 14.4.
Why Would You Want To Fold In Linux?
Folding in Linux is generally better because of a couple of reasons
- Linux kernel is faster than Windows1
- Linux is more stable than Windows
- Linux is more flexible than Windows and can therefore be installed on vastly different architectures and boot media
- Linux has more advanced tools for configuring your machines
There are also a couple of cons though
- Linux has a steeper learning curve
- Linux has very limited overclocking capabilities (you need to overvolt via vBIOS)
- A lot of proprietary software won't work in Linux and will require you to boot into Windows/OSX
So if you are okay with the cons and/or deem the pros large enough let's go install Ubuntu!
1 Purely measuring frametimes Linux is ~5% faster. Actual gain in PPD will differ depending on the hardware because of the way QRB works (non-linear)
Guides
Installing Ubuntu
For consistency reasons we'll use Ubuntu 14.04 LTS - AMD64. Note that you can fold in pretty much any Linux distro. Of course 64-bit operating systems are pretty much a must since 32-bit would have some serious limitations with respect to memory initialization. Here are some instructions on how to install Ubuntu.
note: Ubuntu will install GRUB, which is a bootloader that can load pretty much any OS. It does however destroy the entry for the Windows bootloader, so uninstalling Ubuntu will leave you with a non-bootable Windows partition as well in case you were dual booting. Here are some steps on how to recover your Windows bootloader. A new Windows install will also restore the entry for the bootloader of course, but it will also destroy the entry for any other bootloader
Installing Drivers
By following the instructions in the link above you should be able to boot into Ubuntu. The first thing you will want to do is installing the proprietary drivers of your graphics card vendor.
AMD Drivers
1) Download the latest stable drivers Catalyst 14.12 (last updated 12/16/2014)
2) Extract the file
3) Open a terminal
4) Execute this command (change the catalyst version marked red in the command below according to which version you are installing)
cd Downloads; sudo sh amd-driver-installer-catalyst-14-4-x86.x86_64.run
5) Select "Install Driver" and agree to the AMD license prompt
6) Select "Automatic" and click "Continue"
7) The driver should be installed so you can click "Exit"
8) Execute this command in a new terminal
/usr/bin/aticonfig --initial
9) Reboot the system and your graphics card(s) should be ready to fold
Optional: AMD Overclocking & Monitoring (credit to anubis1127)
To configure multiple cards after doing the driver install, run the following command
sudo aticonfig --adapter=all --initial
Now you can tweak the cards with a tool called "aticonfig" or "amdconfig" (both work)
Listed below are some options to run aticonfig with to overclock the cards and more
--lsa
List detected adapters
--adapter=adapterlist
(Ex. --adapter=all --adapter=0 --adapter=0,2)
Selects the adapters you specify for any other commands entered. (Ex. aticonfig --adapter=0,1 --odsc= 1200,1400)
--od-enable
Unlocks the ability to change core or memory clock values,ie enables Overdrive
--od-disable
Disables ATI Overdrive related aticonfig options that were set
--odgc, --od-getclocks
Lists the current and peak clocks, the theoretical range clocks can be set to, and most handy for me the current load on the GPU
--odsc, --od-setclocks={NewCoreClock|0,NewMemoryClock|0}
Sets the core and memory clock to the values specified in MHz, settings revert to stock after restart
--odrd, --od-restoredefaultclocks
Sets the core and memory clock to the default values, restart X to for changes.
--odcc, --od-commitclocks
Commit the clocks you have set to start with X, only do this after your OC proves to be fully stable, or as stable as you need it to be, heh
--odgt, --od-gettemperature
Gets the temperature
List detected adapters
--adapter=adapterlist
(Ex. --adapter=all --adapter=0 --adapter=0,2)
Selects the adapters you specify for any other commands entered. (Ex. aticonfig --adapter=0,1 --odsc= 1200,1400)
--od-enable
Unlocks the ability to change core or memory clock values,ie enables Overdrive
--od-disable
Disables ATI Overdrive related aticonfig options that were set
--odgc, --od-getclocks
Lists the current and peak clocks, the theoretical range clocks can be set to, and most handy for me the current load on the GPU
--odsc, --od-setclocks={NewCoreClock|0,NewMemoryClock|0}
Sets the core and memory clock to the values specified in MHz, settings revert to stock after restart
--odrd, --od-restoredefaultclocks
Sets the core and memory clock to the default values, restart X to for changes.
--odcc, --od-commitclocks
Commit the clocks you have set to start with X, only do this after your OC proves to be fully stable, or as stable as you need it to be, heh
--odgt, --od-gettemperature
Gets the temperature
To monitor Termperatures, GPU Utilization and Clock Speeds run the following command
watch -n5 aticonfig --adapter=all --odgt --odgc
NVIDIA Drivers
1) For the following graphics cards:
GTX 660 Ti
GTX 670
GTX 680
GTX 690
GTX 760
GTX 770
Install ForceWare 319.76 -- later drivers have performance issues with GK104 when folding (last updated 8/6/2014)
For other graphics cards download the latest stable drivers ForceWare 346.22 (last updated 10/14/2014)
--note: For non-Maxwell GPUs skip step M-I and M-II
(credit to Preim)
M-I) Run this in a terminal:
sudo gedit /etc/default/grub
M-II) Edit the line "GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" and add nomodeset like:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
2) Disable the GUI of your operating system with the following command. Note that it is "kdm" for KDE Display manager and "lightdm" for the Display manager in newer Debian/Ubuntu distros
sudo service gdm stop
3) Press CTRL + F1 to get a prompt to insert your Ubuntu username and password and log in
4) Run the following command
cd Downloads; chmod +x NVIDIA*; sudo sh NVIDIA*
It will most likely complain about nouveau (the open source nVidia drivers) being installed and therefore fail to install. Answer "yes" to all the prompts
5) Run the following command
sudo apt-get remove --purge nvidia*; sudo reboot
6) When it finishes rebooting, disable the GUI once again
sudo service gdm stop
7) login and enter this command
cd Downloads; sudo sh NVIDIA*
8) Answer "yes" to all of the questions
9) When it finishes installing, run the following command to reactivate your GUI
sudo service gdm start
Now your graphics card(s) should be ready to fold.
Optional: NVIDIA Overvoltage, Overclocking & Fan Control
--note: Overclocking option requires ForceWare 340.17 BETA or later!
--note: Overvoltage option requires ForceWare 346.22 BETA or later!
O-1) Run the following command to enable overclocking & fan control via X server (the Linux equivalent of nVidia Control Panel)
sudo nvidia-xconfig --cool-bits=28
O-2) Reboot your PC and run
sudo nvidia-settings
The overclocking options should be under PowerMizer, fan control can be done under Thermal Settings
O-3) To overvolt your nVidia GPU run this in a terminal
sudo nvidia-settings -q all | grep -i voltage
It will give you an output very similar to this (GTX 780 Ti output)
In this case my maximum offset voltage will be +75mV, so a total core voltage of 1275mV (or 1.275V).
O-4) To apply the +75mV voltage offset run this in a terminal2
sudo nvidia-settings -a GPUOverVoltageOffset=75000
2 The maximum overvoltage offset depends on your GPU
Installing The Folding Client
The folding client can be installed by going to the Stanford site and downloading the packages corresponding to your OS.
1) These packages are necessary for Ubuntu:
- FAHClient (The client that manages the actual folding processes)
- FAHControl (The graphical front end to make configuring the client easier)
2) After downloading the packages they should be in your Downloads directory, click on them to open a link to the Ubuntu Software Center
3) Click on "Install" in Ubuntu Software Center and the programs should start installing (they might stall for a while, this is normal behaviour)
Optional: Manual F@H Client Install
Alternatively you can run this installation script that will install the folding client in a single directory. It includes bigadv install with TheKraken, so this is recommended for 2/4P systems.
To run this script, download the file "install.txt" below and run the following commands in a new terminal:
mv Downloads/install.txt Downloads/install.sh; chmod +x Downloads/install.sh; bash Downloads/install.sh
install.txt 3k .txt file
This script will do the following:
- Get the folding client and install it
- Finetune checkpoint, power and download settings
- If desired, configure the client to run bigadv and install Kraken for load balancing
- If desired, install the graphical front end
- If desired, run the folding client with GUI
- Create a script run.sh that will run the client in terminal + GUI in a new window
To run the client after running the script enter this in a new terminal:
cd fahv7/v7; ./run.sh
Optional: Installing CPU Temperature Monitoring Software
You might want to keep a check on your CPU temperatures. A good tool in Linux to check CPU temps is i7z.
To Install and run this, run this in a new terminal
wget http://i7z.googlecode.com/svn/trunk/i7z_64bit; mv i7z_64bit i7z; chmod +x i7z; sudo ./i7z
To close this application hit CTRL + C as with most applications that run in a terminal.
To run this application again run this in a new terminal:
sudo ./i7z
Update log
08/20/2014 - Added AMD support (credit to @anubis1127)
10/14/2014 - Change to install.txt to fix possible broken package manager
12/16/2014 - Added nVidia overvoltage options and updated drivers references
01/14/2015 - Blank splash screen fix for 2nd gen Maxwell GPUs (credit to @Preim)