mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Hardware > GPU Computing

Reply
 
Thread Tools
Old 2010-12-30, 08:32   #1
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

3·2,083 Posts
Red face need help setting up CUDA drivers on Ubuntu 10.04

Hi all,

Anyone here have experience setting up the nVidia CUDA 3.1 (or later) drivers on Ubuntu 10.04? I'm trying to set up the drivers on a friend's (Gary a.k.a. gd_barnes on this forum) machine so he can use his GTX 460 for crunching. We had it working fine under Ubuntu 8.04 but have upgraded the machine to 10.04.1 since Ubuntu will be dropping support for 8.04 next spring.

As before when I set up the drivers on 8.04, I followed these steps to install the driver (per https://help.ubuntu.com/community/NvidiaManual):

-Downloaded the 3.1 development driver. (That is, the file devdriver_3.1_linux_64_256.40.run.) I also downloaded cudatoolkit_3.1_linux_64_ubuntu9.10.run and gpucomputingsdk_3.1_linux.run, but in this case I didn't even get past installing the first one.

-Added the build-essential and linux-headers-[latest] packages.

-Removed the nvidia-glx, nvidia-glx-legacy, nvidia-glx-new, and nvidia-settings packages. (Some of these didn't exist in the first place, but they were all removed where applicable per the instructions linked above.) Also removed jockey-common, since that proved to be troublesome the last time around.

-Stopped the GUI: "sudo /etc/init.d/gdm stop" and then "sudo pkill X" and "sudo pkill x" (the latter two weren't in the instructions, but I've found they were needed to fully kill the GUI so the installer could run).

-Ran the installer: "cd ~/Desktop" then "sudo ./devdriver_3.1_linux_64_256.40.run".

The installer progressed fine at first (it got past the license agreement part, which means that it at least saw that the GUI was properly closed and that it could run), but then it gave me some error about a pre-installation script not being able to run. It gave me the choice of whether to continue at that point, and I selected Yes. The installer then hung for about 15 seconds or so, with the relevant part of the ncurses interface (that is, everything except the header that said "nVidia driver installer v3.1 etc...") completely blank. According to Gary who was watching the physical console at the time (I was on via SSH), there were a few cryptic errors being scrolled by on the screen over and over. (We didn't bother to record the errors since I suspected they wouldn't be of much help, but if they are needed I can try to get them.) After ~15 seconds, the errors stopped and I got the following error on my screen:
Code:
ERROR: If you are using a Linux 2.4 kernel, please make sure
       you either have configured kernel sources matching your
       kernel or the correct set of kernel headers installed
       on your system.
       
       If you are using a Linux 2.6 kernel, please make sure
       you have configured kernel sources matching your kernel
       installed on your system. If you specified a separate
       output directory using either the "KBUILD_OUTPUT" or
       the "O" KBUILD parameter, make sure to specify this
       directory with the SYSOUT environment variable or with
       the equivalent nvidia-installer command line option.
       
       Depending on where and how the kernel sources (or the
       kernel headers) were installed, you may need to specify
       their location with the SYSSRC environment variable or
       the equivalent nvidia-installer command line option.
At first I thought it needed me to install the Linux kernel headers, but then I remembered that I already did that earlier (just as I had under 8.04, which never gave me this error). So I tried installing the full linux-source package as well, though that didn't end up making any difference.

At this point, I'm at a loss as to how to proceed. Hopefully somebody around here has done this before and will know what my problem is. I've attached the full contents of /var/log/nvidia-installer.log in case it's at all helpful.

Much thanks in advance for any help which can (hopefully) be provided!

Max
Attached Files
File Type: txt nvidia-installer.log.txt (3.4 KB, 130 views)
mdettweiler is offline   Reply With Quote
Old 2010-12-30, 09:03   #2
ckdo
 
ckdo's Avatar
 
Dec 2007
Cleves, Germany

2·5·53 Posts
Default

I was quite happy with these instructions (German, sorry, but you should be able to follow).

I'm on Ubuntu 10.10 and used more recent versions of the .run files. Installation did not require shutting down X beforehand.

It's a good idea to keep the .run files - the graphics driver was updated at one point, albeit to a non-CUDA version, and X would no longer start. Reinstalling the old devdriver worked fine for me.
ckdo is offline   Reply With Quote
Old 2010-12-30, 10:46   #3
xilman
Bamboozled!
 
xilman's Avatar
 
"π’‰Ίπ’ŒŒπ’‡·π’†·π’€­"
May 2003
Down not across

3×3,529 Posts
Default

Here is what I do on RedHat / Fedora / Gentoo systems. I don't run Ubuntu but the information may be useful.

Code:
updatedb
locate nvidia.ko
rm /lib/modules/2.6.34.7-61.fc13.x86_64/kernel/drivers/video/nvidia.ko
cd /usr/local/nvidia
sh devdriver_3.2_linux_64_260.24.run
To explain: some OS-installed kernel modules can be loaded before the CUDA installer tries to load new incompatible one(s). The lines above find out where it/they are and removes it/them before running the installer. Remember to substitute the correct file names as reported by locate(1) --- the above code is a lightly edited copy of a shell history file.

I also find it necessary to stop the X server. The easiest way, IMO, is to run "telinit 3" as root.

Oh yes, if you're running the "nouveau" module in your kernel, you probably shouldn't. I think this is a RedHat / Fedora only situation and so not applicable to your Ubuntu system, but you may want to check out what Nvidia's site has to say about it.

Paul
xilman is offline   Reply With Quote
Old 2010-12-30, 12:32   #4
amphoria
 
amphoria's Avatar
 
"Dave"
Sep 2005
UK

2·19·73 Posts
Default

I have successfully installed CUDA 3.0 to 3.2 on two versions of Ubuntu 9, 10.04 and 10.10. I didn't follow any of the instructions linked to above. I just shut down the X server using gdm stop and ran the Nvidia driver package. I also got the error about the pre-install script, but told the script to continue and it ran to completion with a few other questions to answer. This is probably not very helpful, other than to tell you that it does work.

One other difference is that I always log in as root to install the drivers rather than using sudo, If you want to try this you will need to enable root login first. Google it as I can't remember how I did it.
amphoria is offline   Reply With Quote
Old 2010-12-30, 12:38   #5
TheJudger
 
TheJudger's Avatar
 
"Oliver"
Mar 2005
Germany

11·101 Posts
Default

Hi Max,

just some Linux generic ideas, I don't have an Ubuntu here.

first of all I would move to CUDA 3.2 as long as there is no serios reason to use CUDA 3.1. CUDA 3.2 is officially supported on Ubuntu 10.04.
http://developer.nvidia.com/object/c...downloads.html

Did you check that the build-essential and linux-headers-[latest] packages have the same version than the currently running kernel (e.g. forgot to reboot after kernel update)?

Oliver

Last fiddled with by TheJudger on 2010-12-30 at 12:38
TheJudger is offline   Reply With Quote
Old 2010-12-30, 13:50   #6
msft
 
msft's Avatar
 
Jul 2009
Tokyo

2·5·61 Posts
Default

make kernel from source & install.
msft is offline   Reply With Quote
Old 2010-12-30, 18:36   #7
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

624910 Posts
Default

Thanks for all the tips! Hopefully something you guys have turned up will do the trick. I'll take a whack at it again as soon as I get the chance (hopefully later today) and report back here with how it turns out.

Last time I tried to set up the drivers, the CUDA Toolkit 3.2 was still in beta (or something like that; at any rate, it could only be downloaded by registered nVidia developers, and they didn't seem to find a "distributed computing project co-admin" worthy of that designation when I applied ), hence why I had 3.1. Now I see 3.2 is generally available--thanks Oliver! That will be the first thing I'll try; perhaps the newer version will simply work with no fuss.

Last fiddled with by mdettweiler on 2010-12-30 at 18:37
mdettweiler is offline   Reply With Quote
Old 2010-12-30, 22:32   #8
mdettweiler
A Sunny Moo
 
mdettweiler's Avatar
 
Aug 2007
USA (GMT-5)

186916 Posts
Default

Okay, I tried it again with the 3.2 drivers, running directly as root per amphoria's suggestion (specifically, I used "sudo su" to become root but the effect should be the same as a direct root login).

This time, I didn't get the pre-install script error (actually, as I now recall, I didn't get that the last time either; that went away when I renamed some dummy preinstall script that was apparently put there by Ubuntu to prevent overwriting the default nVidia drivers), but I still got the other error about the kernel headers.

I've confirmed that build-essential is at the latest version, and linux-headers-2.6.32-27-generic is the same version as the installed kernel (per "uname -r")

The error message mentioned specifying the location of kernel headers using an environment variable; how would I go about doing that? I know how to set up environment variables, but am not entirely sure where on the system the headers would be in the first place. According to /var/log/nvidia-installer.log, it's looking in '/lib/modules/2.6.32-27-generic/build' for the headers; this is what I get when I run an ls of that directory:
Code:
gary@herford:/lib/modules/2.6.32-27-generic/build$ ls -l
total 648
drwxr-xr-x 3 root root   4096 2010-12-29 01:18 arch
lrwxrwxrwx 1 root root     32 2010-12-29 01:18 block -> ../linux-headers-2.6.32-27/block
lrwxrwxrwx 1 root root     33 2010-12-29 01:18 crypto -> ../linux-headers-2.6.32-27/crypto

lrwxrwxrwx 1 root root     40 2010-12-29 01:18 Documentation -> ../linux-headers-2.6.32-27/Documentation
lrwxrwxrwx 1 root root     34 2010-12-29 01:18 drivers -> ../linux-headers-2.6.32-27/drivers
lrwxrwxrwx 1 root root     35 2010-12-29 01:18 firmware -> ../linux-headers-2.6.32-27/firmware
lrwxrwxrwx 1 root root     29 2010-12-29 01:18 fs -> ../linux-headers-2.6.32-27/fs
drwxr-xr-x 5 root root   4096 2010-12-29 01:18 include
lrwxrwxrwx 1 root root     31 2010-12-29 01:18 init -> ../linux-headers-2.6.32-27/init
lrwxrwxrwx 1 root root     30 2010-12-29 01:18 ipc -> ../linux-headers-2.6.32-27/ipc
lrwxrwxrwx 1 root root     33 2010-12-29 01:18 Kbuild -> ../linux-headers-2.6.32-27/Kbuild

drwxr-xr-x 2 root root   4096 2010-12-29 01:18 kernel
lrwxrwxrwx 1 root root     30 2010-12-29 01:18 lib -> ../linux-headers-2.6.32-27/lib
lrwxrwxrwx 1 root root     35 2010-12-29 01:18 Makefile -> ../linux-headers-2.6.32-27/Makefile
lrwxrwxrwx 1 root root     29 2010-12-29 01:18 mm -> ../linux-headers-2.6.32-27/mm
-rw-r--r-- 1 root root 646144 2010-12-01 22:51 Module.symvers
lrwxrwxrwx 1 root root     30 2010-12-29 01:18 net -> ../linux-headers-2.6.32-27/net
lrwxrwxrwx 1 root root     34 2010-12-29 01:18 samples -> ../linux-headers-2.6.32-27/samples
drwxr-xr-x 7 root root   4096 2010-12-29 01:18 scripts
lrwxrwxrwx 1 root root     35 2010-12-29 01:18 security -> ../linux-headers-2.6.32-27/security
lrwxrwxrwx 1 root root     32 2010-12-29 01:18 sound -> ../linux-headers-2.6.32-27/sound
lrwxrwxrwx 1 root root     26 2010-12-29 01:18 source -> /build/buildd/linux-2.6.32
lrwxrwxrwx 1 root root     32 2010-12-29 01:18 tools -> ../linux-headers-2.6.32-27/tools
lrwxrwxrwx 1 root root     33 2010-12-29 01:18 ubuntu -> ../linux-headers-2.6.32-27/ubuntu

lrwxrwxrwx 1 root root     30 2010-12-29 01:18 usr -> ../linux-headers-2.6.32-27/usr
lrwxrwxrwx 1 root root     31 2010-12-29 01:18 virt -> ../linux-headers-2.6.32-27/virt
Does that look like it's the right place for the installer to be looking for the headers? I notice that the item "source" is a symbolic link to "/build/buildd/linux-2.6.32", a path which does not exist; might that be a problem?

Thanks,
Max
mdettweiler is offline   Reply With Quote
Old 2013-07-29, 09:53   #9
saikirangvr
 
Jul 2013

102 Posts
Default

Quote:
Originally Posted by mdettweiler View Post
Okay, I tried it again with the 3.2 drivers, running directly as root per amphoria's suggestion (specifically, I used "sudo su" to become root but the effect should be the same as a direct root login).

This time, I didn't get the pre-install script error (actually, as I now recall, I didn't get that the last time either; that went away when I renamed some dummy preinstall script that was apparently put there by Ubuntu to prevent overwriting the default nVidia drivers), but I still got the other error about the kernel headers.

I've confirmed that build-essential is at the latest version, and linux-headers-2.6.32-27-generic is the same version as the installed kernel (per "uname -r")

The error message mentioned specifying the location of kernel headers using an environment variable; how would I go about doing that? I know how to set up environment variables, but am not entirely sure where on the system the headers would be in the first place. According to /var/log/nvidia-installer.log, it's looking in '/lib/modules/2.6.32-27-generic/build' for the headers; this is what I get when I run an ls of that directory:
Code:
gary@herford:/lib/modules/2.6.32-27-generic/build$ ls -l
total 648
drwxr-xr-x 3 root root   4096 2010-12-29 01:18 arch
lrwxrwxrwx 1 root root     32 2010-12-29 01:18 block -> ../linux-headers-2.6.32-27/block
lrwxrwxrwx 1 root root     33 2010-12-29 01:18 crypto -> ../linux-headers-2.6.32-27/crypto

lrwxrwxrwx 1 root root     40 2010-12-29 01:18 Documentation -> ../linux-headers-2.6.32-27/Documentation
lrwxrwxrwx 1 root root     34 2010-12-29 01:18 drivers -> ../linux-headers-2.6.32-27/drivers
lrwxrwxrwx 1 root root     35 2010-12-29 01:18 firmware -> ../linux-headers-2.6.32-27/firmware
lrwxrwxrwx 1 root root     29 2010-12-29 01:18 fs -> ../linux-headers-2.6.32-27/fs
drwxr-xr-x 5 root root   4096 2010-12-29 01:18 include
lrwxrwxrwx 1 root root     31 2010-12-29 01:18 init -> ../linux-headers-2.6.32-27/init
lrwxrwxrwx 1 root root     30 2010-12-29 01:18 ipc -> ../linux-headers-2.6.32-27/ipc
lrwxrwxrwx 1 root root     33 2010-12-29 01:18 Kbuild -> ../linux-headers-2.6.32-27/Kbuild

drwxr-xr-x 2 root root   4096 2010-12-29 01:18 kernel
lrwxrwxrwx 1 root root     30 2010-12-29 01:18 lib -> ../linux-headers-2.6.32-27/lib
lrwxrwxrwx 1 root root     35 2010-12-29 01:18 Makefile -> ../linux-headers-2.6.32-27/Makefile
lrwxrwxrwx 1 root root     29 2010-12-29 01:18 mm -> ../linux-headers-2.6.32-27/mm
-rw-r--r-- 1 root root 646144 2010-12-01 22:51 Module.symvers
lrwxrwxrwx 1 root root     30 2010-12-29 01:18 net -> ../linux-headers-2.6.32-27/net
lrwxrwxrwx 1 root root     34 2010-12-29 01:18 samples -> ../linux-headers-2.6.32-27/samples
drwxr-xr-x 7 root root   4096 2010-12-29 01:18 scripts
lrwxrwxrwx 1 root root     35 2010-12-29 01:18 security -> ../linux-headers-2.6.32-27/security
lrwxrwxrwx 1 root root     32 2010-12-29 01:18 sound -> ../linux-headers-2.6.32-27/sound
lrwxrwxrwx 1 root root     26 2010-12-29 01:18 source -> /build/buildd/linux-2.6.32
lrwxrwxrwx 1 root root     32 2010-12-29 01:18 tools -> ../linux-headers-2.6.32-27/tools
lrwxrwxrwx 1 root root     33 2010-12-29 01:18 ubuntu -> ../linux-headers-2.6.32-27/ubuntu

lrwxrwxrwx 1 root root     30 2010-12-29 01:18 usr -> ../linux-headers-2.6.32-27/usr
lrwxrwxrwx 1 root root     31 2010-12-29 01:18 virt -> ../linux-headers-2.6.32-27/virt
Does that look like it's the right place for the installer to be looking for the headers? I notice that the item "source" is a symbolic link to "/build/buildd/linux-2.6.32", a path which does not exist; might that be a problem?

Thanks,
Max
I am new to ubuntu and I am also facing the same problem of kernels.....

Can you please elaborate how you rectified this problem.
saikirangvr is offline   Reply With Quote
Old 2013-07-29, 09:56   #10
saikirangvr
 
Jul 2013

2 Posts
Default cuda 3.2 kernel errors

I am new to ubuntu and I am also facing the same problem of kernels.....

Can you please elaborate how you rectified this problem.
saikirangvr is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting the blasted nV drivers working again fivemack GPU Computing 4 2017-03-08 13:54
Keeping cuda working over Ubuntu upgrades fivemack Software 9 2016-01-16 16:37
Is there any Free cuda-capable drivers for Debian? alexvong1995 GPU Computing 22 2015-01-15 13:56
Extensions to drivers/guides henryzz Aliquot Sequences 1 2013-09-16 21:29
Need help with drivers (Vista 64) schickel Lounge 3 2009-11-19 05:09

All times are UTC. The time now is 14:37.

Thu Feb 25 14:37:32 UTC 2021 up 84 days, 10:48, 0 users, load averages: 3.66, 4.02, 3.97

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.