Ubuntu – Ubuntu 14.04 Nvidia driver fail

14.04driversnvidiavga

i have bought a new Dell inspiron 15 – 3542 that has Nvidia (GM108M [GeForce 840M]). every time i install the Nvidia driver i have a black screen at the next boot, so i need to format again ! which causes me a huge pain ! this is what i get from (sudo lshw -C video)

 *-display               
   description: VGA compatible controller
   product: Haswell-ULT Integrated Graphics Controller
   vendor: Intel Corporation
   physical id: 2
   bus info: pci@0000:00:02.0
   version: 0b
   width: 64 bits
   clock: 33MHz
   capabilities: msi pm vga_controller bus_master cap_list rom
   configuration: driver=i915 latency=0
   resources: irq:60 memory:f7400000-f77fffff memory:d0000000-dfffffff     ioport:f000(size=64)


*-display UNCLAIMED
       description: 3D controller
       product: GM108M [GeForce 840M]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:08:00.0
       version: a2
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress cap_list
       configuration: latency=0
       resources: memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:d000(size=128) memory:f7000000-f707ffff

And this is what i get when i run lspci | egrep 'VGA|3D'

00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b)
08:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 840M] (rev a2)

Any idea how to get this Nvidia card work without getting the black screen again? Please help me this is urgent !! i appreciate it !

Best Answer

I was having the same problem, this worked for me after a lot of struggle and research, restart ubuntu and at login screen press ctrl+alt+F1 and login using your account this will take you to a terminal First, remove all the nvidia packages by:

sudo apt-get purge nvidia-*
sudo reboot

Again press ctrl+alt+F1 at login screen Then, Install nvidia packages by:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo ubuntu-drivers autoinstall
sudo reboot

Next, time you boot you will get a black screen instead of login most probably if not you are done. If you get a black screen, press ctrl+alt+F1 again and do the following:

cd /etc/X11

check whether there's a file of xorg.conf by:

ls | grep xorg.conf

It should be xorg.conf and not xorg.conf.* If not present do the following:

sudo nvidia-xconfig

Now edit the file as follows:

sudo nano xorg.conf

Under the Section Device, Identifier intel change Driver from "intel" to "modesetting" i.e: from

Driver "intel"

to

Driver "modesetting"

Now save the file and exit nano and do the following.

sudo chattr +i xorg.conf
sudo reboot

I hope this solves your problem, if there are any queries let my know. Thank You!

These links helped in the answers:

  1. Idea of changing driver to modesetting from intel

2.Modern way to install nvidia drivers

Related Question