Mint 18 installation with NVIDIA GeForce GTX 1060

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
cebesius
Level 1
Level 1
Posts: 2
Joined: Sat Aug 31, 2013 5:08 pm

Mint 18 installation with NVIDIA GeForce GTX 1060

Post by cebesius »

I had some difficulty installing Mint 18 on my new build, and I want to share my experience. Hopefully my workarounds will ease the pain for others until the problems can be resolved.

Specs:
ASRock Z170 Pro4
Intel Core i5-6600K
16GB DDR4
Samsung 850 EVO M.2 500GB
Intel HD Graphics 530
NVIDIA GeForce GTX 1060 6GB
BenQ GW2765, 2560x1440 max res, initially connected to NVIDIA card via HDMI
DriveDroid version 0.9.29 with linuxmint-18-cinnamon-64bit.iso mounted

I start with a working Windows 10 partition (no issue arose around this, just FYI).

I mounted the iso with DriveDroid and it booted into the initial screen (wait N seconds or press any key). I chose to boot Mint immediately. I briefly saw a message about nouveau driver loaded but with unknown GPU. The 1060 did just release a few days ago, so this is understandable. The screen switched to the boot indeterminate progress display, with the green dots moving across the screen. This was where it went awry.

My monitor displayed a message to the effect of "Resolution out of range" and went completely blank. It didn't specify the problem resolution. I tried to switch to another tty (alt-F1, etc) but that didn't work. Not a very graceful failure. I also tried booting in compatibility mode, but that didn't work either.

I recalled seeing two options in the BIOS that seemed suddenly relevant:
Primary Graphics Adapter: Onboard | PCI Express (selected)
IGPU Multi-Monitor: Disabled (selected) | Enabled

I switched my selections to Onboard and Enabled, respectively, moved my HDMI cable to the onboard HDMI, and booted the installer again. This time it booted correctly into the live environment perfectly using the onboard Intel graphics.

I opened up the Driver Manager to check for the proprietary NVIDIA driver, but I only saw one option for intel-microcode, none for the NVIDIA card. I went ahead with the installation anyway, and rebooted into it successfully, still on the Intel graphics.

Inside my installation, the Driver Manager still didn't offer NVIDIA drivers, so I resorted to a manual installation. I logged out, switched to a tty, did `sudo service mdm stop`, and then executed the downloaded NVIDIA driver installer. When it prompted to restart, instead I did a `sudo poweroff`. I went into my BIOS, switched the above options back to PCI Express, and Disabled, respectively, rebooted, and moved my HDMI cable back to the NVIDIA card. It booted up with the proprietary drivers, set the screen resolution correctly, and I went on my merry way.

I've been using Mint for years, and this was by far the clunkiest installation experience I have seen from Mint in that time. In fairness, I've never tried to install it on just-released hardware from companies like NVIDIA.

Hope this story helps someone!

sethmart
Level 1
Level 1
Posts: 1
Joined: Wed Oct 12, 2016 2:09 pm

Re: Mint 18 installation with NVIDIA GeForce GTX 1060

Post by sethmart »

I am having a similar experience with the main difference being that I am attempting to install linux mint 18 on a laptop (Sager NP8152). I have outlined my scenario on reddit (https://www.reddit.com/r/Sager/comments ... mint_uefi/).

The short of it is that my live session is failing to start on this laptop and I am now wondering if it is some combination of UEFI and the nVidia 1060.

I would love to disable the discrete GPU but unfortunately I only have an option to toggle MSHyrid or Discrete. When "Discrete" is selected I experience the same thing you are describing when "MSHybrid" is selecting I get a message "Failed to start x server"

Would love to have a bit more insight.

vidichi_mint_2016
Level 1
Level 1
Posts: 2
Joined: Tue Oct 11, 2016 6:12 pm

Re: Mint 18 installation with NVIDIA GeForce GTX 1060

Post by vidichi_mint_2016 »

Same problem as cebesius in first post.
specifications :
motherboard : GA-EX58-UD4
GPU : Nvidia Geforce GTX 1060
Intel Core i7 920 @ 2.67 Ghz
6GB DDR3
screen BenQ GW2765 @ max resolution 2560x1440
linuxmint-18-cinnamon-64bit

I tried to install Linux Mint 18 with a Nvidia Geforce GTX 1060 GPU.
I tried all the scenarios described in linux community https://community.linuxmint.com/tutorial/view/842 but no success.
I finally succeeded in making it work as described below.

I put back my old graphic card (ATI RadeonHD 3650) and booted with Live-cd.
I had to put it in nomodeset (see https://community.linuxmint.com/tutorial/view/842 ) to be able to install linux Mint from live-cd.

When booting from live-cd hold SHIFT key to enter the Grub menu.
then press the
key to get the full boot grub command line.

In the long command line look for the words:
quiet splash
and replace those 2 words with:
nomodeset

Hopefully, the system will boot into a default graphical environment and you will be able to install linux Mint 18.

When Linux Mint 18 is installed and rebooted (still with old GPU) install all Linux Mint updates through the update manager.
Now your system is up to date.
We can proceed with the installation of the nvidia drivers.
I've made 2 sections in the current post:
  • 1) Installation through apt-get (CUDA will not be enabled in Blender)
  • 2) Installation with property drivers (CUDA will be enabled for blender)

If you want to enable the CUDA compute technology of the Nvidia Geforce GTX 1060 then install the property drivers of nvidia and NOT those through apt-get. Follow section 2)

Before any installation make sure to delete old nvidia drivers if present with following command-line:

Code: Select all

sudo apt-get purge nvidia*
1) Installation through apt-get (CUDA will not be enabled in Blender)
This is the easiest way but unfortunately CUDA won’t be enabled in Blender 2.78.

Add the ppa:graphic-drivers with following command-lines

Code: Select all

sudo add-apt-repository ppa:graphics-drivers
sudo apt-get update
sudo apt-get install nvidia-367
Shutdown your computer and I replaced the old GPU (ATI RadeonHD 3650) with the Nvidia Geforce GTX 1060.
I rebooted and it worked.

2) Installation with property drivers (CUDA will be enabled for blender)
You need 3 things to install :
  • 2.1) nvidia driver (.run file) (download : http://www.nvidia.com/Download/index.aspx?lang=en-us). For example the file downloaded is NVIDIA-Linux-x86_64-367.57.run
  • 2.2) cuda toolkit (download : https://developer.nvidia.com/cuda-downloads). For example the file downloaded is cuda_8.0.44_linux.run
  • 2.3) nvidia-modprobe (download : [url]ftp://download.nvidia.com/XFree86/nvidia-modprobe/[/url]). Download the one corresponding to your nvidia driver version. The current version is 367.57 (here for example the file downloaded is nvidia-modprobe-367.57.tar.bz2). Extract it into a folder.
Prepare installation by making the files executable with following command-lines :

Code: Select all

chmod +x NVIDIA-Linux-x86_64-367.57.run
chmod +x cuda_8.0.44_linux.run
2.1) Installation of nvidia drivers with .run file
We can proceed with the Install of nvidia driver NVIDIA-Linux-x86_64-367.57.run , but, before installing the drivers you should stop the X-server.
Beware !
Many forums advice to press CTRL+ALT+F1 and then after login execute command-line:

Code: Select all

sudo service mdm stop
It doesn’t work with Linux Mint 18 as you’ll end up with a black screen and a cursor on the top left of your screen. But without stopping the service the installation will fail.

To avoid this just open a terminal window (CTRL+ALT+T) wherein you execute the command-line :

Code: Select all

 sudo service mdm stop
This will bring you in a working console mode and you can proceed with the drivers installation.
From your console go to the directory (cd /home/username/Downloads) where you’ve downloaded the drivers and install them with command-line :

Code: Select all

sudo sh NVIDIA-Linux-x86_64-367.57.run
follow the guide (http://www.gamersonlinux.com/forum/thre ... petra.545/) beginning at step 4.
Shutdown your computer and I replaced the old GPU (ATI RadeonHD 3650) with the Nvidia Geforce GTX 1060.

Boot your system and all should be fine.
Still CUDA-toolkit and nvidia-modprobe to install.

2.2) Installation of CUDA-toolkit
open a terminal window (CTRL+ALT+T) where in you execute the command-line :

Code: Select all

 sudo service mdm stop
Login.
From your console go to the directory (cd /home/username/Downloads) where you’ve downloaded the cuda-toolkit and install them with command-line :

Code: Select all

sudo sh cuda_8.0.44_linux.run
Follow instructions on screen and when asked if you want to install the nvidia drivers, answer :
No
as we just installed the latest drivers.
If you say Yes it can cause conflicts.

Installation will create folder :
  • /usr/local/cuda-8.0/bin
  • /usr/local/cuda-8.0/lib64
At the end of installation it is written in the console :
Please make sure that :
PATH includes /usr/local/cuda-8.0/bin
LD_LIBRARY_PATH includes /usr/local/cuda-8.0/lib64
if not add /usr/local/cuda-8.0/lib64 to /etc/ld.so.conf and run ldconfig as root.
To uninstall the CUDA toolkit, run uninstall script in /usr/local/cuda-8.0/bin
To uninstall NVIDIA Driver, run nvidia-uninstall
Read CUDA installation guide in /usr/local/cuda-8.0/doc/pdf
To add the recommended path execute following command-lines :

Code: Select all

export PATH=$PATH:/usr/local/cuda-8.0/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64
2.3) Install nvidia-modprobe
go to directory (cd d /home/username/Downloads/nvidia-modprobe-367.57) where you’ve extracted nvidia-modprobe-367.57.tar.bz2.
Execute following command lines :

Code: Select all

make
sudo make install
We’re almost done.
Reboot your system.
Open blender and check if CUDA is enables under compute device in (File/user preferences/System)

Hope it can help someone.
Success !

gpgpucoder
Level 1
Level 1
Posts: 1
Joined: Sun Dec 11, 2016 11:28 pm

Re: Mint 18 installation with NVIDIA GeForce GTX 1060

Post by gpgpucoder »

My variation on above, which was quite helpful. Thank you very much for posting that information.

1. My configuration:
Processor: Intel(R) Core(TM) i3-2100 CPU @ 3.10 GHz. I have an i5 too but it's boxed at moment. I should probably just buy another chassis and board to put it in.
Board: ASUS P8Z68-V PRO Version: Rev 1.xx
BIOS: AMI BIOS Version 0501 05/09/2011
Card: PNY NVIDIA GP106 [GeForce GTX 1060 6GB] (rev a1) / PCI DID 0x1c03 Vendor ID 0x10de / (quantity two)
Cuda Cores: 1280 (so I think it is codename GP106-400)

2. OS Revision:
Originally had Mint 17.2 Rafaela, no luck getting any of this to work there. After installing generally similar driver instructions including the Cuda 8 toolkit, all I got were "Cinnamon has crashed" messages after doing so. I was primarily relying on NVIDIA's instructions for Ubuntu. At some point, I was able stop the Cinnamon crashes, do not recall how, so I thought things were working. Then when I tried to run samples such as nvidia-smi, those failed. I think with nvidia-smi, I got Failed to initialize NVML: Driver/library version mismatch. I concluded I didn't have a working CUDA compute device, so I ditched it after finding these posts.

I didn't update the Mint 17 installation but shrank its partition so I could leave it running and available. I created a new partition on the same HDD for Mint 18. I seem to still have access to the files I had in Mint 17, so I'll just copy them over to the new one.

4. Default Video Adapter in BIOS:
On my board, hit Delete to enter BIOS when you see things on the screen. Get into the Advanced menu, which I went ahead and set as default. In ASUS EFI BIOS Utility - Advanced Mode, select the Advanced tab, find System Agent Configuration.
Change Initiate Graphic Adapter from PCI/iGPU to iGPU.

Later, after installing drivers and getting things running, I did change Initiate Graphic Adapter from iGPU to PCIE/PCI.

Since I had installed both cards right away, it ended up being confusing as to what display was being driven. With iGPU as default, it was the VGA coming out of the mobo. It was very important to make sure I had this setting on by default while installing the OS and drivers. I have observed Linux doesn't seem great at getting a display to activate if it didn't see it connected while booting. I also found if I set back to iGPU, with the NVIDIA cards in, it causes more Cinnamon has crashed messages.

I'm not sure if I have the iGPU still available at all with the NVIDIA cards active.

5. Grub: in the Grub configuration, I replaced quiet splash with nomodeset, and commented out the line gfxmode $linux_gfx_mode, then Ctrl-X to accept the configuration and reboot.

In my case I had to do both of these things to get to a workable 'no graphics' console screen. For example, if I did CTRL-ALT-T to get a terminal, then entered sudo service mdm stop, I would either just get a black screen, or a console-style screen showing text, but on which I couldn't see updates or get the keyboard to work. Curious if there is a good information reference or informative thread regarding the black screen matter, and also regarding the Cinnamon has crashed messages.

6. NVIDIA Driver Rev and CUDA:
I went with 367.57 driver though there is a later one available now. Also, I have nouveau blacklisted, I think with 17.2 I tried removing it completely, but that didn't help. Another thing with 17.2 is I tried to exactly match up the dev tools and headers with NVIDIA's instructions, though none of that ultimately did me any good. In my new config, without updating or altering any system tools, I seem to be able to compile and run the NVIDIA CUDA samples fine, but have just tried a few. I am on the CUDA 8 Toolkit (did not install the driver embedded in the toolkit).

Some of my answers during the driver install...
y to install on an unsupported configuration
n to install NVIDIA Accelerated Graphics Driver for Linux-x86_64 367.48?
y to Install the CUDA 8.0 ToolKit?
y to symbolic link?
y to Cuda 8.0 Samples?
y to Accept default Samples Location?

vidichi_mint_2016
Level 1
Level 1
Posts: 2
Joined: Tue Oct 11, 2016 6:12 pm

Re: Mint 18.3 installation with NVIDIA GeForce GTX 1050

Post by vidichi_mint_2016 »

Installed NVIDIA drivers with following command-lines

Code: Select all

sudo add-apt-repository ppa:graphics-drivers
sudo apt-get update
sudo apt-get install nvidia-390
Then rebooted the system.
Then installed via software manager following packages :
  • * nvidia-cuda-toolkit (not sure it is necessary)
    * nvidia-modprobe
    * nvidia-settings
This way CUDA was also available in Blender.

Post Reply

Return to “Installation & Boot”