Ubuntu 16.04 nvidia drivers don't work

I've just installed a new ubuntu 16.04 ,
fresh install clean , logged in the first and only thing i did is selecting the proprietary driver 361 for nvidia , rebooted the machine .
anfter rebooting i can login but unity isn't showing , i can still right click though and open terminal , tried many answers:
link1 link2

did not help , i got frustrated , booted into usb and freshly installed it again, this time i tried 340 drivers same problem .
i mean this is 16.04 LTS for gods sake .
i have dual grahpic cards nvidia gt 740m , intel built on ASUS laptop .

output of grep "EE\|WW" /var/log/Xorg.0.log :

(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    23.758] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[    23.758] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[    23.758] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[    23.758] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[    23.758] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[    23.761] (WW) "glamoregl" will not be loaded unless you've specified it to be loaded elsewhere.
[    25.323] (WW) Unresolved symbol: fbGetGCPrivateKey
[    25.448] (WW) NVIDIA(0): Unable to get display device for DPI computation.
[    25.613] (WW) modeset(G0): Option "AllowEmptyInitialConfiguration" is not used
[    25.613] (WW) modeset(G0): Option "IgnoreDisplayDevices" is not used
[    25.902] (EE) NVIDIA(0): Failed to initiate mode change.
[    25.902] (EE) NVIDIA(0): Failed to complete mode change
[    26.214] (WW) evdev: SteelSeries Sensei Raw Gaming Mouse: ignoring absolute axes.
[    26.216] (WW) evdev: SteelSeries SteelSeries Apex Raw Gaming Keyboard: ignoring absolute axes.
[    26.272] (II) XINPUT: Adding extended input device "USBest Technology SiS HID Touch Controller" (type: TOUCHSCREEN, id 16)

full log file LOG

xorg.conf file :

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "intel"
EndSection

Section "Device"
    Identifier "intel"
    Driver "modesetting"
    BusID "PCI:0@0:2:0"
    Option "AccelMethod" "None"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

Section "Device"
    Identifier "nvidia"
    Driver "nvidia"
    BusID "PCI:4@0:0:0"
    Option "ConstrainCursor" "off"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
    Option "AllowEmptyInitialConfiguration" "on"
    Option "IgnoreDisplayDevices" "CRT"
EndSection

Solution 1:

I also installed Ubuntu 16.04, clean install on a new hd and everything worked fine until I switched to NVIDIA driver. After rebooting I couldn't get past the login screen. The solution that worked for me was to disable secure boot.

While stuck in login loop, I switched to console Ctl+Alt+F1, rebooted and disabled secure boot in UEFI. Now everything works with nvidia driver installed.

Solution 2:

I had this problem too. I just run this in a console (press Ctrl + Alt + F1, in login page to show first virtual tty):

sudo apt-get purge nvidia*

After this, rebooted and then i could login. After that, I installed intel drivers first, and then nvidia-361.

These were the steps I followed:

  1. sudo apt-get purge nvidia*
  2. reboot (now I had noveau display driver working)
  3. sudo apt-get install intel-microcode
  4. sudo apt-get install intel-gpu-tools
  5. Reboot (for testing, everything was working fine)
  6. sudo apt-get install nvidia-361 (I think nvidia-current is better long term option).
  7. Reboot

Now I have these (sorry they are in spanish):

Additional drivers

Solution 3:

I also have an issue with 16.04 and Nvidia 361.42 driver. You can use prime-select intel or Nouveau driver as temporary workaround. I have had endless issues with the official Nvidia Ubuntu drivers over the years, it's very hit and miss. I thought the introduction of Steam OS and the growing number of Linux users/gamers might encourage them to better support Linux :/