Crash in driver build during 9.1 install on Ubuntu

I am trying to install Cuda 9.1 on Ubunto 16.04, kernel 4.13.037-generic, on a Dell Alienware laptop. There is a crash in the driver build, which generates an error message in the terminal, but the install just keeps going. When I reboot the system, it cannot see my extra monitor. Displays only shows one, the embedded one.

There is a make.log file, and the error is;

In file included from ./arch/x86/include/asm/cpufeature.h:4:0,
from ./arch/x86/include/asm/thread_info.h:63,
from ./include/linux/thread_info.h:37,
from ./arch/x86/include/asm/preempt.h:6,
from ./include/linux/preempt.h:80,
from ./include/linux/spinlock.h:50,
from /var/lib/dkms/nvidia-387/387.26/build/common/inc/nv-lock.h:16,
from /var/lib/dkms/nvidia-387/387.26/build/common/inc/nv-linux.h:19,
from /var/lib/dkms/nvidia-387/387.26/build/nvidia-uvm/uvm_linux.h:39,
from /var/lib/dkms/nvidia-387/387.26/build/nvidia-uvm/uvm8_va_block.c:24:
/var/lib/dkms/nvidia-387/387.26/build/nvidia-uvm/uvm8_va_block.c: In function ‘block_cpu_fault_locked’:
./arch/x86/include/asm/processor.h:818:39: error: implicit declaration of function ‘task_stack_page’ [-Werror=implicit-function-declaration]
unsigned long __ptr = (unsigned long)task_stack_page(task);
^
./arch/x86/include/asm/processor.h:895:26: note: in expansion of macro ‘task_pt_regs’
#define KSTK_EIP(task) (task_pt_regs(task)->ip)
^
/var/lib/dkms/nvidia-387/387.26/build/nvidia-uvm/uvm8_va_block.c:9035:41: note: in expansion of macro ‘KSTK_EIP’
KSTK_EIP(current));
^

You should not attempt to use the R387 driver on a 4.13 or newer kernel.

Instead, install R390. Possibly the simplest way to do it is to use the network deb install method. Don’t use a runfile installer, and don’t use a local deb.

Alternatively if you want to stay with the runfile installer method, select a recent R390 driver for your GPU from http://www.nvidia.com/drivers and install that. Then run the CUDA 9.1 runfile installer, but deselect the option to install the bundled R387 driver.

Get your GPU driver here: http://www.nvidia.com/drivers
Get your CUDA installers here: http://www.nvidia.com/getcuda
Read the linux install guide: http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html

If you intend to use the deb (package manager) install method after trying the runfile install method, you need to do a proper clean up of the previous runfile install. There are instructions in the linux install guide.

Hey, thanks for the quick response!

I previously used the local deb method. This time I used the network deb, and it installed R390. I rebooted, and checked in Additional Drivers that it is now set to use nvidia 390-30 This fixed the crash, but it still is not seeing my external monitor. I am not the only one on our team who has this problem, a fix would be very welcome. Let me know if you need more info.

this may be a function of an optimus setting, either in the BIOS or via nvidia-prime
In a nutshell, if your external monitor is attached to the optimus dGPU, and the dGPU is “shut off”, then you won’t “see” the external monitor (your laptop display will always be “connected” to the iGPU in an optimus laptop).

The simplest solution might be to use nvidia-prime to turn on the dGPU in this case. If you google nvidia-prime, you’ll find instructions on how to install/use.

I don’t have every laptop to test, so this is just a guess. If you have trouble, you may want to check the system BIOS to see if there are any settings that control this, or contact Dell for help, or search for more threads on the internet discussing different cases, perhaps even your specific laptop model.