I am new to ubuntu and I want to install cuda 7.5 on my computer, but I met problems when I tried to install nvidia driver. I have tried many times and many methods, all failed. For example, I tried:

sudo apt-get purge nvidia*
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-361

But I got a black screen instead of the login screen. I have tried all possible drivers, but none worked. The nvidia driver on my dual graphics laptop is GeForce 840M, and my system is:

  • ubuntu 14.04.4 with linux kernel 4.2.0-30-generic.

To get into system, I have to run sudo prime-select intel, then I run the following commands after reboot:

When I run lspci -knn | grep -EA2 'VGA|3D'in termal, the information is:

00:02.0 VGA compatible controller [0300]: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller [8086:0416] (rev 06)
  Subsystem: Lenovo Device [17aa:5040]
  Kernel driver in use: i915

01:00.0 3D controller [0302]: NVIDIA Corporation GM108M [GeForce 840M [10de:1341] (rev ff)
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader [10ec:5227] (rev 01)
  Subsystem: Lenovo Device [17aa:5028]
  • Does the terminal show any errors when you install a driver. I suggest purging all custom drivers from ppa, run sudo add-apt-repository -r ppa:graphics-drivers/ppa && sudo apt-get update and then install a driver from Ubuntu repos sudo apt-get install nvidia-352. If there are any errors, please post the output.
    – Pilot6
    Feb 28, 2016 at 14:54
  • @Pilot6, The terminal didn't show any errors. And I just could't see the login screen, I mean that I could get into ttf1 normally by ctrl+alt+f1 and see nvidia-driver installed on my computer.
    – taozuoqiao
    Feb 28, 2016 at 15:08
  • So you installed nvidia-352 with no errors? Does prime-select work? Run sudo prime-select intel.
    – Pilot6
    Feb 28, 2016 at 15:09
  • @Pilot6, prime-select does work.
    – taozuoqiao
    Feb 28, 2016 at 15:27
  • What does it show? Does it allow to switch adapters. After you switch to Intel, reboot and test. If it runs OK, then try to switch to nvidia.
    – Pilot6
    Feb 28, 2016 at 15:29

2 Answers 2


I had the same issue. Create file /usr/share/X11/xorg.conf.d/20-intel.conf with next content:

Section "Device"
 Identifier "Card0"
 Driver "Intel"
 Option "AccelMethod" "uxa"

This solution helped me and I hope this will help you

  • This solution worked for me on ThinkPad P70 with Quadro M600M. Thanks! Mar 31, 2016 at 8:01
  • This solution also worked for me, thanks very much!
    – taozuoqiao
    Apr 1, 2016 at 21:45
  • Also works with ThinkPad T560 (GeForce 940MX). May 18, 2016 at 7:11

Try disabling uefi and use legacy bios if possible and then install ubuntu. The installer for ubuntu 16.04 tells that propriatary drivers might have problems with uefi and using legacy bios fixed the black screen problem for me with nvidia drivers on a dual graphics laptop.

  • Ubuntu 16.04 is not relevant at all. Ant UEFI is not related at all.
    – Pilot6
    Feb 28, 2016 at 15:58
  • Perhaps not, although i had the same problem on ubuntu 15.10 and 16.04 and it started to work when UEFI was disabled.
    – Linus
    Mar 10, 2016 at 12:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.