• Guest, The rules for the P & N subforum have been updated to prohibit "ad hominem" or personal attacks against other posters. See the full details in the post "Politics and News Rules & Guidelines."

GUIDE: Linux Mint 18.3 Cinnamon with Nvidia GPU(s)

TennesseeTony

Elite Member
Aug 2, 2003
4,126
3,431
136
www.google.com
Ok, so this is a work in progress, and it will take lots more time to complete. But let's get started.

Oh great, the current version is now 18.3, but I'm hoping it's even easier than 18.2.
edit: I tried 18.3, solved the problems with multi-GPU
edit:
Like Pokey, I'm having trouble with Mint and multiple GPUs (18.3 fixed this), and also with my one motherboard that has secure boot. So on future builds (two more to go for me) I'm trying http://lubuntu.net/. edit: Lubuntu sucked. Ubuntu sucked. So far so good with the new 18.3 Mint version.....

First, all thanks and credit to hiigaran of Brony@home forum! While I am still trying to get my systems setup and still learning, you should check out that post if you want to get started right away. But so far, I've gotten 3 systems with GTX1080's up and running both Folding@home (GPU) and BOINC (cpu), and the ever helpful TeamViewer.

My focus right now is on F@H with GPU, and I can tell you the performance boost is WELL WORTH the downtime/points lost while you learn to setup Linux Mint. Edit: Windows 10 utilization of my 1080s was 84-88%, now they are used 99%, which is the most likely reason for the performance boost, in my opinion.

First thing I'd like to add to the guide from hiigaran, is some links:
Both Mint and Lubuntu are based on Debian/Ubuntu, and often you will have many types of LINUX files to choose from when downloading something. Choose the .deb extension, not the .rpm or .tar.

I suggest running Nvidia driver version 384, the newer ones didn't fold for me.

Much more to come....bedtime...work time....upgrade my own system time....bedtime....work time....upgrade another system time...bedtime....lol I'm slow because I'm swapping some stuff too, since Thunder-Strike died, using his 1080's in other systems, and I'm removing all Bronze power supplies and replacing with some Platinum units.

edit: This guide is now more or less complete, other than posting my own personal pitfalls as I encounter them, I see no reason to redo an excellent guide by hiigaran. The instructions simply work (at least for Mint Cinnamon 18.3) , and I encourage others to give Linux a try on your Nvidia dedicated machines, if you haven't already. :)
 
Last edited:

yodap

Member
Jan 13, 2014
53
108
106
Thanks, good post Tony.
I've been using 17.3 for awhile but always like new resources to tap into.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
15,492
2,534
55
I have no idea how to fix this HELP !!
Who told you to use dpkg? Oh, hiigaran did.

OK, first, to undo that:
Code:
sudo apt remove python-support
Then, to do it correctly, since I see it in Ubuntu's respository:
Code:
sudo apt install python-support
*Note: most sites tell you to use "apt-get", but "apt" gives a little nicer interface.
 

Pokey

Platinum Member
Oct 20, 1999
2,692
331
126
Two FYI issues I ran into:

I ran into a problem with Mint going straight to a black screen on my multi GPU rigs so I switched to Lubuntu and it worked fine.

Another rabbit hole was a couple of my rigs, unbeknownst to me, were booting from legacy bios and not UEFI. Lubuntu is UEFI and would not install alongside Win 10.............. My solution was to nuke Win 10 on those two rigs. :rolleyes: If I ever go back to Win 10 on those two I will need to do a clean install.

Also FAHControl requires a lot of Python dependencies. If you follow hiigaran's tutorial, you will get them. Opps, or see Ken g6's reply above.
 

TennesseeTony

Elite Member
Aug 2, 2003
4,126
3,431
136
www.google.com
I hope hiigaran of Bronyathome.org does not mind, but I'd like to copy/paste his post here, in the event such valuable data should somehow become lost to mankind. He has posted recently that he is glad to see it is still helping others, so I'm sure he will be okay with it.


2017-04-19, 02:36:09 PM (This post was last modified: 2017-11-05, 02:05:14 PM by tiwake.)
If you're anything like me, you probably love Windows because if nothing else, it just works. It might have its issues with privacy, security or performance, but if you want to get a system set up, the amount of work typically required would be exponentially less on Windows, than it would be for a system running Linux.

Problem is, when dealing with the realm of citizen science, particularly the vast majority of projects that focus on using computing power to complete tasks, Windows falls short on two key factors: Performance and reliability. The following guide aims to walk you though setting up a system running Linux in a (hopefully) simple and straightforward manner.

Please note that this guide is for users with nVidia cards. As I have no AMD/ATI cards and therefore no experience installing such a system, I cannot provide tested instructions.

For this guide, feel free to choose between either Mint, Ubuntu, or Lubuntu as your distro. They're all Linux systems, but they come with varying software and interfaces. However, these three distros are among the simpler to use, and have good support. For a dedicated system that won't be used outside of F@H, pick Lubuntu. If you wish to use the system regularly while you fold, I'd recommend Mint with the Cinnamon desktop. Whichever distro you go for, pick the 64 bit over the 32 bit. Unless you're running on hardware from the early 2000s, there's no need to use 32 bit.

After downloading, you'll want to download a tool like PowerISO on your Windows system to burn the .ISO file to a disc, or make a bootable flash drive.

Once your removable media is ready to go, insert it into the computer you wish to install your distro on, and boot it up. Keep an eye on the very first thing you see on your screen when the computer turns on, as it will mention somewhere that you should press a certain key to take you to a boot order setting. The boot order option might not exist, in which case you need to look out for the key you need to press to enter the BIOS or UEFI. Press it before the screen disappears. If you're entering through the BIOS/UEFI, look for the boot menu. There will be a boot order list which you will need to swap around, so that your removable media becomes the first in the boot order. Once this is done, save and exit.

Your distro should start loading. Either an installer will appear, or it will load a desktop that would appear as if the system is already installed. If the latter, you will find an icon to install the system, which would bring up the same installer. Follow these instructions as they come. Most should be simple to go through. Once finished, the installer will ask you to remove the disc/flash drive and restart. Normally the computer should then boot into the installed operating system, but if it gets stuck, return to the boot order and set the first device to the one you installed your distro to.

As soon as you get to the desktop, you'll want to open up the command line, which henceforth will be referred to as the terminal. You can usually find a button at the bottom of the screen to open it up, or you can simply use Ctrl + Alt + T. Type or copy each line, one by one, into the terminal:

Code:
wget http://launchpadlibrarian.net/109052632/python-support_1.0.15_all.deb

sudo dpkg -i python-support_1.0.15_all.deb
Note that Ctrl + V will not work in the terminal. You will need to right click inside it and click paste. Ctrl + C in your browser will still work just fine though.

After entering the second line, you will be asked for the password you used when you set up your account during installation. This will then install the .deb file you just downloaded, which will be a prerequisite for the F@H software. Some additional software will also need to be installed, namely the drivers and OpenCL support for nVidia cards. Firstly, you will need to specify an extra place for the updater/installer to look for additional software, which in this case would be for the drivers:

Code:
sudo add-apt-repository ppa:graphics-drivers/ppa
When prompted, press enter. If you are using the same terminal window from before, you will not need to enter your password again, but if you closed it and opened a new one, you will need your password. Next:

Code:
sudo apt-get update
This will update the database that the apt-get function uses to find software as well as inform you of other available updates. We can worry about the latter once everything is set up though. Once this is done, type the following line, but instead of pressing enter, press tab:

Code:
sudo apt-get install nvidia-
Pressing tab will either autocomplete what you're typing, or if there are multiple entries that could complete what you started typing, it will display a list. In this case, it will display several nVidia driver versions. Pick the highest driver version. For example, "nvidia-370". Don't bother with the ones ending with "dev". Once you complete this line, press enter to install. When asked if you want to continue, press "y" and enter.

Note that nvidia-370 is verified stable. If the highest driver version does not work well, you can downgrade. Alternatively, you can check F@H communities to see if anyone else has verified a version to be working. Once the drivers are installed, install the rest:

Code:
sudo apt-get -y install python-gnome2 mesa-common-dev freeglut3-dev nvidia-settings gedit
Next, download and install FAHClient and FAHControl from the Folding@Home site. To keep things easy, download them to your home folder (the one named after your user name). If you can't install them by double clicking and following the graphical interface, type "sudo dpkg -i ", followed by the file name of the FAHClient and FAHControl files you downloaded. Remember that you can use tab to autocomplete the file name if it's too long.

During the installation for FAHClient, you will be asked for your F@H user name, team number, and passcode. Go ahead and put these in. When the two programs are installed, go back to your terminal and type:

Code:
cd /var/lib/fahclient

ls
This will navigate you to the fahclient folder and list its contents. Look for a file called GPUs.txt. If the file does not exist, type:

Code:
sudo wget http://fah-web.stanford.edu/file-releases/public/GPUs.txt
Skip this step if the file is already there. Remember, to type this into the same terminal you performed the cd command in, or else you will download the file to the wrong place.

Go ahead and restart your computer now, either by typing reboot into the terminal, or from the relevant button on your taskbar/start menu. Once you're back into the desktop, open your terminal and type "FAHControl". Keep in mind that this will be case sensitive. You should see that familiar window you've been using on Windows. If you don't see your GPU in the slot list, add it manually by going to Configure > Slots > New Slot. Select the GPU button and save. This should be sufficient for a single GPU setup, and you should see your GPU slot initialising.

For multi GPU setups, you may need to manually assign the ID of each individual GPU when you're adding the slot. This should not be necessary, but if needed, type "nvidia-settings" into the terminal to open up nVidia X Server. On the left, you will see a list showing the device number of each GPU installed (eg, GPU0, GPU1, etc.). The number will be the ID of each card. Regardless of whether or not you need to manually set the ID or leave it at -1 for F@H to decide, save and monitor the folding slots. If they are stuck at Ready, or if X Server shows the GPU usage of a card to be anything other than 85-100%, you may need to manually set the CUDA and OpenCL indexes for each slot.

To do this, pause one GPU slot in FAHControl. Go to the slot settings for that same GPU. Set CUDA and OpenCL to 0, then save and resume the slot. If there are no changes, and it still doesn't fold after 20 or 30 seconds, repeat the process, increasing the index values by 1 each time. Keep repeating this until the slot works, then repeat the entire process for every other problematic GPU you have. This took about 5 minutes on my quad card setups. That said, if your indexes are in the double digits, then there may be other issues.

If everything has gone well, your cards should be up and running. Remember that you generally need one CPU core per GPU slot, so the number of cores used for CPU folding may have to be manually adjusted, if not completely disabled. Whatever the case may be, confirm once again in X server that each GPU is running at full or near full load.

You're now hopefully folding on Linux. But the fun does not stop there. You may wish to set a custom fan speed for your cards. Unfortunately, software like PrecisionX or Afterburner do not exist on Linux, so fire up the terminal once more and type the following:

Code:
sudo nvidia-xconfig -a --cool-bits=28 --allow-empty-initial-configuration

cd ~

gedit fancontrols
Note that you may need to repeat the first line twice in a row, before the "cd ~" command.

A text editor should appear after the final line. Here, you can add commands that will set your fan speed to whatever value you would like. You will need the GPU IDs of each GPU you have first. So let's say you have three GPUs with IDs 0, 1 and 2, and you want all their fans at 100%. Add the following lines to the editor:

Code:
nvidia-settings -a [gpu:0]/GPUFanControlState=1
nvidia-settings -a [fan:0]/GPUTargetFanSpeed=100
nvidia-settings -a [gpu:1]/GPUFanControlState=1
nvidia-settings -a [fan:1]/GPUTargetFanSpeed=100
nvidia-settings -a [gpu:2]/GPUFanControlState=1
nvidia-settings -a [fan:2]/GPUTargetFanSpeed=100
The ControlState line enabled fan control the the specified GPU, while the FanSpeed sets the speed as a percentage. If you wish to overclock, you can also add the following lines to the file:

Code:
nvidia-settings -a [gpu:0]/GPUGraphicsClockOffset[3]=
nvidia-settings -a [gpu:0]/GPUMemoryTransferRateOffset[3]=
Adding a number after the "=" allows you to adjust the offset of the core and memory clocks in MHz. It is very important to keep in mind that this is an offset from the stock clocks. Forgetting this little detail can damage your card. If your stock core is 1000 MHz and you want to overclock to 1100 MHz, do NOT type in 1100, or you'll basically tell the software to run your GPU at 2100 MHz. Instead, type in 100.

Whether you choose to overclock or just set fan speeds, save the file and exist. In the same terminal, type:

Code:
sudo chmod +x fancontrols
This allows the file to be executable. Next, go to your startup applications list. This will be listed in your system settings menu, or through a search for startup applications. Add a new startup entry and browse for the file you just saved. If you followed the commands before opening the text editor, it should be in your home directory, or ~. Select the file, give it a name, and save. If you reboot, you should hear your fans adjusting to your set speeds when the system starts up.

Hopefully this should cover the basics. If you like to run dedicated systems, you might want to look into downloading Teamviewer to remotely connect to your following systems from your main computer. Temperature monitoring is possible from X server in the thermal settings of each GPU as well.

I know this all looks like it would be a pain in the ass to do. However, F@H performs better with Linux, as does BOINC. A dedicated folding rig should always run Linux, and unless you're gaming, you could probably also make the switch if you have the patience to learn a little. I myself am not patient in the slightest, and while Linux still gives me aneurysms, I can at least acknowledge the pros of it.
 

TennesseeTony

Elite Member
Aug 2, 2003
4,126
3,431
136
www.google.com
Lubuntu is a pain in the neck. Unlike Pokey, for whom the guide by hiigaran functioned, I am having the troubles Mark had here. I am continuing onward, as any tribulation brings forth knowledge (hopefully). Good thing I had some 'basic' training in BASIC back in a summer school class a few decades back (on an Apple II). :) So far though, from a user friendly point of view, Lubuntu is not my friend. Mint is far closer to the 'Windows Experience', in my opinion.

I'll try Ubuntu (the last of the 3 mentioned in the original guide) once the new MB arrives for ThunderStrike version 2, and let you know if the original guide functions on that version.

QUESTION: I downloaded from Nvidia graphics drivers, which was saved as a '*.run' file. 'run'ning the file opens a text editor, rather than installing. How do you use the Nvidia download?
 

StefanR5R

Elite Member
Dec 10, 2016
4,196
4,701
136
There are a myriad of guides on the internet how to install Nvidia drivers on the various Ubuntu derivatives... Here is one which aims to show the Mint style of doing so:
http://www.binarytides.com/install-nvidia-drivers-linux-mint-16/
(hiigaran's guide aims to be general for at least three somewhat different distributions.)

Though I wonder if even the step of adding the PPA which provides the drivers can be done via a GUI.
 

Howdy

Senior member
Nov 12, 2017
569
465
106
Is there a reason to install Ubantu or Lubantu vs Mint? Or are they the "same" in functionality?
 

StefanR5R

Elite Member
Dec 10, 2016
4,196
4,701
136
In terms of what application software can be installed easily from repositories, these three should be almost the same.

Differences are of course the default desktops. Furthermore,
  • Ubuntu is backed by a company, with all the possible pros and cons that tie into this.
  • Lubuntu is a slim distro on top of Ubuntu, AFAIU only deviating WRT default desktop.
  • Mint deviates a bit further from Ubuntu than Lubuntu does. One of the original motivations behind Mint was to make it easy to install certain popular third-party software, notably non-GPL binary software such as kernel drivers and media codecs. Not sure if this is still a big differentiator for Mint today.
That's AFAIU. Of all the Debian derivatives, I tried only Ubuntu for a brief time a long time ago (before they replaced Gnome by Unity, which they are now reversing) on a PowerBook G4 Titanium, because it was probably the easiest way to get Linux onto a PPC machine back at that time. The hardware of that PowerBook broke down soon afterwards (it was already old and partly defective when I put Linux on it), so I didn't play with Ubuntu a lot then.

Re company backing of Ubuntu: I find the model of a distro with an LTS option appealing for a cruncher box. I.e. never change a running system. At this time, I have a rolling release distro on my daily desktop and on all my crunchers (Gentoo generally, which can be kept pretty stable, and out of curiosity on one cruncher OpenSuse Tumbleweed, which can be funky at times). Though Lubuntu and to a degree Mint replicate the LTS option of Ubuntu proper.
 

Howdy

Senior member
Nov 12, 2017
569
465
106
So with that said, is it better to start at the top with Ubuntu or do like most have done and run with Mint? I am only asking since I just installed Mint on a system, it went well...yeah well that's a good word for it. Is the support (user) any "different" from one to the next or does it basically trickle down? IE: drivers and what ever else is involved in the OS

EDIT: After reading 10s edits in the first post, it seems for multiple GPUs Mint is actually the way to go.

Edit#2 : New question is how do you edit and where is it "app_config" (if that is what it's called) in Linux to run 2 or more projects/ GPU? IE: Milkyway, PG and others that allow it.
 
Last edited:

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
15,492
2,534
55
Well, I just tried overclocking my GPU for the first time. Apparently you can have problems without your computer crashing or the GPU overheating. If you get this in your F@H log, you've overclocked too much:

Code:
Bad State detected... attempting to resume from last good checkpoint. Is your system overclocked?
:(
 

StefanR5R

Elite Member
Dec 10, 2016
4,196
4,701
136
New question is how do you edit and where is it "app_config" (if that is what it's called) in Linux to run 2 or more projects/ GPU? IE: Milkyway, PG and others that allow it.
The location of the BOINC data directory can be configured. It may be /var/lib/boinc or /var/lib/boinc-client or something entirely different. If unsure, try
grep -r boinc /etc
which looks for occurrences of the string "boinc" in system config files. That way you not only find the location of the data directory, but also the place where it is configured.

The contents and subdirectories within the data directory are then the same as on Windows systems.

Typically, the boinc data directory is owned by a different user than yourself. Therefore your user typically cannot create and edit files in there, or even read some of the files. You can try things like
sudo nano -w /var/lib/boinc-client/projects/www.primegrid.com/app_config.xml
or
gksudo nemo /var/lib/boinc-client
to work there as superuser.

Other ways would be to change the system config such that the boinc client runs as the main user, or to log in as the boinc user. Either way may be a bit more involved. On a PC which is used for various purposes besides DC, it may be advisable to keep main user and boinc user apart.
 
Last edited:
  • Like
Reactions: TennesseeTony

Howdy

Senior member
Nov 12, 2017
569
465
106
It is the second one you listed- /var/lib/boinc-client - to get to the file directory for BOINC.
I used this to "unlock" the programs file to allow it to be edited by me (This was found in the PG forums) :

to help with permission issues, give yourself group access:

sudo usermod -a -G boinc <yourusername>


...and give all of the important files read and write permission to the group

sudo chmod g+rw /var/lib/boinc-client

sudo chmod g+rw /var/lib/boinc-client/*.*

The rest I will assume is to use the text editor in Linux to make an app_config.xml and place it in the specific programs file (PG, Milkyway, etc. etc.) the same as Windows. Please correct me if I am wrong obviously. I have only gotten this far since I did not know if this was the correct procedure to add in the app_config.
This machine is DC only and there will be no other users besides myself.
 

yodap

Member
Jan 13, 2014
53
108
106
With a fair amount of time and cursing I was able to get Lubuntu 17.1 up and folding on 2 GPU's and crunching boinc on the CPU. I'll agree with Tony that it's not as noob user friendly as Mint. However it's up and running well and I'll keep it around as dual boot on the Win7 rig it's in.

So with Mint 17.3 being the latest version I've used, 18.3 will be next for me maybe this week, if I feel like putting in more late nights that is.

screenshot

If there is any questions specific to my install, will do my best to answer them.
 

TennesseeTony

Elite Member
Aug 2, 2003
4,126
3,431
136
www.google.com
So, I've already reported the extra points I personally have gained, going from Windows 10 to Linux, in Folding at home. Now for some WCG info:

For the WCG Birthday challenge, I ran 85-90k ppd. And with Linux my ppd on WCG is................right about the same, 85k ppd. Why? Good question, with a simple answer. THEN I had ThunderStrike's 56 threads, now I don't. :D So, missing 56 threads and getting the same ppd as with those threads, well, that is impressive. :)

The new M/B is still lost in shipping, but I'll certainly update once those 56 threads are back to work.

EDIT: Disappointingly, the GTX1070 does not seem to benefit as much as the 1080, upon switching to Linux. I would say the average ppd estimate under Linux is only 10-20k ppd higher than Windows 10, for my stock cards.
 
Last edited:
  • Like
Reactions: StefanR5R

IEC

Elite Member
Super Moderator
Jun 10, 2004
14,016
3,815
136
I may have to give Mint 18.3 a try. I was able to use Ubuntu back in the 6.06 days so I can't imagine it'd be more difficult than back then. If it really gives that significant of a boost it's like adding 1 extra cruncher for (almost) free.
 
  • Like
Reactions: TennesseeTony

StefanR5R

Elite Member
Dec 10, 2016
4,196
4,701
136
Several WCG subprojects will definitely experience a boost from running on any Linux flavor of your choice, notably those WCG subprojects which are based on VINA code (whatever this means; includes OpenZika, Smash Childhood Cancer, and Outsmart Ebola Together; maybe more).

Regarding GPU projects, including Folding@Home, what I have read is that the Windows graphics driver subsystem operates more conservatively such that (a) crash dumps and (b) driver updates are enabled on live running desktops, and this causes overhead or latency for OpenCL and CUDA programs (AFAIR + AFAIU).
 

rchunter

Senior member
Feb 26, 2015
933
72
91
I like what linux mint team did to make it really easy to upgrade to newer versions through the update manager.
Plus it used to be hassle to install a fresh copy with black screen on boot. You used to have to go in and change grub command line to nomodeset=0 to get it to boot right, and then reinstall drivers. They fixed that too...
 

StefanR5R

Elite Member
Dec 10, 2016
4,196
4,701
136
(from the Folding race thread)
I didn't think to try a disc...cpu stalled with usb a time or ten...
Is this a USB attached HDD or SSD, or is it only a memory stick? If the latter, both the flash memory and the controller will have much larger latencies than the former. In addition, it could wear out and die eventually from the write load which a system + applications partition needs to support.
 

Pokey

Platinum Member
Oct 20, 1999
2,692
331
126
Another wrinkle : I could not get Mint 18.3 to get going on Sandy even by DVD, so switched to a 18.1 disk and it installed. Then I
"upgraded" to 18.3.

Linux reminds me of my '91 F-150 with manual transmission; 4-speed plus OD in the floor....................no air conditioning, windows don't work, no radio, etc., but it still gets the job done.................... Some of this is tongue in cheek but still.............................
 
  • Like
Reactions: TennesseeTony

Howdy

Senior member
Nov 12, 2017
569
465
106
If your running multiple GPUs on your Linux Mint operating system and want fan control available in Nvidia X server settings for EACH GPU,

Open a terminal window and enter:

sudo nvidia-xconfig --enable-all-gpus

sudo nvidia-xconfig --cool-bits=4

Reboot PC

Open Nvidia X server settings and go to "thermal settings" under each GPU and set your fans to whatever you desire percentage wise. If you reboot the system, you will have to reset these. It will not save these settings after another reboot and will revert back to "auto".

All information included in this post was obtained from searching the internet to find a solution to control my fan speeds on multiple GPUs in the same machine.
 
Last edited:
  • Like
Reactions: IEC

ASK THE COMMUNITY